diff options
author | Keerthy <j-keerthy@ti.com> | 2023-10-09 14:12:56 +0530 |
---|---|---|
committer | Udit Kumar <u-kumar1@ti.com> | 2023-10-09 14:17:44 +0530 |
commit | 4bebf410366766c8c61947e033c9acf3f153b940 (patch) | |
tree | 46bfbde0c8b671327368226694a2de796d6dd586 /board/ti/j721s2/evm.c | |
parent | 4950c95812802fe9172f7d9c8ec0d8bd57536d2a (diff) |
board: ti: j721s2: Initialize the ESM & PMIC ESM
Initialize the 3 instances of SOC ESM & PMIC ESM.
This is needed for watchdog functionality.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Diffstat (limited to 'board/ti/j721s2/evm.c')
-rw-r--r-- | board/ti/j721s2/evm.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c index 7361f387c7..eea2c256b3 100644 --- a/board/ti/j721s2/evm.c +++ b/board/ti/j721s2/evm.c @@ -388,6 +388,33 @@ ofnode cadence_qspi_get_subnode(struct udevice *dev) void spl_board_init(void) { + struct udevice *dev; + int ret; + + if (IS_ENABLED(CONFIG_ESM_K3)) { + ret = uclass_get_device_by_name(UCLASS_MISC, "esm@700000", + &dev); + if (ret) + printf("MISC init for esm@700000 failed: %d\n", ret); + + ret = uclass_get_device_by_name(UCLASS_MISC, "esm@40800000", + &dev); + if (ret) + printf("MISC init for esm@40800000 failed: %d\n", ret); + + ret = uclass_get_device_by_name(UCLASS_MISC, "esm@42080000", + &dev); + if (ret) + printf("MISC init for esm@42080000 failed: %d\n", ret); + } + + if (IS_ENABLED(CONFIG_ESM_PMIC) && !board_is_am68_sk_som()) { + ret = uclass_get_device_by_driver(UCLASS_MISC, + DM_DRIVER_GET(pmic_esm), + &dev); + if (ret) + printf("ESM PMIC init failed: %d\n", ret); + } } /* Support for the various EVM / SK families */ |