diff options
| author | Tom Rini <[email protected]> | 2024-12-13 14:12:46 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-12-13 14:12:46 -0600 |
| commit | 6b34e2e7bdadbba7e47ed5d334beba4af27682f1 (patch) | |
| tree | 3d9be983f1bf21c4a6d3b6e084ccf2c78cea161e /board | |
| parent | b83ac2a54126aef3d0ff16c0b588479ebd70a8b1 (diff) | |
| parent | 0195d81ed7ddccd00dbe164e0ed23d2ebadbeb2e (diff) | |
Merge patch series "J721S2: Enable ESMs and related PMIC"
Udit Kumar <[email protected]> says:
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
Link: https://lore.kernel.org/r/[email protected]
[trini: Merge configs/am68_sk_r5_defconfig]
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'board')
| -rw-r--r-- | board/ti/j721s2/evm.c | 23 |
1 files changed, 23 insertions, 0 deletions
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); + } } |
