diff options
author | Tom Rini <trini@konsulko.com> | 2025-05-02 14:24:21 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-05-02 15:32:45 -0600 |
commit | 0c8a89d252c3db3401ffa572ee2e4dfcb94e2c3b (patch) | |
tree | 9aeeefff22677313c80ac2323e1c1f0712e96817 | |
parent | 0b78c2756262b73d037ab16f8ea5d6ef007bd854 (diff) | |
parent | 8de75de3e4529803030e2763d98db3e5aaf6b956 (diff) |
Merge patch series "k3-j784s4*: Enable ESMs and related PMIC"
Udit Kumar <u-kumar1@ti.com> says:
This series enables the ESMs and the associated PMIC. Programming these bits is
a requirement to make the watchdog actually reset the board.
Series supports WDT reset on all TI platforms based upon J784S4 SOC
including cut down (J742S2).
Bootlogs for reset
AM69: https://gist.github.com/uditkumarti/dca2171aafd6d50c82159346f9a0102f#file-am69-L2466
J784S4: https://gist.github.com/uditkumarti/dca2171aafd6d50c82159346f9a0102f#file-j784s4-L2704
J742S2: https://gist.github.com/uditkumarti/dca2171aafd6d50c82159346f9a0102f#file-j742s2-L2614
Link: https://lore.kernel.org/r/20250427070323.590449-1-u-kumar1@ti.com
-rw-r--r-- | arch/arm/dts/k3-am69-r5-sk.dts | 7 | ||||
-rw-r--r-- | arch/arm/dts/k3-j784s4-r5-evm.dts | 7 | ||||
-rw-r--r-- | board/ti/j784s4/evm.c | 24 | ||||
-rw-r--r-- | configs/j784s4_evm_r5_defconfig | 5 |
4 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/dts/k3-am69-r5-sk.dts b/arch/arm/dts/k3-am69-r5-sk.dts index 9c6e324ba29..e8362647c5d 100644 --- a/arch/arm/dts/k3-am69-r5-sk.dts +++ b/arch/arm/dts/k3-am69-r5-sk.dts @@ -10,3 +10,10 @@ #include "k3-j784s4-ddr.dtsi" #include "k3-am69-sk-u-boot.dtsi" #include "k3-j784s4-r5.dtsi" + +&tps659413 { + esm: esm { + compatible = "ti,tps659413-esm"; + bootph-pre-ram; + }; +}; diff --git a/arch/arm/dts/k3-j784s4-r5-evm.dts b/arch/arm/dts/k3-j784s4-r5-evm.dts index 0eeffa78740..fc20438261c 100644 --- a/arch/arm/dts/k3-j784s4-r5-evm.dts +++ b/arch/arm/dts/k3-j784s4-r5-evm.dts @@ -10,3 +10,10 @@ #include "k3-j784s4-ddr.dtsi" #include "k3-j784s4-evm-u-boot.dtsi" #include "k3-j784s4-r5.dtsi" + +&tps659413 { + esm: esm { + compatible = "ti,tps659413-esm"; + bootph-pre-ram; + }; +}; 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@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); + } } diff --git a/configs/j784s4_evm_r5_defconfig b/configs/j784s4_evm_r5_defconfig index 5a5b0458b9b..8e5b777526b 100644 --- a/configs/j784s4_evm_r5_defconfig +++ b/configs/j784s4_evm_r5_defconfig @@ -125,6 +125,11 @@ CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_SINGLE=y CONFIG_POWER_DOMAIN=y CONFIG_TI_POWER_DOMAIN=y +CONFIG_ESM_K3=y +CONFIG_ESM_PMIC=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_TPS65941=y +CONFIG_DM_REGULATOR_TPS65941=y CONFIG_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR_TPS6287X=y |