[v3 PATCH 3/4] board: ti: j784s4: Initialize the ESM & PMIC ESM
Udit Kumar
u-kumar1 at ti.com
Sun Apr 27 09:03:22 CEST 2025
From: Keerthy <j-keerthy at ti.com>
Initialize the ESM & PMIC ESM. This allows things like
the watchdog to reset the board when tripped.
Signed-off-by: Keerthy <j-keerthy at ti.com>
Signed-off-by: Neha Malcom Francis <n-francis at ti.com>
Signed-off-by: Andrew Halaney <ahalaney at redhat.com>
---
board/ti/j784s4/evm.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/board/ti/j784s4/evm.c b/board/ti/j784s4/evm.c
index c6e46b7ee0e..c8d01bf0ca8 100644
--- a/board/ti/j784s4/evm.c
+++ b/board/ti/j784s4/evm.c
@@ -7,6 +7,7 @@
*
*/
+#include <dm.h>
#include <efi_loader.h>
#include <init.h>
#include <spl.h>
@@ -67,4 +68,27 @@ int board_late_init(void)
void spl_board_init(void)
{
+ struct udevice *dev;
+ int ret;
+
+ if (IS_ENABLED(CONFIG_ESM_K3)) {
+ const char * const esms[] = {"esm at 700000", "esm at 40800000", "esm at 42080000"};
+
+ for (int i = 0; i < ARRAY_SIZE(esms); ++i) {
+ ret = uclass_get_device_by_name(UCLASS_MISC, esms[i],
+ &dev);
+ if (ret) {
+ printf("MISC init for %s failed: %d\n", esms[i], ret);
+ break;
+ }
+ }
+ }
+
+ if (IS_ENABLED(CONFIG_ESM_PMIC) && ret == 0) {
+ 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.34.1
More information about the U-Boot
mailing list