[PATCH RFC 06/10] board: ti: j721s2: Initialize the ESM & PMIC ESM

Keerthy j-keerthy at ti.com
Tue Oct 3 10:10:34 CEST 2023


Initialize the ESM & PMIC ESM

Signed-off-by: Keerthy <j-keerthy at ti.com>
---
 board/ti/j721s2/evm.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c
index 7795300abc..effa52ff5a 100644
--- a/board/ti/j721s2/evm.c
+++ b/board/ti/j721s2/evm.c
@@ -319,4 +319,31 @@ int board_late_init(void)
 
 void spl_board_init(void)
 {
+	struct udevice *dev;
+	int ret;
+
+	if (IS_ENABLED(CONFIG_ESM_K3)) {
+		ret = uclass_get_device_by_name(UCLASS_MISC, "esm at 700000",
+						&dev);
+		if (ret)
+			printf("MISC init for esm at 700000 failed: %d\n", ret);
+
+		ret = uclass_get_device_by_name(UCLASS_MISC, "esm at 40800000",
+						&dev);
+		if (ret)
+			printf("MISC init for esm at 40800000 failed: %d\n", ret);
+
+		ret = uclass_get_device_by_name(UCLASS_MISC, "esm at 42080000",
+						&dev);
+		if (ret)
+			printf("MISC init for esm at 42080000 failed: %d\n", ret);
+	}
+
+	if (IS_ENABLED(CONFIG_ESM_PMIC)) {
+		ret = uclass_get_device_by_driver(UCLASS_MISC,
+						  DM_DRIVER_GET(pmic_esm),
+						  &dev);
+		if (ret)
+			printf("ESM PMIC init failed: %d\n", ret);
+	}
 }
-- 
2.17.1



More information about the U-Boot mailing list