From: Markus Schneider-Pargmann (TI.com) Date: Fri, 28 Nov 2025 14:31:06 +0000 (+0100) Subject: power: domain: Add ti-omap-prm stub X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86d2747a9c92dacccf0bedd57d586252e2c9532d;p=thirdparty%2Fu-boot.git 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) --- diff --git a/drivers/power/domain/Kconfig b/drivers/power/domain/Kconfig index 0ad885c9e8b..935f282d6c5 100644 --- a/drivers/power/domain/Kconfig +++ b/drivers/power/domain/Kconfig @@ -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 diff --git a/drivers/power/domain/Makefile b/drivers/power/domain/Makefile index 8e03f620437..b2c0bd8a61a 100644 --- a/drivers/power/domain/Makefile +++ b/drivers/power/domain/Makefile @@ -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 diff --git a/drivers/power/domain/ti-omap-prm.c b/drivers/power/domain/ti-omap-prm.c new file mode 100644 index 00000000000..c240e2682ea --- /dev/null +++ b/drivers/power/domain/ti-omap-prm.c @@ -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 +#include + +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, +};