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>
This commit is contained in:
Keerthy 2023-10-09 14:12:56 +05:30 committed by Udit Kumar
parent 4950c95812
commit 4bebf41036
1 changed files with 27 additions and 0 deletions

View File

@ -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 */