Files
u-boot/drivers/power/domain/ti-omap-prm.c
Markus Schneider-Pargmann (TI.com) 86d2747a9c power: domain: Add ti-omap-prm stub
Upstream DT uses simple-pm-bus instead of simple-bus. simple-pm-bus
requires power domain support. On am33xx, PRM manages power domains but
all domains are enabled at boot. Add stub driver with custom of_xlate
that expects no argumetns to allow simple-pm-bus and dependent devices
to probe.

Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
2025-12-12 15:16:41 -06:00

37 lines
782 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* TI OMAP PRM (Power and Reset Manager) power domain driver
*
* Stub driver to provide power domain support.
*/
#include <dm.h>
#include <power-domain-uclass.h>
static int ti_omap_prm_xlate(struct power_domain *power_domain,
struct ofnode_phandle_args *args)
{
if (args->args_count != 0)
return -EINVAL;
return 0;
}
static const struct udevice_id ti_omap_prm_ids[] = {
{ .compatible = "ti,am3-prm-inst" },
{ .compatible = "ti,am4-prm-inst" },
{ .compatible = "ti,omap-prm-inst" },
{ }
};
static struct power_domain_ops ti_omap_prm_ops = {
.of_xlate = ti_omap_prm_xlate,
};
U_BOOT_DRIVER(ti_omap_prm) = {
.name = "ti-omap-prm",
.id = UCLASS_POWER_DOMAIN,
.of_match = ti_omap_prm_ids,
.ops = &ti_omap_prm_ops,
};