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>
This commit is contained in:
Markus Schneider-Pargmann (TI.com) 2025-11-28 15:31:06 +01:00 committed by Tom Rini
parent 447bd8f1e5
commit 86d2747a9c
3 changed files with 45 additions and 0 deletions

View File

@ -125,6 +125,14 @@ config TI_POWER_DOMAIN
help
Generic power domain implementation for TI K3 devices.
config TI_OMAP_PRM_POWER_DOMAIN
bool "Enable the TI OMAP PRM power domain driver"
depends on POWER_DOMAIN && ARCH_OMAP2PLUS
help
Enable support for TI OMAP Power and Reset Manager (PRM) power domains.
The driver is currently a stub to be able to probe devices that
require this type of power domain device.
config ZYNQMP_POWER_DOMAIN
bool "Enable the Xilinx ZynqMP Power domain driver"
depends on POWER_DOMAIN && ZYNQMP_FIRMWARE

View File

@ -21,4 +21,5 @@ obj-$(CONFIG_SCMI_POWER_DOMAIN) += scmi-power-domain.o
obj-$(CONFIG_TEGRA186_POWER_DOMAIN) += tegra186-power-domain.o
obj-$(CONFIG_TI_SCI_POWER_DOMAIN) += ti-sci-power-domain.o
obj-$(CONFIG_TI_POWER_DOMAIN) += ti-power-domain.o
obj-$(CONFIG_TI_OMAP_PRM_POWER_DOMAIN) += ti-omap-prm.o
obj-$(CONFIG_ZYNQMP_POWER_DOMAIN) += zynqmp-power-domain.o

View File

@ -0,0 +1,36 @@
// 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,
};