[PATCH 3/3] arch: arm: imx: spi: Add QSPI boot option to the IMX8MN-EVK
Joacim Zetterling
joacim.zetterling at westermo.com
Tue Mar 8 08:08:01 PST 2022
Add lowlevel board functionality to be able to boot from
a QSPI device.
Also added configuration parameters for a QSPI device to be
included in a final QSPI boot image.
All configuration for a QSPI boot image are controlled within
the board flash header configuration file.
Signed-off-by: Joacim Zetterling <joacim.zetterling at westermo.com>
---
.../nxp-imx8mn-evk/bb-cfg-param-imx8mn-evk.bin | Bin 0 -> 512 bytes
.../nxp-imx8mn-evk/flash-header-imx8mn-evk.imxcfg | 5 +++++
arch/arm/boards/nxp-imx8mn-evk/lowlevel.c | 3 +++
3 files changed, 8 insertions(+)
create mode 100644 arch/arm/boards/nxp-imx8mn-evk/bb-cfg-param-imx8mn-evk.bin
diff --git a/arch/arm/boards/nxp-imx8mn-evk/bb-cfg-param-imx8mn-evk.bin b/arch/arm/boards/nxp-imx8mn-evk/bb-cfg-param-imx8mn-evk.bin
new file mode 100644
index 0000000000000000000000000000000000000000..b39e85b8442f27660eb8d797233cdcc02759bc0e
GIT binary patch
literal 512
zcmZ>Bc5`B2U<_jb0cK_}MJmC_$b_s#0GUIG&CMdg!C}CnLP*`HJb at 5k1j&O50t!*3
E0ni%)6aWAK
literal 0
HcmV?d00001
diff --git a/arch/arm/boards/nxp-imx8mn-evk/flash-header-imx8mn-evk.imxcfg b/arch/arm/boards/nxp-imx8mn-evk/flash-header-imx8mn-evk.imxcfg
index 27a2138e4322..232ce5f59bdf 100644
--- a/arch/arm/boards/nxp-imx8mn-evk/flash-header-imx8mn-evk.imxcfg
+++ b/arch/arm/boards/nxp-imx8mn-evk/flash-header-imx8mn-evk.imxcfg
@@ -5,3 +5,8 @@ soc imx8mn
loadaddr 0x912000
max_load_size 0x3f000
ivtofs 0x0
+
+# Uncomment the following for QSPI boot
+# header_gap 0x1000
+# bb_cfg_ofs 0x400
+# bb_cfg_file "arch/arm/boards/nxp-imx8mn-evk/bb-cfg-param-imx8mn-evk.bin"
diff --git a/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c
index de53213ebc77..c8a43e48c085 100644
--- a/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c
@@ -170,6 +170,9 @@ static void start_atf(void)
case BOOTSOURCE_MMC:
imx8mn_esdhc_load_image(instance, false);
break;
+ case BOOTSOURCE_SPI:
+ imx8mn_qspi_start_image(0, false);
+ break;
default:
printf("Unhandled bootsource BOOTSOURCE_%d\n", src);
hang();
--
2.25.1
More information about the barebox
mailing list