Skip to contentSkip to conversation

board: ti: j721e: Add support for both esm probe

PATCH In review Udit Kumar 3 participants 3 messages Apr 17, 2024 – Apr 29, 2024

lore
Share & tools
lore

Udit Kumar

author
#0 lore raw

PATCH 1/1 board: ti: j721e: Add support for both esm probe

At present only MCU domain ESM is probed, this means errors occurred in mcu domain will be propagate to MCU_SAFETY_ERRORn. MCU ESM accepts SOC_SAFETY_ERRORn signal as Error event and propagate to MCU_SAFETY_ERRORn.[0]

Therefore adding support to probe both main domain and mcu domain ESM.

[0]: https://www.ti.com/lit/zip/spruil1
spruil1c.pdf from zip
Figure 12-1244. ESM Modules Overview

---
 board/ti/j721e/evm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +6 -3
index 9dc3ed6dff..539eaf4718 100644
@@ -465,10 +465,13 @@ void spl_board_init(void)
 	}
 
 	if (IS_ENABLED(CONFIG_ESM_K3)) {
-		ret = uclass_get_device_by_driver(UCLASS_MISC,
-						  DM_DRIVER_GET(k3_esm), &dev);
+		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("ESM init failed: %d\n", ret);
+			printf("MISC init for esm@40800000 failed: %d\n", ret);
 	}
 
 	if (IS_ENABLED(CONFIG_ESM_PMIC)) {
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Udit Kumar

At present only MCU domain ESM is probed, this means errors occurred in mcu domain will be propagate to MCU_SAFETY_ERRORn. MCU ESM accepts SOC_SAFETY_ERRORn signal as Error event and propagate to MCU_SAFETY_ERRORn.[0]

Therefore adding support to probe both main domain and mcu domain ESM.

Quoted 31 lines

[0]: https://www.ti.com/lit/zip/spruil1
spruil1c.pdf from zip
Figure 12-1244. ESM Modules Overview

---
  board/ti/j721e/evm.c | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +6 -3
index 9dc3ed6dff..539eaf4718 100644
@@ -465,10 +465,13 @@ void spl_board_init(void)
  	}
 
  	if (IS_ENABLED(CONFIG_ESM_K3)) {
-		ret = uclass_get_device_by_driver(UCLASS_MISC,
-						  DM_DRIVER_GET(k3_esm), &dev);
+		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("ESM init failed: %d\n", ret);
+			printf("MISC init for esm@40800000 failed: %d\n", ret);
  	}
 
  	if (IS_ENABLED(CONFIG_ESM_PMIC)) {
#2 lore raw
In reply to Udit Kumar
Quoted 9 lines · Udit Kumar

At present only MCU domain ESM is probed, this means errors occurred in mcu domain will be propagate to MCU_SAFETY_ERRORn. MCU ESM accepts SOC_SAFETY_ERRORn signal as Error event and propagate to MCU_SAFETY_ERRORn.[0]

Therefore adding support to probe both main domain and mcu domain ESM.

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom