[PATCH 1/8] arm: mach-k3: j721e_init: initialize ESM support
Neha Malcom Francis
n-francis at ti.com
Mon Apr 10 16:15:39 CEST 2023
From: Tero Kristo <t-kristo at ti.com>
Initialize both ESM and ESM_PMIC support if available for the board.
If support is not available for either, a warning is printed out.
Signed-off-by: Tero Kristo <t-kristo at ti.com>
Signed-off-by: Gowtham Tammana <g-tammana at ti.com>
Signed-off-by: Neha Malcom Francis <n-francis at ti.com>
---
arch/arm/mach-k3/j721e_init.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index 9cae3ac67e..b22530f39d 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -23,6 +23,7 @@
#include <fdtdec.h>
#include <mmc.h>
#include <remoteproc.h>
+#include "../../../board/ti/common/board_detect.h"
#ifdef CONFIG_K3_LOAD_SYSFW
struct fwl_data cbass_hc_cfg0_fwls[] = {
@@ -189,7 +190,8 @@ void do_dt_magic(void)
void board_init_f(ulong dummy)
{
-#if defined(CONFIG_K3_J721E_DDRSS) || defined(CONFIG_K3_LOAD_SYSFW)
+#if defined(CONFIG_K3_J721E_DDRSS) || defined(CONFIG_K3_LOAD_SYSFW) || \
+ defined(CONFIG_ESM_K3) || defined(CONFIG_ESM_PMIC)
struct udevice *dev;
int ret;
#endif
@@ -277,6 +279,25 @@ void board_init_f(ulong dummy)
printf("AVS init failed: %d\n", ret);
#endif
+#ifdef CONFIG_ESM_K3
+ if (board_ti_k3_is("J721EX-PM2-SOM")) {
+ ret = uclass_get_device_by_driver(UCLASS_MISC,
+ DM_DRIVER_GET(k3_esm), &dev);
+ if (ret)
+ printf("MISC init failed: %d\n", ret);
+ }
+#endif
+
+#ifdef CONFIG_ESM_PMIC
+ if (board_ti_k3_is("J721EX-PM2-SOM")) {
+ ret = uclass_get_device_by_driver(UCLASS_MISC,
+ DM_DRIVER_GET(pmic_esm),
+ &dev);
+ if (ret)
+ printf("ESM PMIC init failed: %d\n", ret);
+ }
+#endif
+
#if defined(CONFIG_K3_J721E_DDRSS)
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret)
--
2.34.1
More information about the U-Boot
mailing list