J721S2: Enable ESMs and related PMIC
cover 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-j721s2-L2708
AM68 boot (this does not support WDT)
https://gist.github.com/uditkumarti/93cfe863d1f3fe3abb82b1821105f274#file-am68
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(+)
Signature · 1 line
2.34.1
PATCH 1/3 board: ti: j721s2: Initialize the ESM & PMIC ESM
From: Keerthy <[email protected]>
Initialize the 3 instances of SOC ESM & PMIC ESM.
This is needed for watchdog functionality.
--- board/ti/j721s2/evm.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
board/ti/j721s2/evm.c +23 -0
@@ -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); + } }
Signature · 1 line
2.34.1
PATCH 2/3 arch: arm: dts: k3-j721s2-r5-common-proc-board: Add esm node
In reply to Udit KumarFrom: Manorit Chawdhry <[email protected]>
Add esm node for j721s2.
--- arch/arm/dts/k3-j721s2-r5-common-proc-board.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/dts/k3-j721s2-r5-common-proc-board.dts +4 -0
@@ -13,6 +13,10 @@ &tps659411 { bootph-pre-ram; + esm: esm { + compatible = "ti,tps659413-esm"; + bootph-pre-ram; + }; }; &wkup_vtm0 {
Signature · 1 line
2.34.1
PATCH 3/3 configs: j721s2_evm_r5_defconfig: Add ESM configs
In reply to Udit KumarFrom: Manorit Chawdhry <[email protected]>
Enables ESM configs for j721s2 and disables them for AM68 as AM68 includes J721s2 configs by default.
--- configs/am68_sk_r5_defconfig | 2 ++ configs/j721s2_evm_r5_defconfig | 2 ++ 2 files changed, 4 insertions(+)
configs/am68_sk_r5_defconfig +2 -0
@@ -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
configs/j721s2_evm_r5_defconfig +2 -0
@@ -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
Signature · 1 line
2.34.1
Quoted 8 lines · Udit Kumar
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-j721s2-L2708[...]
Applied to u-boot/next, thanks!
Signature · 1 line
Tom