[PATCH 0/3] J721S2: Enable ESMs and related PMIC

This enables the ESMs and the associated PMIC. Programming these bits is a requirement to make the watchdog actually reset the board.
Logs WDT reset J721S2 https://gist.github.com/uditkumarti/93cfe863d1f3fe3abb82b1821105f274#file-j7...
AM68 boot (this does not support WDT) https://gist.github.com/uditkumarti/93cfe863d1f3fe3abb82b1821105f274#file-am...
Keerthy (1): board: ti: j721s2: Initialize the ESM & PMIC ESM
Manorit Chawdhry (2): arch: arm: dts: k3-j721s2-r5-common-proc-board: Add esm node configs: j721s2_evm_r5_defconfig: Add ESM configs
.../dts/k3-j721s2-r5-common-proc-board.dts | 4 ++++ board/ti/j721s2/evm.c | 23 +++++++++++++++++++ configs/am68_sk_r5_defconfig | 2 ++ configs/j721s2_evm_r5_defconfig | 2 ++ 4 files changed, 31 insertions(+)

From: Keerthy j-keerthy@ti.com
Initialize the 3 instances of SOC ESM & PMIC ESM. This is needed for watchdog functionality.
Signed-off-by: Keerthy j-keerthy@ti.com Signed-off-by: Udit Kumar u-kumar1@ti.com --- board/ti/j721s2/evm.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c index 2cfeb3bec6c..9bcf67b7bfb 100644 --- a/board/ti/j721s2/evm.c +++ b/board/ti/j721s2/evm.c @@ -326,4 +326,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@700000", "esm@40800000", "esm@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); + } }

From: Manorit Chawdhry m-chawdhry@ti.com
Add esm node for j721s2.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- arch/arm/dts/k3-j721s2-r5-common-proc-board.dts | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts b/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts index 506ad9b7910..09afdf3954a 100644 --- a/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts +++ b/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts @@ -13,6 +13,10 @@
&tps659411 { bootph-pre-ram; + esm: esm { + compatible = "ti,tps659413-esm"; + bootph-pre-ram; + }; };
&wkup_vtm0 {

From: Manorit Chawdhry m-chawdhry@ti.com
Enables ESM configs for j721s2 and disables them for AM68 as AM68 includes J721s2 configs by default.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- configs/am68_sk_r5_defconfig | 2 ++ configs/j721s2_evm_r5_defconfig | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/configs/am68_sk_r5_defconfig b/configs/am68_sk_r5_defconfig index f4800ef1b8a..5e5f7bf7ceb 100644 --- a/configs/am68_sk_r5_defconfig +++ b/configs/am68_sk_r5_defconfig @@ -5,7 +5,9 @@ CONFIG_ARCH_K3=y CONFIG_SOC_K3_J721S2=y CONFIG_TARGET_J721S2_R5_EVM=y
+CONFIG_ESM_K3=n CONFIG_K3_AVS0=n +CONFIG_ESM_PMIC=n CONFIG_DM_REGULATOR_TPS65941=n CONFIG_PMIC_TPS65941=n
diff --git a/configs/j721s2_evm_r5_defconfig b/configs/j721s2_evm_r5_defconfig index f4441d6667e..23ae991e2f6 100644 --- a/configs/j721s2_evm_r5_defconfig +++ b/configs/j721s2_evm_r5_defconfig @@ -111,7 +111,9 @@ CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y CONFIG_FS_LOADER=y CONFIG_SPL_FS_LOADER=y +CONFIG_ESM_K3=y CONFIG_K3_AVS0=y +CONFIG_ESM_PMIC=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_SPL_MMC_HS400_SUPPORT=y CONFIG_MMC_SDHCI=y

On Tue, 26 Nov 2024 11:04:23 +0530, Udit Kumar wrote:
This enables the ESMs and the associated PMIC. Programming these bits is a requirement to make the watchdog actually reset the board.
Logs WDT reset J721S2 https://gist.github.com/uditkumarti/93cfe863d1f3fe3abb82b1821105f274#file-j7...
[...]
Applied to u-boot/next, thanks!
participants (2)
-
Tom Rini
-
Udit Kumar