[PATCH v2 0/3] 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

Put imx9_probe_mu declaration in a new mu.h header file.
Signed-off-by: Mathieu Othacehe othacehe@gnu.org --- 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
diff --git a/arch/arm/include/asm/arch-imx9/mu.h b/arch/arm/include/asm/arch-imx9/mu.h new file mode 100644 index 00000000000..b8604992914 --- /dev/null +++ b/arch/arm/include/asm/arch-imx9/mu.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2024 Mathieu Othacehe m.othacehe@gmail.com + */ + +#ifndef __ARCH_IMX9_MU_H +#define __ARCH_IMX9_MU_H + +#include <event.h> + +int imx9_probe_mu(void *ctx, struct event *event); + +#endif diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c index be9c24fc0d9..a98ed69db88 100644 --- a/board/freescale/imx93_evk/spl.c +++ b/board/freescale/imx93_evk/spl.c @@ -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; diff --git a/board/phytec/phycore_imx93/spl.c b/board/phytec/phycore_imx93/spl.c index da4b9e53594..dabc5316f33 100644 --- a/board/phytec/phycore_imx93/spl.c +++ b/board/phytec/phycore_imx93/spl.c @@ -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;

On Fri, Feb 9, 2024 at 1:05 PM Mathieu Othacehe othacehe@gnu.org wrote:
Put imx9_probe_mu declaration in a new mu.h header file.
Signed-off-by: Mathieu Othacehe othacehe@gnu.org
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
diff --git a/arch/arm/include/asm/arch-imx9/mu.h b/arch/arm/include/asm/arch-imx9/mu.h new file mode 100644 index 00000000000..b8604992914 --- /dev/null +++ b/arch/arm/include/asm/arch-imx9/mu.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/*
- Copyright (C) 2024 Mathieu Othacehe m.othacehe@gmail.com
- */
+#ifndef __ARCH_IMX9_MU_H +#define __ARCH_IMX9_MU_H
+#include <event.h>
+int imx9_probe_mu(void *ctx, struct event *event);
+#endif diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c index be9c24fc0d9..a98ed69db88 100644 --- a/board/freescale/imx93_evk/spl.c +++ b/board/freescale/imx93_evk/spl.c @@ -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; diff --git a/board/phytec/phycore_imx93/spl.c b/board/phytec/phycore_imx93/spl.c index da4b9e53594..dabc5316f33 100644 --- a/board/phytec/phycore_imx93/spl.c +++ b/board/phytec/phycore_imx93/spl.c @@ -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; -- 2.41.0
Reviewed-by: Igor Opaniuk igor.opaniuk@foundries.io

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
Signed-off-by: Mathieu Othacehe othacehe@gnu.org --- board/variscite/imx93_var_som/spl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/board/variscite/imx93_var_som/spl.c b/board/variscite/imx93_var_som/spl.c index 502e599b91a..e6db4eb562b 100644 --- a/board/variscite/imx93_var_som/spl.c +++ b/board/variscite/imx93_var_som/spl.c @@ -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);

Enable AHAB support in the imx93_var_som configuration.
Signed-off-by: Mathieu Othacehe othacehe@gnu.org --- configs/imx93_var_som_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/imx93_var_som_defconfig b/configs/imx93_var_som_defconfig index cc0c5a79bc1..14922f2a3e2 100644 --- a/configs/imx93_var_som_defconfig +++ b/configs/imx93_var_som_defconfig @@ -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

On Fri, Feb 9, 2024 at 7:30 AM Mathieu Othacehe othacehe@gnu.org wrote:
Hello,
In this v2, I moved imx93_probe_mu to a dedicated header.
Applied all, thanks.
participants (3)
-
Fabio Estevam
-
Igor Opaniuk
-
Mathieu Othacehe