Skip to contentSkip to conversation

imx93_var_som: Enable AHAB support

PATCH Applied Mathieu Othacehe 3 participants 6 messages Feb 9, 2024 – Feb 12, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover imx93_var_som: Enable AHAB support

Hello,

In this v2, I moved imx93_probe_mu to a dedicated header.

Thanks,

Mathieu

Changelog:
v2: Move imx93_probe_mu declaration to a header file

Link to the previous revision:
v1: https://lists.denx.de/pipermail/u-boot/2024-February/545528.html

Mathieu Othacehe (3):
imx93: Use a header for imx9_probe_mu declaration
board: imx93_var_som: Probe ELE MU
configs: imx93_var_som: Enable AHAB support

 arch/arm/include/asm/arch-imx9/mu.h | 13 +++++++++++++
 board/freescale/imx93_evk/spl.c     |  2 +-
 board/phytec/phycore_imx93/spl.c    |  2 +-
 board/variscite/imx93_var_som/spl.c |  5 +++--
 configs/imx93_var_som_defconfig     |  1 +
 5 files changed, 19 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-imx9/mu.h
Signature · 1 line
2.41.0
#1 lore raw

PATCH v2 1/3 imx93: Use a header for imx9_probe_mu declaration

Put imx9_probe_mu declaration in a new mu.h header file.

---
 arch/arm/include/asm/arch-imx9/mu.h | 13 +++++++++++++
 board/freescale/imx93_evk/spl.c     |  2 +-
 board/phytec/phycore_imx93/spl.c    |  2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-imx9/mu.h
arch/arm/include/asm/arch-imx9/mu.h new file +13 -0
new file mode 100644
index 00000000000..b8604992914
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2024 Mathieu Othacehe <[email protected]>
+ */
+
+#ifndef __ARCH_IMX9_MU_H
+#define __ARCH_IMX9_MU_H
+
+#include <event.h>
+
+int imx9_probe_mu(void *ctx, struct event *event);
+
+#endif
board/freescale/imx93_evk/spl.c +1 -1
index be9c24fc0d9..a98ed69db88 100644
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx93_pins.h>
+#include <asm/arch/mu.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
@@ -91,7 +92,6 @@ int power_init_board(void)
 }
 #endif
 
-extern int imx9_probe_mu(void *ctx, struct event *event);
 void board_init_f(ulong dummy)
 {
 	int ret;
board/phytec/phycore_imx93/spl.c +1 -1
index da4b9e53594..dabc5316f33 100644
@@ -7,6 +7,7 @@
 
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr.h>
+#include <asm/arch/mu.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/trdc.h>
 #include <asm/mach-imx/boot_mode.h>
@@ -99,7 +100,6 @@ int power_init_board(void)
 	return 0;
 }
 
-extern int imx9_probe_mu(void *ctx, struct event *event);
 void board_init_f(ulong dummy)
 {
 	int ret;
Signature · 1 line
2.41.0
#3 lore raw

PATCH v2 2/3 board: imx93_var_som: Probe ELE MU

In reply to Mathieu Othacehe

Probing the MU is needed to prevent this error in the SPL:

ele dev is not initialized
Authenticate container hdr failed, return -19, resp 0x0 IND = INVALID

ele dev is not initialized
Error: release container failed, resp 0x0!
IND = INVALID

SPL: failed to boot from all boot devices

---
 board/variscite/imx93_var_som/spl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
board/variscite/imx93_var_som/spl.c +3 -2
index 502e599b91a..e6db4eb562b 100644
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx93_pins.h>
+#include <asm/arch/mu.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
@@ -114,9 +115,9 @@ void board_init_f(ulong dummy)
 
 	preloader_console_init();
 
-	ret = arch_cpu_init();
+	ret = imx9_probe_mu(NULL, NULL);
 	if (ret) {
-		printf("Fail to init Sentinel API\n");
+		printf("Fail to init ELE API\n");
 	} else {
 		printf("SOC: 0x%x\n", gd->arch.soc_rev);
 		printf("LC: 0x%x\n", gd->arch.lifecycle);
Signature · 1 line
2.41.0
#4 lore raw

PATCH v2 3/3 configs: imx93_var_som: Enable AHAB support

In reply to Mathieu Othacehe

Enable AHAB support in the imx93_var_som configuration.

---
 configs/imx93_var_som_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/imx93_var_som_defconfig +1 -0
index cc0c5a79bc1..14922f2a3e2 100644
@@ -12,6 +12,7 @@ CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx9/imximage.cfg"
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="imx93-var-som-symphony"
 CONFIG_SPL_TEXT_BASE=0x2049A000
+CONFIG_AHAB_BOOT=y
 CONFIG_TARGET_IMX93_VAR_SOM=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_SPL_SERIAL=y
Signature · 1 line
2.41.0
Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] imx93: Use a header for imx9_probe_mu declaration

In reply to Mathieu Othacehe
Quoted 71 lines · Mathieu Othacehe

Put imx9_probe_mu declaration in a new mu.h header file.

---
 arch/arm/include/asm/arch-imx9/mu.h | 13 +++++++++++++
 board/freescale/imx93_evk/spl.c     |  2 +-
 board/phytec/phycore_imx93/spl.c    |  2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-imx9/mu.h
arch/arm/include/asm/arch-imx9/mu.h new file +13 -0
new file mode 100644
index 00000000000..b8604992914
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2024 Mathieu Othacehe <[email protected]>
+ */
+
+#ifndef __ARCH_IMX9_MU_H
+#define __ARCH_IMX9_MU_H
+
+#include <event.h>
+
+int imx9_probe_mu(void *ctx, struct event *event);
+
+#endif
board/freescale/imx93_evk/spl.c +1 -1
index be9c24fc0d9..a98ed69db88 100644
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx93_pins.h>
+#include <asm/arch/mu.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
@@ -91,7 +92,6 @@ int power_init_board(void)
 }
 #endif
 
-extern int imx9_probe_mu(void *ctx, struct event *event);
 void board_init_f(ulong dummy)
 {
        int ret;
board/phytec/phycore_imx93/spl.c +1 -2
index da4b9e53594..dabc5316f33 100644
@@ -7,6 +7,7 @@
 
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr.h>
+#include <asm/arch/mu.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/trdc.h>
 #include <asm/mach-imx/boot_mode.h>
@@ -99,7 +100,6 @@ int power_init_board(void)
        return 0;
 }
 
-extern int imx9_probe_mu(void *ctx, struct event *event);
 void board_init_f(ulong dummy)
 {
        int ret;
--
Quoted 2 lines

2.41.0

Signature · 6 lines
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk
Senior Software Engineer, Embedded & Security
E: [email protected]
W: www.foundries.io