* [PATCH 1/3] arm: dts: mediatek: prepare Genio 520 and 720 SPI NOR for SPL
2026-11-17 0:05 [PATCH 0/3] mediatek: mt8189: add SPI NOR boot for Genio 520 and 720 SPL David Lechner
@ 2026-11-17 0:05 ` David Lechner
2026-11-17 0:05 ` [PATCH 2/3] board: mediatek: add a Genio 520/720 SPI NOR boot config fragment David Lechner
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: David Lechner @ 2026-11-17 0:05 UTC (permalink / raw)
To: Macpaul Lin, Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon,
Julien Stephan, GSS_MTK_Uboot_upstream, Tom Rini,
Ilias Apalodimas
Cc: Carlo Caione, u-boot, David Lechner
Mark the SPI NOR controller, the flash and its pins for SPL, so that
SPL can load the firmware FIT from SPI NOR.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
arch/arm/dts/mt8371-genio-common-u-boot.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/dts/mt8371-genio-common-u-boot.dtsi b/arch/arm/dts/mt8371-genio-common-u-boot.dtsi
index 7f614323c93..7785400384e 100644
--- a/arch/arm/dts/mt8371-genio-common-u-boot.dtsi
+++ b/arch/arm/dts/mt8371-genio-common-u-boot.dtsi
@@ -79,6 +79,14 @@
bootph-pre-ram;
};
+&nor_flash {
+ bootph-pre-ram;
+
+ flash@0 {
+ bootph-pre-ram;
+ };
+};
+
&mmc0_default_pins {
bootph-pre-ram;
@@ -115,6 +123,18 @@
};
};
+&nor_pins {
+ bootph-pre-ram;
+
+ pins-ck-io {
+ bootph-pre-ram;
+ };
+
+ pins-cs {
+ bootph-pre-ram;
+ };
+};
+
&uart0_pins {
bootph-pre-ram;
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/3] board: mediatek: add a Genio 520/720 SPI NOR boot config fragment
2026-11-17 0:05 [PATCH 0/3] mediatek: mt8189: add SPI NOR boot for Genio 520 and 720 SPL David Lechner
2026-11-17 0:05 ` [PATCH 1/3] arm: dts: mediatek: prepare Genio 520 and 720 SPI NOR for SPL David Lechner
@ 2026-11-17 0:05 ` David Lechner
2026-11-17 0:05 ` [PATCH 3/3] doc: board: mediatek: describe booting Genio 520 and 720 from SPI NOR David Lechner
2026-11-17 9:57 ` [PATCH 0/3] mediatek: mt8189: add SPI NOR boot for Genio 520 and 720 SPL Carlo Caione
3 siblings, 0 replies; 5+ messages in thread
From: David Lechner @ 2026-11-17 0:05 UTC (permalink / raw)
To: Macpaul Lin, Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon,
Julien Stephan, GSS_MTK_Uboot_upstream, Tom Rini,
Ilias Apalodimas
Cc: Carlo Caione, u-boot, David Lechner
Add a config fragment that builds SPL for booting the Genio 520 and 720
EVKs from SPI NOR. It sets the BootROM image header to NOR and makes SPL
load the firmware FIT from offset 0x200000 of the flash, right after the
2 MiB reserved for the BootROM image. SPI NOR has no partition table, so
the offset is fixed.
Disable MMC in SPL. SPL picks SPI NOR first anyway, so MMC is not needed
and leaving it out keeps SPL small.
Use the fragment together with the board defconfig, for example:
make mt8391_genio_720_evk_defconfig mt8189-genio-spl-nor.config
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
board/mediatek/MAINTAINERS | 1 +
board/mediatek/mt8189-genio-spl-nor.config | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/board/mediatek/MAINTAINERS b/board/mediatek/MAINTAINERS
index fabeb18300c..e59d6efc6e6 100644
--- a/board/mediatek/MAINTAINERS
+++ b/board/mediatek/MAINTAINERS
@@ -7,6 +7,7 @@ F: arch/arm/dts/mt8391-genio-*
F: arch/arm/dts/mtk-genio-*-binman.dtsi
F: arch/arm/dts/mtk-genio-binman.dtsi
F: board/mediatek/genio-boot-images.config
+F: board/mediatek/mt8189-genio-spl-nor.config
F: board/mediatek/mt8189-genio-spl-ufs.config
F: board/mediatek/mtk-ufs-rpmb.config
F: configs/mt8189.config
diff --git a/board/mediatek/mt8189-genio-spl-nor.config b/board/mediatek/mt8189-genio-spl-nor.config
new file mode 100644
index 00000000000..cf6072b0a85
--- /dev/null
+++ b/board/mediatek/mt8189-genio-spl-nor.config
@@ -0,0 +1,12 @@
+# Boot the Genio 520 and 720 EVKs from SPI NOR instead of eMMC when using SPL.
+# Use with the board defconfig, for example:
+# make mt8391_genio_720_evk_defconfig mt8189-genio-spl-nor.config
+CONFIG_SPL_DM_SPI=y
+CONFIG_SPL_DM_SPI_FLASH=y
+CONFIG_SPL_SPI=y
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI_LOAD=y
+# The firmware FIT follows the 2 MiB reserved for the BootROM image.
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x200000
+# CONFIG_SPL_MMC is not set
+CONFIG_MTK_BROM_HEADER_INFO="media=nor;arm64=1"
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] doc: board: mediatek: describe booting Genio 520 and 720 from SPI NOR
2026-11-17 0:05 [PATCH 0/3] mediatek: mt8189: add SPI NOR boot for Genio 520 and 720 SPL David Lechner
2026-11-17 0:05 ` [PATCH 1/3] arm: dts: mediatek: prepare Genio 520 and 720 SPI NOR for SPL David Lechner
2026-11-17 0:05 ` [PATCH 2/3] board: mediatek: add a Genio 520/720 SPI NOR boot config fragment David Lechner
@ 2026-11-17 0:05 ` David Lechner
2026-11-17 9:57 ` [PATCH 0/3] mediatek: mt8189: add SPI NOR boot for Genio 520 and 720 SPL Carlo Caione
3 siblings, 0 replies; 5+ messages in thread
From: David Lechner @ 2026-11-17 0:05 UTC (permalink / raw)
To: Macpaul Lin, Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon,
Julien Stephan, GSS_MTK_Uboot_upstream, Tom Rini,
Ilias Apalodimas
Cc: Carlo Caione, u-boot, David Lechner
Describe how to build and install the firmware images for booting the
Genio 520 and 720 EVKs from SPI NOR with U-Boot SPL. This needs the SPI
NOR config fragment and a DDR loader built for SPI NOR. The devicetree
still follows the storage that holds the operating system.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
doc/board/mediatek/mt8189-genio-evk.rst | 34 +++++++++++++++++++++++++++++----
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/doc/board/mediatek/mt8189-genio-evk.rst b/doc/board/mediatek/mt8189-genio-evk.rst
index 897dbd7cf81..d33ac8ccab1 100644
--- a/doc/board/mediatek/mt8189-genio-evk.rst
+++ b/doc/board/mediatek/mt8189-genio-evk.rst
@@ -106,6 +106,15 @@ variant of the devicetree, as shown below. The BootROM then loads
``bootloaders.img`` from GPT partition 1 of the main UFS logical unit, which
is SCSI device 2. SPL is built without MMC support in this configuration.
+To boot from SPI NOR, set the DIP switches and jumpers for SPI NOR and add the
+``mt8189-genio-spl-nor.config`` fragment to the configuration. The BootROM
+then loads ``mtk-boot.bin`` from the start of the SPI NOR flash, and SPL loads
+``bootloaders.img`` from offset ``0x200000`` of the flash, which is
+``CONFIG_SYS_SPI_U_BOOT_OFFS``. SPI NOR has no on-flash partition table, so
+this offset is fixed. SPL is built without MMC support in this configuration.
+Select the devicetree for the storage that holds the operating system, eMMC or
+UFS.
+
DRAM description
~~~~~~~~~~~~~~~~
@@ -279,6 +288,14 @@ UFS devicetree and pass the directory holding the DDR loader built for UFS::
Use ``DEVICE_TREE=mt8371-genio-520-evk-ufs`` for Genio 520.
+To boot from SPI NOR, merge the SPI NOR fragment into the configuration and
+pass the directory holding the DDR loader built for SPI NOR. Add the
+``DEVICE_TREE`` setting for UFS if the operating system is on UFS::
+
+ $ make mt8391_genio_720_evk_defconfig genio-boot-images.config \
+ mt8189-genio-spl-nor.config
+ $ make BINMAN_INDIRS=/path/to/nor-firmware
+
Binman produces two deployable images and one intermediate payload in the
build directory:
@@ -308,10 +325,12 @@ Use the board provisioning tools to place the images as follows:
=================== ================================================
Image Destination
=================== ================================================
-``mtk-boot.bin`` Start of the eMMC boot0 hardware partition, or of
- the UFS boot logical unit
-``bootloaders.img`` GPT partition 1 in the eMMC user area, or on the
- main UFS logical unit
+``mtk-boot.bin`` Start of the eMMC boot0 hardware partition, of
+ the UFS boot logical unit, or of the SPI NOR
+ flash
+``bootloaders.img`` GPT partition 1 in the eMMC user area or on the
+ main UFS logical unit, or at offset ``0x200000``
+ of the SPI NOR flash
=================== ================================================
For example, with `Genio Tools
@@ -323,6 +342,13 @@ a prebuilt Genio image for the target board::
bootloaders:/absolute/path/to/build/bootloaders.img
With a Genio image built for UFS, the same command writes the images to UFS.
+With a Genio image built for SPI NOR boot, write the images to the ``nor_bl2``
+and ``nor_fip_a`` partitions of its flash layout instead, which start at
+offsets ``0`` and ``0x200000``::
+
+ $ genio-flash -P /path/to/genio-nor-image \
+ nor_bl2:/absolute/path/to/build/mtk-boot.bin \
+ nor_fip_a:/absolute/path/to/build/bootloaders.img
Writing an invalid image to eMMC boot0 can make the board unbootable. Preserve
the platform recovery path while testing.
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 0/3] mediatek: mt8189: add SPI NOR boot for Genio 520 and 720 SPL
2026-11-17 0:05 [PATCH 0/3] mediatek: mt8189: add SPI NOR boot for Genio 520 and 720 SPL David Lechner
` (2 preceding siblings ...)
2026-11-17 0:05 ` [PATCH 3/3] doc: board: mediatek: describe booting Genio 520 and 720 from SPI NOR David Lechner
@ 2026-11-17 9:57 ` Carlo Caione
3 siblings, 0 replies; 5+ messages in thread
From: Carlo Caione @ 2026-11-17 9:57 UTC (permalink / raw)
To: David Lechner
Cc: Macpaul Lin, Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon,
Julien Stephan, GSS_MTK_Uboot_upstream, Tom Rini,
Ilias Apalodimas, u-boot
On Mon, Nov 16, 2026 at 18:05:52 +0100, David Lechner wrote:
> This is the last boot option for the Genio 520/720 EVK boards, after eMMC
> and UFS. This one worked with no runtime changes needed, so it is just
> devicetree, config and documentation.
>
> Tested on Genio 720 EVK.
>
> Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Carlo Caione <ccaione@baylibre.com>
--
Carlo Caione
^ permalink raw reply [flat|nested] 5+ messages in thread