* [PATCH 1/3] board: ti: j721s2: Initialize the ESM & PMIC ESM
2024-11-26 5:34 [PATCH 0/3] J721S2: Enable ESMs and related PMIC Udit Kumar
@ 2024-11-26 5:34 ` Udit Kumar
2024-11-26 5:34 ` [PATCH 2/3] arch: arm: dts: k3-j721s2-r5-common-proc-board: Add esm node Udit Kumar
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Udit Kumar @ 2024-11-26 5:34 UTC (permalink / raw)
To: trini, vigneshr
Cc: n-francis, u-boot, nm, m-chawdhry, j-keerthy, p-mantena,
j-choudhary, Udit Kumar
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);
+ }
}
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/3] arch: arm: dts: k3-j721s2-r5-common-proc-board: Add esm node
2024-11-26 5:34 [PATCH 0/3] J721S2: Enable ESMs and related PMIC Udit Kumar
2024-11-26 5:34 ` [PATCH 1/3] board: ti: j721s2: Initialize the ESM & PMIC ESM Udit Kumar
@ 2024-11-26 5:34 ` Udit Kumar
2024-11-26 5:34 ` [PATCH 3/3] configs: j721s2_evm_r5_defconfig: Add ESM configs Udit Kumar
2024-12-13 23:16 ` [PATCH 0/3] J721S2: Enable ESMs and related PMIC Tom Rini
3 siblings, 0 replies; 5+ messages in thread
From: Udit Kumar @ 2024-11-26 5:34 UTC (permalink / raw)
To: trini, vigneshr
Cc: n-francis, u-boot, nm, m-chawdhry, j-keerthy, p-mantena,
j-choudhary
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 {
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] configs: j721s2_evm_r5_defconfig: Add ESM configs
2024-11-26 5:34 [PATCH 0/3] J721S2: Enable ESMs and related PMIC Udit Kumar
2024-11-26 5:34 ` [PATCH 1/3] board: ti: j721s2: Initialize the ESM & PMIC ESM Udit Kumar
2024-11-26 5:34 ` [PATCH 2/3] arch: arm: dts: k3-j721s2-r5-common-proc-board: Add esm node Udit Kumar
@ 2024-11-26 5:34 ` Udit Kumar
2024-12-13 23:16 ` [PATCH 0/3] J721S2: Enable ESMs and related PMIC Tom Rini
3 siblings, 0 replies; 5+ messages in thread
From: Udit Kumar @ 2024-11-26 5:34 UTC (permalink / raw)
To: trini, vigneshr
Cc: n-francis, u-boot, nm, m-chawdhry, j-keerthy, p-mantena,
j-choudhary
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
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] J721S2: Enable ESMs and related PMIC
2024-11-26 5:34 [PATCH 0/3] J721S2: Enable ESMs and related PMIC Udit Kumar
` (2 preceding siblings ...)
2024-11-26 5:34 ` [PATCH 3/3] configs: j721s2_evm_r5_defconfig: Add ESM configs Udit Kumar
@ 2024-12-13 23:16 ` Tom Rini
3 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2024-12-13 23:16 UTC (permalink / raw)
To: vigneshr, Udit Kumar
Cc: n-francis, u-boot, nm, m-chawdhry, j-keerthy, p-mantena,
j-choudhary
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-j721s2-L2708
>
> [...]
Applied to u-boot/next, thanks!
--
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread