]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
power: domain: Add ti-omap-prm stub
authorMarkus Schneider-Pargmann (TI.com) <msp@baylibre.com>
Fri, 28 Nov 2025 14:31:06 +0000 (15:31 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 12 Dec 2025 21:16:41 +0000 (15:16 -0600)
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>
drivers/power/domain/Kconfig
drivers/power/domain/Makefile
drivers/power/domain/ti-omap-prm.c [new file with mode: 0644]

index 0ad885c9e8ba7fe7f687b5d9bad4ef6384d55276..935f282d6c53acd3f02b8894764cc317c109c41f 100644 (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
index 8e03f620437edc6f3d39922b0d5c972fdcd57801..b2c0bd8a61a1f289cbc4d14fa3da13b9781d70e5 100644 (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
diff --git a/drivers/power/domain/ti-omap-prm.c b/drivers/power/domain/ti-omap-prm.c
new file mode 100644 (file)
index 0000000..c240e26
--- /dev/null
@@ -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,
+};