* [PATCH 1/4] arm: dts: mediatek: prepare Genio 700 devices for SPL
2026-07-18 16:16 [PATCH 0/4] arm: mediatek: add Genio 700 SPL boot support Carlo Caione
@ 2026-07-18 16:16 ` Carlo Caione
2026-07-21 0:01 ` David Lechner via U-Boot
2026-07-22 21:01 ` David Lechner via U-Boot
2026-07-18 16:16 ` [PATCH 2/4] configs: mt8390: enable eMMC FIT boot from SPL Carlo Caione
` (2 subsequent siblings)
3 siblings, 2 replies; 13+ messages in thread
From: Carlo Caione @ 2026-07-18 16:16 UTC (permalink / raw)
To: GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, David Lechner,
Julien Stephan, Macpaul Lin, Tom Rini, Ilias Apalodimas,
Julien Masson, Johan Jonker, Quentin Schulz, Marek Vasut,
Vitor Sato Eschholz, Carlo Caione
The Genio 700 boot flow enters U-Boot SPL after an external DDR loader
has initialized DRAM. SPL then needs the debug UART and eMMC controller,
together with their clock, syscon, pinctrl and watchdog providers, to
load the firmware FIT.
Signed-off-by: Julien Masson <jmasson@baylibre.com>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
---
arch/arm/dts/mt8188-u-boot.dtsi | 40 ++++++++++++++++++
arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi | 58 +++++++++++++++++++++++++++
board/mediatek/MAINTAINERS | 2 +
3 files changed, 100 insertions(+)
diff --git a/arch/arm/dts/mt8188-u-boot.dtsi b/arch/arm/dts/mt8188-u-boot.dtsi
index 6d1b2ab82da..131377d9a97 100644
--- a/arch/arm/dts/mt8188-u-boot.dtsi
+++ b/arch/arm/dts/mt8188-u-boot.dtsi
@@ -8,3 +8,43 @@
compatible = "mediatek,mt8188-tphy", "mediatek,generic-tphy-v3",
"mediatek,generic-tphy-v2";
};
+
+&clk26m {
+ bootph-pre-ram;
+};
+
+&gic {
+ bootph-pre-ram;
+};
+
+&topckgen {
+ bootph-pre-ram;
+};
+
+&infracfg_ao {
+ bootph-pre-ram;
+};
+
+&pio {
+ bootph-pre-ram;
+};
+
+&watchdog {
+ bootph-pre-ram;
+};
+
+&apmixedsys {
+ bootph-pre-ram;
+};
+
+&uart0 {
+ bootph-pre-ram;
+};
+
+&pericfg_ao {
+ bootph-pre-ram;
+};
+
+&mmc0 {
+ bootph-pre-ram;
+};
diff --git a/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi b/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
new file mode 100644
index 00000000000..ace9944ec41
--- /dev/null
+++ b/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (c) 2024, 2026 Baylibre SAS.
+ * Author: Julien Masson <jmasson@baylibre.com>
+ * Author: Carlo Caione <ccaione@baylibre.com>
+ */
+
+#include "mt8188-u-boot.dtsi"
+
+/ {
+ memory@40000000 {
+ bootph-pre-ram;
+ };
+};
+
+&mmc0_default_pins {
+ bootph-pre-ram;
+
+ pins-clk {
+ bootph-pre-ram;
+ };
+
+ pins-cmd-dat {
+ bootph-pre-ram;
+ };
+
+ pins-rst {
+ bootph-pre-ram;
+ };
+};
+
+&mmc0_uhs_pins {
+ bootph-pre-ram;
+
+ pins-clk {
+ bootph-pre-ram;
+ };
+
+ pins-cmd-dat {
+ bootph-pre-ram;
+ };
+
+ pins-ds {
+ bootph-pre-ram;
+ };
+
+ pins-rst {
+ bootph-pre-ram;
+ };
+};
+
+&uart0_pins {
+ bootph-pre-ram;
+
+ pins {
+ bootph-pre-ram;
+ };
+};
diff --git a/board/mediatek/MAINTAINERS b/board/mediatek/MAINTAINERS
index 37ca35b4dd4..efd38d52338 100644
--- a/board/mediatek/MAINTAINERS
+++ b/board/mediatek/MAINTAINERS
@@ -21,6 +21,8 @@ MT8188/MT8370/MT8390
M: Macpaul Lin <Macpaul.Lin@mediatek.com>
M: Julien Stephan <jstephan@baylibre.com>
S: Maintained
+F: arch/arm/dts/mt8188-u-boot.dtsi
+F: arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
F: configs/mt8188.config
F: configs/mt8370_genio_510_evk_defconfig
F: configs/mt8390_genio_700_evk_defconfig
--
2.55.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 1/4] arm: dts: mediatek: prepare Genio 700 devices for SPL
2026-07-18 16:16 ` [PATCH 1/4] arm: dts: mediatek: prepare Genio 700 devices for SPL Carlo Caione
@ 2026-07-21 0:01 ` David Lechner via U-Boot
2026-07-21 8:35 ` Carlo Caione via U-Boot
2026-07-22 21:01 ` David Lechner via U-Boot
1 sibling, 1 reply; 13+ messages in thread
From: David Lechner via U-Boot @ 2026-07-21 0:01 UTC (permalink / raw)
To: Carlo Caione, GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, Julien Stephan,
Macpaul Lin, Tom Rini, Ilias Apalodimas, Julien Masson,
Johan Jonker, Quentin Schulz, Marek Vasut, Vitor Sato Eschholz
On 7/18/26 11:16 AM, Carlo Caione wrote:
> The Genio 700 boot flow enters U-Boot SPL after an external DDR loader
> has initialized DRAM. SPL then needs the debug UART and eMMC controller,
> together with their clock, syscon, pinctrl and watchdog providers, to
> load the firmware FIT.
>
> Signed-off-by: Julien Masson <jmasson@baylibre.com>
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>
> ---
> arch/arm/dts/mt8188-u-boot.dtsi | 40 ++++++++++++++++++
> arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi | 58 +++++++++++++++++++++++++++
> board/mediatek/MAINTAINERS | 2 +
> 3 files changed, 100 insertions(+)
>
> diff --git a/arch/arm/dts/mt8188-u-boot.dtsi b/arch/arm/dts/mt8188-u-boot.dtsi
> index 6d1b2ab82da..131377d9a97 100644
> --- a/arch/arm/dts/mt8188-u-boot.dtsi
> +++ b/arch/arm/dts/mt8188-u-boot.dtsi
> @@ -8,3 +8,43 @@
> compatible = "mediatek,mt8188-tphy", "mediatek,generic-tphy-v3",
> "mediatek,generic-tphy-v2";
> };
> +
> +&clk26m {
> + bootph-pre-ram;
> +};
> +
> +&gic {
> + bootph-pre-ram;
> +};
> +
> +&topckgen {
> + bootph-pre-ram;
> +};
> +
> +&infracfg_ao {
> + bootph-pre-ram;
> +};
> +
> +&pio {
> + bootph-pre-ram;
> +};
> +
> +&watchdog {
> + bootph-pre-ram;
> +};
> +
> +&apmixedsys {
> + bootph-pre-ram;
> +};
> +
> +&uart0 {
> + bootph-pre-ram;
> +};
> +
> +&pericfg_ao {
> + bootph-pre-ram;
> +};
> +
> +&mmc0 {
> + bootph-pre-ram;
> +};
> diff --git a/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi b/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
> new file mode 100644
> index 00000000000..ace9944ec41
> --- /dev/null
> +++ b/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
> @@ -0,0 +1,58 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright (c) 2024, 2026 Baylibre SAS.
> + * Author: Julien Masson <jmasson@baylibre.com>
> + * Author: Carlo Caione <ccaione@baylibre.com>
> + */
> +
> +#include "mt8188-u-boot.dtsi"
> +
> +/ {
> + memory@40000000 {
> + bootph-pre-ram;
> + };
> +};
> +
> +&mmc0_default_pins {
> + bootph-pre-ram;
> +
> + pins-clk {
> + bootph-pre-ram;
> + };
> +
> + pins-cmd-dat {
> + bootph-pre-ram;
> + };
> +
> + pins-rst {
> + bootph-pre-ram;
> + };
> +};
> +
> +&mmc0_uhs_pins {
> + bootph-pre-ram;
> +
> + pins-clk {
> + bootph-pre-ram;
> + };
> +
> + pins-cmd-dat {
> + bootph-pre-ram;
> + };
> +
> + pins-ds {
> + bootph-pre-ram;
> + };
> +
> + pins-rst {
> + bootph-pre-ram;
> + };
> +};
> +
> +&uart0_pins {
> + bootph-pre-ram;
> +
> + pins {
> + bootph-pre-ram;
> + };
> +};
Is there a plan to change these upstream so that we don't have to carry
this forever?
> diff --git a/board/mediatek/MAINTAINERS b/board/mediatek/MAINTAINERS
> index 37ca35b4dd4..efd38d52338 100644
> --- a/board/mediatek/MAINTAINERS
> +++ b/board/mediatek/MAINTAINERS
> @@ -21,6 +21,8 @@ MT8188/MT8370/MT8390
> M: Macpaul Lin <Macpaul.Lin@mediatek.com>
> M: Julien Stephan <jstephan@baylibre.com>
> S: Maintained
> +F: arch/arm/dts/mt8188-u-boot.dtsi
> +F: arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
> F: configs/mt8188.config
> F: configs/mt8370_genio_510_evk_defconfig
> F: configs/mt8390_genio_700_evk_defconfig
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 1/4] arm: dts: mediatek: prepare Genio 700 devices for SPL
2026-07-21 0:01 ` David Lechner via U-Boot
@ 2026-07-21 8:35 ` Carlo Caione via U-Boot
0 siblings, 0 replies; 13+ messages in thread
From: Carlo Caione via U-Boot @ 2026-07-21 8:35 UTC (permalink / raw)
To: David Lechner, Carlo Caione, GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, Julien Stephan,
Macpaul Lin, Tom Rini, Ilias Apalodimas, Julien Masson,
Johan Jonker, Quentin Schulz, Marek Vasut, Vitor Sato Eschholz
On Tue Jul 21, 2026 at 2:01 AM CEST, David Lechner wrote:
> On 7/18/26 11:16 AM, Carlo Caione wrote:
>> +&uart0_pins {
>> + bootph-pre-ram;
>> +
>> + pins {
>> + bootph-pre-ram;
>> + };
>> +};
>
> Is there a plan to change these upstream so that we don't have to carry
> this forever?
Yes, I'll submit the linux patch after the V2 but for now I suggest to
keep this change here. We can remove from U-Boot once that lands in Linux.
cheers,
--
Carlo Caione
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] arm: dts: mediatek: prepare Genio 700 devices for SPL
2026-07-18 16:16 ` [PATCH 1/4] arm: dts: mediatek: prepare Genio 700 devices for SPL Carlo Caione
2026-07-21 0:01 ` David Lechner via U-Boot
@ 2026-07-22 21:01 ` David Lechner via U-Boot
1 sibling, 0 replies; 13+ messages in thread
From: David Lechner via U-Boot @ 2026-07-22 21:01 UTC (permalink / raw)
To: Carlo Caione, GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, Julien Stephan,
Macpaul Lin, Tom Rini, Ilias Apalodimas, Julien Masson,
Johan Jonker, Quentin Schulz, Marek Vasut, Vitor Sato Eschholz
On 7/18/26 11:16 AM, Carlo Caione wrote:
> The Genio 700 boot flow enters U-Boot SPL after an external DDR loader
> has initialized DRAM. SPL then needs the debug UART and eMMC controller,
> together with their clock, syscon, pinctrl and watchdog providers, to
> load the firmware FIT.
>
FYI, this patch has some merge conflicts with some changes that I have
already picked up in [1].
[1]: https://patchwork.ozlabs.org/project/uboot/patch/20260722201522.3930921-1-dlechner@baylibre.com/
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/4] configs: mt8390: enable eMMC FIT boot from SPL
2026-07-18 16:16 [PATCH 0/4] arm: mediatek: add Genio 700 SPL boot support Carlo Caione
2026-07-18 16:16 ` [PATCH 1/4] arm: dts: mediatek: prepare Genio 700 devices for SPL Carlo Caione
@ 2026-07-18 16:16 ` Carlo Caione
2026-07-21 0:05 ` David Lechner via U-Boot
2026-07-18 16:16 ` [PATCH 3/4] arm: mediatek: mt8390: build boot images with binman Carlo Caione
2026-07-18 16:16 ` [PATCH 4/4] doc: board: mediatek: document Genio 700 SPL boot Carlo Caione
3 siblings, 1 reply; 13+ messages in thread
From: Carlo Caione @ 2026-07-18 16:16 UTC (permalink / raw)
To: GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, David Lechner,
Julien Stephan, Macpaul Lin, Tom Rini, Ilias Apalodimas,
Julien Masson, Johan Jonker, Quentin Schulz, Marek Vasut,
Vitor Sato Eschholz, Carlo Caione
Enable the normal Genio 700 SPL path entered by the external DDR
loader at 0x40000000. Bound the raw SPL to the loader's 0xaf000-byte
copy window, place BSS separately in DRAM, and retain the
non-overlapping SPL malloc region.
Use generic SPL MMC, GPT, FIT, and Arm Trusted Firmware support to load
the firmware FIT from eMMC partition 1. Keep U-Boot proper at the shared
MT8188 CONFIG_TEXT_BASE of 0x4c000000.
The MediaTek BL31 used on Genio 700 stalls when passed the runtime
devicetree as its platform parameter. Enable SPL_ATF_NO_PLATFORM_PARAM
so SPL can still use the tree to locate OP-TEE and U-Boot while passing
NULL as the separate BL31 platform parameter.
Signed-off-by: Vitor Sato Eschholz <vsatoes@baylibre.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
---
configs/mt8390_genio_700_evk_defconfig | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/configs/mt8390_genio_700_evk_defconfig b/configs/mt8390_genio_700_evk_defconfig
index fe4f6ad9016..5730b056e29 100644
--- a/configs/mt8390_genio_700_evk_defconfig
+++ b/configs/mt8390_genio_700_evk_defconfig
@@ -1,3 +1,30 @@
#include <configs/mt8188.config>
CONFIG_DEFAULT_DEVICE_TREE="mediatek/mt8390-genio-700-evk"
+CONFIG_SPL=y
+CONFIG_SPL_TEXT_BASE=0x40000000
+CONFIG_SPL_MAX_SIZE=0xaf000
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
+CONFIG_SPL_BSS_START_ADDR=0x400bb800
+CONFIG_SPL_BSS_LIMIT=y
+CONFIG_SPL_BSS_MAX_SIZE=0x100000
+CONFIG_SPL_SYS_MALLOC=y
+CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y
+CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x5c000000
+CONFIG_SPL_SYS_MALLOC_SIZE=0x9000000
+CONFIG_SPL_SYSCON=y
+CONFIG_SPL_CLK=y
+CONFIG_SPL_SERIAL=y
+# CONFIG_SPL_USE_TINY_PRINTF is not set
+CONFIG_SPL_PINCTRL=y
+CONFIG_SPL_PINCONF=y
+CONFIG_SPL_WATCHDOG=y
+CONFIG_SPL_MMC=y
+CONFIG_SPL_LIBDISK_SUPPORT=y
+CONFIG_SPL_EFI_PARTITION=y
+CONFIG_SPL_SYS_MMCSD_RAW_MODE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=1
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_ATF=y
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
--
2.55.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/4] configs: mt8390: enable eMMC FIT boot from SPL
2026-07-18 16:16 ` [PATCH 2/4] configs: mt8390: enable eMMC FIT boot from SPL Carlo Caione
@ 2026-07-21 0:05 ` David Lechner via U-Boot
0 siblings, 0 replies; 13+ messages in thread
From: David Lechner via U-Boot @ 2026-07-21 0:05 UTC (permalink / raw)
To: Carlo Caione, GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, Julien Stephan,
Macpaul Lin, Tom Rini, Ilias Apalodimas, Julien Masson,
Johan Jonker, Quentin Schulz, Marek Vasut, Vitor Sato Eschholz
On 7/18/26 11:16 AM, Carlo Caione wrote:
> Enable the normal Genio 700 SPL path entered by the external DDR
> loader at 0x40000000. Bound the raw SPL to the loader's 0xaf000-byte
s/Bound/Bind/
I can fix this up when applying if nothing else comes up.
> copy window, place BSS separately in DRAM, and retain the
> non-overlapping SPL malloc region.
>
> Use generic SPL MMC, GPT, FIT, and Arm Trusted Firmware support to load
> the firmware FIT from eMMC partition 1. Keep U-Boot proper at the shared
> MT8188 CONFIG_TEXT_BASE of 0x4c000000.
>
> The MediaTek BL31 used on Genio 700 stalls when passed the runtime
> devicetree as its platform parameter. Enable SPL_ATF_NO_PLATFORM_PARAM
> so SPL can still use the tree to locate OP-TEE and U-Boot while passing
> NULL as the separate BL31 platform parameter.
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 3/4] arm: mediatek: mt8390: build boot images with binman
2026-07-18 16:16 [PATCH 0/4] arm: mediatek: add Genio 700 SPL boot support Carlo Caione
2026-07-18 16:16 ` [PATCH 1/4] arm: dts: mediatek: prepare Genio 700 devices for SPL Carlo Caione
2026-07-18 16:16 ` [PATCH 2/4] configs: mt8390: enable eMMC FIT boot from SPL Carlo Caione
@ 2026-07-18 16:16 ` Carlo Caione
2026-07-18 16:16 ` [PATCH 4/4] doc: board: mediatek: document Genio 700 SPL boot Carlo Caione
3 siblings, 0 replies; 13+ messages in thread
From: Carlo Caione @ 2026-07-18 16:16 UTC (permalink / raw)
To: GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, David Lechner,
Julien Stephan, Macpaul Lin, Tom Rini, Ilias Apalodimas,
Julien Masson, Johan Jonker, Quentin Schulz, Marek Vasut,
Vitor Sato Eschholz, Carlo Caione
Generate the Genio 700 boot-chain images from the U-Boot build.
mtk-boot.bin wraps an external DDR loader, padded to its fixed
0x4b000-byte ABI, followed by a CONFIG_SPL_MAX_SIZE U-Boot SPL region
in a MediaTek eMMC BootROM image. The external loader copies that
complete fixed-size SPL window, so pad the region to keep every source
byte inside the BootROM-loaded payload.
bootloaders.img is a conventional FIT containing BL31, U-Boot proper,
OP-TEE, and the U-Boot control devicetree.
Use the standard BL31 and TEE binman inputs and obtain ddr-loader.bin
through BINMAN_INDIRS. Disable SPL binman symbols because SPL and
U-Boot proper live in separate storage images. SPL locates U-Boot
through the GPT FIT partition, so there are no in-image U-Boot offsets
to publish.
Signed-off-by: Vitor Sato Eschholz <vsatoes@baylibre.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
---
arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi | 120 ++++++++++++++++++++++++++
arch/arm/mach-mediatek/Kconfig | 1 +
configs/mt8390_genio_700_evk_defconfig | 1 +
3 files changed, 122 insertions(+)
diff --git a/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi b/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
index ace9944ec41..69dc6e9d181 100644
--- a/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
+++ b/arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
@@ -5,14 +5,134 @@
* Author: Carlo Caione <ccaione@baylibre.com>
*/
+#include <config.h>
#include "mt8188-u-boot.dtsi"
/ {
+ binman: binman {
+ multiple-images;
+ };
+
memory@40000000 {
bootph-pre-ram;
};
};
+&binman {
+ mtk-boot {
+ filename = "mtk-boot.bin";
+
+ mkimage {
+ args = "-T", "mtk_image",
+ "-a", "0x201000",
+ "-e", "0x201000",
+ "-n", "media=emmc;arm64=1";
+
+ section {
+ pad-byte = <0>;
+
+ /* Must match SPL_OFFSET in the external DDR loader. */
+ ddr-loader {
+ type = "blob-ext";
+ filename = "ddr-loader.bin";
+ size = <0x4b000>;
+ };
+
+ u-boot-spl {
+ size = <CONFIG_SPL_MAX_SIZE>;
+ };
+ };
+ };
+ };
+
+ bootloaders {
+ filename = "bootloaders.img";
+
+ fit {
+ description = "MediaTek Genio 700 bootloaders";
+ #address-cells = <1>;
+
+ images {
+ uboot {
+ description = "U-Boot";
+ type = "firmware";
+ os = "u-boot";
+ arch = "arm64";
+ compression = "none";
+ load = <CONFIG_TEXT_BASE>;
+ entry = <CONFIG_TEXT_BASE>;
+
+ u-boot-nodtb {
+ };
+
+ hash {
+ algo = "sha256";
+ };
+ };
+
+ atf {
+ description = "ARM Trusted Firmware BL31";
+ type = "firmware";
+ os = "arm-trusted-firmware";
+ arch = "arm64";
+ compression = "none";
+ load = <0x54601000>;
+ entry = <0x54601000>;
+
+ atf-bl31 {
+ };
+
+ hash {
+ algo = "sha256";
+ };
+ };
+
+ optee {
+ description = "OP-TEE";
+ type = "firmware";
+ os = "tee";
+ arch = "arm64";
+ compression = "none";
+ load = <0x431fffe4>;
+ entry = <0x43200000>;
+
+ tee-os {
+ };
+
+ hash {
+ algo = "sha256";
+ };
+ };
+
+ uboot-fdt {
+ description = "U-Boot control devicetree";
+ type = "flat_dt";
+ arch = "arm64";
+ compression = "none";
+
+ u-boot-dtb {
+ };
+
+ hash {
+ algo = "sha256";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf";
+
+ conf {
+ description = "Genio 700 boot chain";
+ firmware = "atf";
+ loadables = "uboot", "optee";
+ fdt = "uboot-fdt";
+ };
+ };
+ };
+ };
+};
+
&mmc0_default_pins {
bootph-pre-ram;
diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
index 5e6c50ca64d..9ff7e7a7f5e 100644
--- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig
@@ -87,6 +87,7 @@ config TARGET_MT8183
config TARGET_MT8188
bool "MediaTek MT8188 SoC"
select ARM64
+ select BINMAN if SPL
help
The MediaTek MT8188 is a ARM64-based SoC with a dual-core Cortex-A78
cluster and a six-core Cortex-A55 cluster. It includes UART, SPI,
diff --git a/configs/mt8390_genio_700_evk_defconfig b/configs/mt8390_genio_700_evk_defconfig
index 5730b056e29..1287cdf0af6 100644
--- a/configs/mt8390_genio_700_evk_defconfig
+++ b/configs/mt8390_genio_700_evk_defconfig
@@ -2,6 +2,7 @@
CONFIG_DEFAULT_DEVICE_TREE="mediatek/mt8390-genio-700-evk"
CONFIG_SPL=y
+# CONFIG_SPL_BINMAN_SYMBOLS is not set
CONFIG_SPL_TEXT_BASE=0x40000000
CONFIG_SPL_MAX_SIZE=0xaf000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
--
2.55.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 4/4] doc: board: mediatek: document Genio 700 SPL boot
2026-07-18 16:16 [PATCH 0/4] arm: mediatek: add Genio 700 SPL boot support Carlo Caione
` (2 preceding siblings ...)
2026-07-18 16:16 ` [PATCH 3/4] arm: mediatek: mt8390: build boot images with binman Carlo Caione
@ 2026-07-18 16:16 ` Carlo Caione
2026-07-21 0:38 ` David Lechner via U-Boot
3 siblings, 1 reply; 13+ messages in thread
From: Carlo Caione @ 2026-07-18 16:16 UTC (permalink / raw)
To: GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, David Lechner,
Julien Stephan, Macpaul Lin, Tom Rini, Ilias Apalodimas,
Julien Masson, Johan Jonker, Quentin Schulz, Marek Vasut,
Vitor Sato Eschholz, Carlo Caione
Document the normal eMMC boot chain, external firmware prerequisites,
binman build invocation and generated images.
Also describe storage mapping, handoff details, verification steps, and
current security and recovery limitations.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
---
MAINTAINERS | 1 +
board/mediatek/MAINTAINERS | 1 +
doc/board/mediatek/index.rst | 1 +
doc/board/mediatek/mt8390-genio-700-evk.rst | 168 ++++++++++++++++++++++++++++
4 files changed, 171 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index e5b2a2e373c..116a7fe3423 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -421,6 +421,7 @@ F: arch/arm/dts/mt*
F: arch/arm/mach-mediatek/
F: arch/arm/include/asm/arch-mediatek/
F: board/mediatek/
+F: doc/board/mediatek/
F: doc/device-tree-bindings/phy/phy-mtk-*
F: doc/device-tree-bindings/usb/mediatek,*
F: doc/README.mediatek
diff --git a/board/mediatek/MAINTAINERS b/board/mediatek/MAINTAINERS
index efd38d52338..bcf5fe66a1e 100644
--- a/board/mediatek/MAINTAINERS
+++ b/board/mediatek/MAINTAINERS
@@ -26,6 +26,7 @@ F: arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
F: configs/mt8188.config
F: configs/mt8370_genio_510_evk_defconfig
F: configs/mt8390_genio_700_evk_defconfig
+F: doc/board/mediatek/mt8390-genio-700-evk.rst
MT8195/MT8395
M: Macpaul Lin <Macpaul.Lin@mediatek.com>
diff --git a/doc/board/mediatek/index.rst b/doc/board/mediatek/index.rst
index c55d5aeb5c4..09038e29152 100644
--- a/doc/board/mediatek/index.rst
+++ b/doc/board/mediatek/index.rst
@@ -7,3 +7,4 @@ Mediatek
:maxdepth: 2
mt7621
+ mt8390-genio-700-evk
diff --git a/doc/board/mediatek/mt8390-genio-700-evk.rst b/doc/board/mediatek/mt8390-genio-700-evk.rst
new file mode 100644
index 00000000000..152e5e35fa5
--- /dev/null
+++ b/doc/board/mediatek/mt8390-genio-700-evk.rst
@@ -0,0 +1,168 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. Copyright (C) 2026 Baylibre SAS
+
+MediaTek Genio 700 EVK
+======================
+
+The MediaTek Genio 700 EVK is based on the MT8390 product, which uses the
+MT8188 SoC. The board is configured with
+``mt8390_genio_700_evk_defconfig``.
+
+Boot chain
+----------
+
+The normal eMMC boot chain is::
+
+ BootROM
+ -> external DDR loader
+ -> U-Boot SPL
+ -> Arm Trusted Firmware-A BL31
+ -> OP-TEE (BL32)
+ -> U-Boot proper (BL33)
+
+The BootROM loads a MediaTek image from the eMMC boot0 hardware partition.
+This image contains an external DDR loader followed by U-Boot SPL. The DDR
+loader initializes DRAM, copies the fixed ``CONFIG_SPL_MAX_SIZE`` byte SPL
+region to ``CONFIG_SPL_TEXT_BASE`` and enters SPL at EL3 with exceptions
+masked.
+
+SPL reads a FIT image from partition 1 of the eMMC user area. The FIT contains
+BL31, OP-TEE, U-Boot proper and the U-Boot control devicetree. SPL uses the
+standard FIT and Arm Trusted Firmware handoff code to start the remaining
+stages.
+
+The external DDR loader is a platform firmware component and is not built by
+U-Boot.
+
+Build prerequisites
+-------------------
+
+The following external binaries are required:
+
+``ddr-loader.bin``
+ The MediaTek DDR loader for the board. The input may be shorter than
+ ``0x4b000`` bytes; binman pads it with zeroes to the offset reserved before
+ SPL. It must have been built with ``SPL_OFFSET=0x4b000``,
+ ``SPL_SIZE=CONFIG_SPL_MAX_SIZE`` and an SPL destination and entry address
+ matching ``CONFIG_SPL_TEXT_BASE``.
+
+``BL31``
+ The path to the TF-A BL31 binary built for MT8188/MT8390. It is loaded and
+ entered at ``0x54601000``.
+
+``TEE``
+ The path to the OP-TEE binary. A standard OP-TEE v1 ``tee.bin`` image is
+ supported. The FIT loads it at ``0x431fffe4`` and enters it at
+ ``0x43200000``.
+
+These binaries must match the board memory layout and its firmware security
+policy. Place ``ddr-loader.bin`` in a directory which can be passed to binman
+with ``BINMAN_INDIRS``.
+
+Building
+--------
+
+For example, with the DDR loader in ``/path/to/firmware/ddr-loader.bin``::
+
+ $ export CROSS_COMPILE=aarch64-linux-gnu-
+ $ export BL31=/path/to/bl31.bin
+ $ export TEE=/path/to/tee.bin
+ $ make O=build TEE="$TEE" mt8390_genio_700_evk_defconfig
+ $ make O=build BINMAN_INDIRS=/path/to/firmware \
+ BL31="$BL31" TEE="$TEE"
+
+``TEE`` must be set for both configuration and compilation. U-Boot uses its
+presence during configuration to enable the support needed to preserve the
+OP-TEE reserved-memory nodes in the devicetree passed to the operating system.
+Do not deploy images if binman reports that it used fake or missing external
+blobs.
+
+Building standalone binaries
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The external binaries are packaging inputs rather than U-Boot compilation
+dependencies. To build only U-Boot proper and SPL, request their targets
+directly::
+
+ $ make O=build mt8390_genio_700_evk_defconfig
+ $ make O=build u-boot.bin spl/u-boot-spl.bin
+
+This produces ``build/u-boot.bin`` and ``build/spl/u-boot-spl.bin`` without
+building ``mtk-boot.bin`` or ``bootloaders.img``. The DDR loader and BL31 are
+not needed in this case.
+
+The presence of ``TEE`` during configuration enables the U-Boot support needed
+to preserve the OP-TEE reserved-memory nodes. Set ``TEE`` during configuration
+if the resulting ``u-boot.bin`` will later be used in a boot chain containing
+OP-TEE, even when the standalone target does not read the file.
+
+A complete build without the external binaries can instead be requested with::
+
+ $ make O=build BINMAN_ALLOW_MISSING=1
+
+The standalone binaries from such a build remain usable, but the packaged
+images contain fake external blobs and must not be deployed.
+
+Binman produces two deployable images in the build directory:
+
+``mtk-boot.bin``
+ A MediaTek eMMC image with load and entry address ``0x201000``. It contains
+ the DDR loader, padded to ``0x4b000`` bytes, followed by U-Boot SPL padded
+ to ``CONFIG_SPL_MAX_SIZE``. The fixed regions make every byte copied by the
+ external loader part of the BootROM-loaded image.
+
+``bootloaders.img``
+ A FIT image containing BL31, U-Boot proper, OP-TEE and the U-Boot control
+ devicetree. Each component has a SHA-256 hash.
+
+Binman also creates ``mtk-boot.map`` and ``bootloaders.map``. These show the
+offset and size of every component. The FIT can be inspected with::
+
+ $ dumpimage -l build/bootloaders.img
+
+Installing
+----------
+
+Use the board provisioning tools to place the images as follows:
+
+=================== ================================================
+Image Destination
+=================== ================================================
+``mtk-boot.bin`` Start of the eMMC boot0 hardware partition
+``bootloaders.img`` GPT partition 1 in the eMMC user area
+=================== ================================================
+
+The standard Genio 700 partition layout names GPT partition 1
+``bootloaders``. SPL selects the partition by number through
+``CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION``; it does not locate it by name.
+
+Writing an invalid image to eMMC boot0 can make the board unbootable. Preserve
+the platform recovery path and any backup bootloader partition while testing.
+Selection of a backup partition is not implemented by this SPL configuration.
+
+Using Genio Tools
+~~~~~~~~~~~~~~~~~
+
+``genio-flash`` needs a Genio image directory containing the partition
+metadata and a compatible download bootstrap. To update only the primary boot
+chain while retaining the backup bootloader partition, run::
+
+ $ genio-flash -P /path/to/genio-image \
+ mmc0boot0:/absolute/path/to/build/mtk-boot.bin \
+ bootloaders:/absolute/path/to/build/bootloaders.img
+
+Genio Tools uses the default bootstrap from the image directory. Keep
+``bootloaders_b`` unchanged until the new images have been tested. Add
+``--dry-run`` to check the selected files and partitions without accessing the
+board.
+
+Limitations
+-----------
+
+A successful boot prints banners from U-Boot SPL, BL31, OP-TEE and U-Boot
+proper.
+
+The generated images are not signed. Production signing, rollback protection
+and provisioning are platform integration responsibilities. The images only
+establish the firmware boot chain; operating-system boot policy remains
+independent and uses the normal U-Boot facilities.
--
2.55.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 4/4] doc: board: mediatek: document Genio 700 SPL boot
2026-07-18 16:16 ` [PATCH 4/4] doc: board: mediatek: document Genio 700 SPL boot Carlo Caione
@ 2026-07-21 0:38 ` David Lechner via U-Boot
2026-07-21 11:22 ` Carlo Caione via U-Boot
0 siblings, 1 reply; 13+ messages in thread
From: David Lechner via U-Boot @ 2026-07-21 0:38 UTC (permalink / raw)
To: Carlo Caione, GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, Julien Stephan,
Macpaul Lin, Tom Rini, Ilias Apalodimas, Julien Masson,
Johan Jonker, Quentin Schulz, Marek Vasut, Vitor Sato Eschholz
On 7/18/26 11:16 AM, Carlo Caione wrote:
> Document the normal eMMC boot chain, external firmware prerequisites,
> binman build invocation and generated images.
>
> Also describe storage mapping, handoff details, verification steps, and
> current security and recovery limitations.
>
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>
> ---
> MAINTAINERS | 1 +
> board/mediatek/MAINTAINERS | 1 +
> doc/board/mediatek/index.rst | 1 +
> doc/board/mediatek/mt8390-genio-700-evk.rst | 168 ++++++++++++++++++++++++++++
> 4 files changed, 171 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e5b2a2e373c..116a7fe3423 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -421,6 +421,7 @@ F: arch/arm/dts/mt*
> F: arch/arm/mach-mediatek/
> F: arch/arm/include/asm/arch-mediatek/
> F: board/mediatek/
> +F: doc/board/mediatek/
This is no longer needed since [1].
[1]: https://lore.kernel.org/u-boot/20260617024105.152655-1-marek.vasut+renesas@mailbox.org/
I can fix up when applying if nothing else comes up.
> F: doc/device-tree-bindings/phy/phy-mtk-*
> F: doc/device-tree-bindings/usb/mediatek,*
> F: doc/README.mediatek
> diff --git a/board/mediatek/MAINTAINERS b/board/mediatek/MAINTAINERS
> index efd38d52338..bcf5fe66a1e 100644
> --- a/board/mediatek/MAINTAINERS
> +++ b/board/mediatek/MAINTAINERS
> @@ -26,6 +26,7 @@ F: arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
> F: configs/mt8188.config
> F: configs/mt8370_genio_510_evk_defconfig
> F: configs/mt8390_genio_700_evk_defconfig
> +F: doc/board/mediatek/mt8390-genio-700-evk.rst
>
> MT8195/MT8395
> M: Macpaul Lin <Macpaul.Lin@mediatek.com>
> diff --git a/doc/board/mediatek/index.rst b/doc/board/mediatek/index.rst
> index c55d5aeb5c4..09038e29152 100644
> --- a/doc/board/mediatek/index.rst
> +++ b/doc/board/mediatek/index.rst
> @@ -7,3 +7,4 @@ Mediatek
> :maxdepth: 2
>
> mt7621
> + mt8390-genio-700-evk
> diff --git a/doc/board/mediatek/mt8390-genio-700-evk.rst b/doc/board/mediatek/mt8390-genio-700-evk.rst
> new file mode 100644
> index 00000000000..152e5e35fa5
> --- /dev/null
> +++ b/doc/board/mediatek/mt8390-genio-700-evk.rst
> @@ -0,0 +1,168 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +.. Copyright (C) 2026 Baylibre SAS
> +
> +MediaTek Genio 700 EVK
> +======================
> +
> +The MediaTek Genio 700 EVK is based on the MT8390 product, which uses the
> +MT8188 SoC. The board is configured with
This doesn't sound right. It is based on MT8390 SoC. It is DT compatible with
MT8188, but I don't think that is worth mentioning here.
> +``mt8390_genio_700_evk_defconfig``.
> +
> +Boot chain
> +----------
> +
> +The normal eMMC boot chain is::
> +
> + BootROM
> + -> external DDR loader
What does "external" mean in this context? Proprietary?
> + -> U-Boot SPL
> + -> Arm Trusted Firmware-A BL31
Put BL31 in () to be consistent.
> + -> OP-TEE (BL32)
> + -> U-Boot proper (BL33)
> +
> +The BootROM loads a MediaTek image from the eMMC boot0 hardware partition.
> +This image contains an external DDR loader followed by U-Boot SPL. The DDR
> +loader initializes DRAM, copies the fixed ``CONFIG_SPL_MAX_SIZE`` byte SPL
> +region to ``CONFIG_SPL_TEXT_BASE`` and enters SPL at EL3 with exceptions
> +masked.
> +
> +SPL reads a FIT image from partition 1 of the eMMC user area. The FIT contains
> +BL31, OP-TEE, U-Boot proper and the U-Boot control devicetree. SPL uses the
Inconsistent use of BL31 and application names.
> +standard FIT and Arm Trusted Firmware handoff code to start the remaining
s/handoff/hands off/
> +stages.
> +
> +The external DDR loader is a platform firmware component and is not built by
> +U-Boot.
> +
> +Build prerequisites
> +-------------------
> +
> +The following external binaries are required:
> +
> +``ddr-loader.bin``
> + The MediaTek DDR loader for the board. The input may be shorter than
> + ``0x4b000`` bytes; binman pads it with zeroes to the offset reserved before
> + SPL. It must have been built with ``SPL_OFFSET=0x4b000``,
Inconsistent formatting. Should be ...
``SPL``
It must ...
?
> + ``SPL_SIZE=CONFIG_SPL_MAX_SIZE`` and an SPL destination and entry address
> + matching ``CONFIG_SPL_TEXT_BASE``.
> +
> +``BL31``
Why is this BL31 instead of TF-A?
> + The path to the TF-A BL31 binary built for MT8188/MT8390. It is loaded and
> + entered at ``0x54601000``.
> +
> +``TEE``
> + The path to the OP-TEE binary. A standard OP-TEE v1 ``tee.bin`` image is
> + supported. The FIT loads it at ``0x431fffe4`` and enters it at
> + ``0x43200000``.
> +
> +These binaries must match the board memory layout and its firmware security
> +policy. Place ``ddr-loader.bin`` in a directory which can be passed to binman
> +with ``BINMAN_INDIRS``.
> +
> +Building
> +--------
> +
> +For example, with the DDR loader in ``/path/to/firmware/ddr-loader.bin``::
> +
> + $ export CROSS_COMPILE=aarch64-linux-gnu-
> + $ export BL31=/path/to/bl31.bin
> + $ export TEE=/path/to/tee.bin
> + $ make O=build TEE="$TEE" mt8390_genio_700_evk_defconfig
Isn't it redundant to have TEE="$TEE" since it was exported above?
> + $ make O=build BINMAN_INDIRS=/path/to/firmware \
> + BL31="$BL31" TEE="$TEE"
Same here for BL31 and TEE.
> +
> +``TEE`` must be set for both configuration and compilation. U-Boot uses its
> +presence during configuration to enable the support needed to preserve the
> +OP-TEE reserved-memory nodes in the devicetree passed to the operating system.
> +Do not deploy images if binman reports that it used fake or missing external
> +blobs.
> +
> +Building standalone binaries
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +The external binaries are packaging inputs rather than U-Boot compilation
> +dependencies. To build only U-Boot proper and SPL, request their targets
> +directly::
> +
> + $ make O=build mt8390_genio_700_evk_defconfig
> + $ make O=build u-boot.bin spl/u-boot-spl.bin
Do we really need O=build in all of the examples?
> +
> +This produces ``build/u-boot.bin`` and ``build/spl/u-boot-spl.bin`` without
> +building ``mtk-boot.bin`` or ``bootloaders.img``. The DDR loader and BL31 are
> +not needed in this case.
> +
> +The presence of ``TEE`` during configuration enables the U-Boot support needed
> +to preserve the OP-TEE reserved-memory nodes. Set ``TEE`` during configuration
> +if the resulting ``u-boot.bin`` will later be used in a boot chain containing
> +OP-TEE, even when the standalone target does not read the file.
> +
> +A complete build without the external binaries can instead be requested with::
> +
> + $ make O=build BINMAN_ALLOW_MISSING=1
> +
> +The standalone binaries from such a build remain usable, but the packaged
> +images contain fake external blobs and must not be deployed.
How is it usable if it can't be deployed?
> +
> +Binman produces two deployable images in the build directory:
> +
> +``mtk-boot.bin``
> + A MediaTek eMMC image with load and entry address ``0x201000``. It contains
> + the DDR loader, padded to ``0x4b000`` bytes, followed by U-Boot SPL padded
> + to ``CONFIG_SPL_MAX_SIZE``. The fixed regions make every byte copied by the
> + external loader part of the BootROM-loaded image.
> +
> +``bootloaders.img``
> + A FIT image containing BL31, U-Boot proper, OP-TEE and the U-Boot control
> + devicetree. Each component has a SHA-256 hash.
> +
> +Binman also creates ``mtk-boot.map`` and ``bootloaders.map``. These show the
> +offset and size of every component. The FIT can be inspected with::
> +
> + $ dumpimage -l build/bootloaders.img
> +
> +Installing
> +----------
> +
> +Use the board provisioning tools to place the images as follows:
> +
> +=================== ================================================
> +Image Destination
> +=================== ================================================
> +``mtk-boot.bin`` Start of the eMMC boot0 hardware partition
> +``bootloaders.img`` GPT partition 1 in the eMMC user area
> +=================== ================================================
> +
> +The standard Genio 700 partition layout names GPT partition 1
> +``bootloaders``. SPL selects the partition by number through
> +``CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION``; it does not locate it by name.
> +
> +Writing an invalid image to eMMC boot0 can make the board unbootable. Preserve
> +the platform recovery path and any backup bootloader partition while testing.
> +Selection of a backup partition is not implemented by this SPL configuration.
> +
> +Using Genio Tools
> +~~~~~~~~~~~~~~~~~
Probably deserves an external link on where to get genio-tools and pre-build
images.
> +
> +``genio-flash`` needs a Genio image directory containing the partition
> +metadata and a compatible download bootstrap. To update only the primary boot
> +chain while retaining the backup bootloader partition, run::
> +
> + $ genio-flash -P /path/to/genio-image \
> + mmc0boot0:/absolute/path/to/build/mtk-boot.bin \
> + bootloaders:/absolute/path/to/build/bootloaders.img
> +
> +Genio Tools uses the default bootstrap from the image directory. Keep
> +``bootloaders_b`` unchanged until the new images have been tested. Add
> +``--dry-run`` to check the selected files and partitions without accessing the
> +board.
> +
> +Limitations
> +-----------
> +
> +A successful boot prints banners from U-Boot SPL, BL31, OP-TEE and U-Boot
> +proper.
> +
> +The generated images are not signed. Production signing, rollback protection
> +and provisioning are platform integration responsibilities. The images only
> +establish the firmware boot chain; operating-system boot policy remains
> +independent and uses the normal U-Boot facilities.
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/4] doc: board: mediatek: document Genio 700 SPL boot
2026-07-21 0:38 ` David Lechner via U-Boot
@ 2026-07-21 11:22 ` Carlo Caione via U-Boot
2026-07-21 14:50 ` David Lechner via U-Boot
0 siblings, 1 reply; 13+ messages in thread
From: Carlo Caione via U-Boot @ 2026-07-21 11:22 UTC (permalink / raw)
To: David Lechner, Carlo Caione, GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, Julien Stephan,
Macpaul Lin, Tom Rini, Ilias Apalodimas, Julien Masson,
Johan Jonker, Quentin Schulz, Marek Vasut, Vitor Sato Eschholz
On Tue Jul 21, 2026 at 2:38 AM CEST, David Lechner wrote:
> On 7/18/26 11:16 AM, Carlo Caione wrote:
[...]
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index e5b2a2e373c..116a7fe3423 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -421,6 +421,7 @@ F: arch/arm/dts/mt*
>> F: arch/arm/mach-mediatek/
>> F: arch/arm/include/asm/arch-mediatek/
>> F: board/mediatek/
>> +F: doc/board/mediatek/
>
> This is no longer needed since [1].
>
> [1]: https://lore.kernel.org/u-boot/20260617024105.152655-1-marek.vasut+renesas@mailbox.org/
>
> I can fix up when applying if nothing else comes up.
TIL. I'll fix it in V2 that I have to send anyway.
>> +The MediaTek Genio 700 EVK is based on the MT8390 product, which uses the
>> +MT8188 SoC. The board is configured with
>
> This doesn't sound right. It is based on MT8390 SoC. It is DT compatible with
> MT8188, but I don't think that is worth mentioning here.
Agree, I'll remove it.
>> +``mt8390_genio_700_evk_defconfig``.
>> +
>> +Boot chain
>> +----------
>> +
>> +The normal eMMC boot chain is::
>> +
>> + BootROM
>> + -> external DDR loader
>
> What does "external" mean in this context? Proprietary?
It means that that it is built outside U-Boot and yes, it contains
proprietary code that we cannot redistribute here.
>> +``ddr-loader.bin``
>> + The MediaTek DDR loader for the board. The input may be shorter than
>> + ``0x4b000`` bytes; binman pads it with zeroes to the offset reserved before
>> + SPL. It must have been built with ``SPL_OFFSET=0x4b000``,
>
> Inconsistent formatting. Should be ...
>
> ``SPL``
> It must ...
>
> ?
I don't think I follow. The phrase is '... before SPL', SPL is not an
external binary file, it should not be on its own line.
>> + ``SPL_SIZE=CONFIG_SPL_MAX_SIZE`` and an SPL destination and entry address
>> + matching ``CONFIG_SPL_TEXT_BASE``.
>> +
>> +``BL31``
>
> Why is this BL31 instead of TF-A?
Because BL31 is compiled (it is) TF-A, they are basically the same
thing. Is this a nomenclature problem?
>> + The path to the TF-A BL31 binary built for MT8188/MT8390. It is loaded and
>> + entered at ``0x54601000``.
>> +
>> +``TEE``
>> + The path to the OP-TEE binary. A standard OP-TEE v1 ``tee.bin`` image is
>> + supported. The FIT loads it at ``0x431fffe4`` and enters it at
>> + ``0x43200000``.
>> +
>> +These binaries must match the board memory layout and its firmware security
>> +policy. Place ``ddr-loader.bin`` in a directory which can be passed to binman
>> +with ``BINMAN_INDIRS``.
>> +
>> +Building
>> +--------
>> +
>> +For example, with the DDR loader in ``/path/to/firmware/ddr-loader.bin``::
>> +
>> + $ export CROSS_COMPILE=aarch64-linux-gnu-
>> + $ export BL31=/path/to/bl31.bin
>> + $ export TEE=/path/to/tee.bin
>> + $ make O=build TEE="$TEE" mt8390_genio_700_evk_defconfig
>
> Isn't it redundant to have TEE="$TEE" since it was exported above?
It is, thanks for spotting.
>> + $ make O=build BINMAN_INDIRS=/path/to/firmware \
>> + BL31="$BL31" TEE="$TEE"
>
> Same here for BL31 and TEE.
Indeed.
>> +
>> + $ make O=build mt8390_genio_700_evk_defconfig
>> + $ make O=build u-boot.bin spl/u-boot-spl.bin
>
> Do we really need O=build in all of the examples?
We don't, I'll remove it.
>> +The standalone binaries from such a build remain usable, but the packaged
>> +images contain fake external blobs and must not be deployed.
>
> How is it usable if it can't be deployed?
I use it for testing mainly, I'll remove it.
>> +Using Genio Tools
>> +~~~~~~~~~~~~~~~~~
>
> Probably deserves an external link on where to get genio-tools and pre-build
> images.
I'll add a link for the genio-tools. About the pre-build images there is
no place the user can download them from (for now), they are currently
compiled as part of the yocto image / distro.
Thanks,
--
Carlo Caione
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/4] doc: board: mediatek: document Genio 700 SPL boot
2026-07-21 11:22 ` Carlo Caione via U-Boot
@ 2026-07-21 14:50 ` David Lechner via U-Boot
2026-07-21 16:00 ` Carlo Caione via U-Boot
0 siblings, 1 reply; 13+ messages in thread
From: David Lechner via U-Boot @ 2026-07-21 14:50 UTC (permalink / raw)
To: Carlo Caione, GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, Julien Stephan,
Macpaul Lin, Tom Rini, Ilias Apalodimas, Julien Masson,
Johan Jonker, Quentin Schulz, Marek Vasut, Vitor Sato Eschholz
On 7/21/26 6:22 AM, Carlo Caione wrote:
> On Tue Jul 21, 2026 at 2:38 AM CEST, David Lechner wrote:
>> On 7/18/26 11:16 AM, Carlo Caione wrote:
>
...
>>> +``ddr-loader.bin``
>>> + The MediaTek DDR loader for the board. The input may be shorter than
>>> + ``0x4b000`` bytes; binman pads it with zeroes to the offset reserved before
>>> + SPL. It must have been built with ``SPL_OFFSET=0x4b000``,
>>
>> Inconsistent formatting. Should be ...
>>
>> ``SPL``
>> It must ...
>>
>> ?
>
> I don't think I follow. The phrase is '... before SPL', SPL is not an
> external binary file, it should not be on its own line.
Sorry, the `` above threw me off, I thought for a minute that this was
starting a new section. Ignore that comment.
>
>>> + ``SPL_SIZE=CONFIG_SPL_MAX_SIZE`` and an SPL destination and entry address
>>> + matching ``CONFIG_SPL_TEXT_BASE``.
>>> +
>>> +``BL31``
>>
>> Why is this BL31 instead of TF-A?
>
> Because BL31 is compiled (it is) TF-A, they are basically the same
> thing. Is this a nomenclature problem?
I would either expect that the names (TF-A, OP-TEE, U-Boot) to be used
everywhere or BL31, BL32, BL33 to be used everywhere, not a mix of both.
However, I see now that these are existing variable names in binman.
So obviously can't change them.
>
>>> + The path to the TF-A BL31 binary built for MT8188/MT8390. It is loaded and
>>> + entered at ``0x54601000``.
>>> +
>>> +``TEE``
>>> + The path to the OP-TEE binary. A standard OP-TEE v1 ``tee.bin`` image is
>>> + supported. The FIT loads it at ``0x431fffe4`` and enters it at
>>> + ``0x43200000``.
>>> +
...
>
>>> +Using Genio Tools
>>> +~~~~~~~~~~~~~~~~~
>>
>> Probably deserves an external link on where to get genio-tools and pre-build
>> images.
>
> I'll add a link for the genio-tools. About the pre-build images there is
> no place the user can download them from (for now), they are currently
> compiled as part of the yocto image / distro.
>
I was thinking of https://genio.mediatek.com/doc/iot-yocto/latest/sw/yocto/download.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/4] doc: board: mediatek: document Genio 700 SPL boot
2026-07-21 14:50 ` David Lechner via U-Boot
@ 2026-07-21 16:00 ` Carlo Caione via U-Boot
0 siblings, 0 replies; 13+ messages in thread
From: Carlo Caione via U-Boot @ 2026-07-21 16:00 UTC (permalink / raw)
To: David Lechner, Carlo Caione, GSS_MTK_Uboot_upstream, u-boot
Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, Igor Belwon, Julien Stephan,
Macpaul Lin, Tom Rini, Ilias Apalodimas, Julien Masson,
Johan Jonker, Quentin Schulz, Marek Vasut, Vitor Sato Eschholz
On Tue Jul 21, 2026 at 4:50 PM CEST, David Lechner wrote:
>>>> +Using Genio Tools
>>>> +~~~~~~~~~~~~~~~~~
>>>
>>> Probably deserves an external link on where to get genio-tools and pre-build
>>> images.
>>
>> I'll add a link for the genio-tools. About the pre-build images there is
>> no place the user can download them from (for now), they are currently
>> compiled as part of the yocto image / distro.
>>
> I was thinking of https://genio.mediatek.com/doc/iot-yocto/latest/sw/yocto/download.html
Ok, I'm just realizing that I was probably not clear enough on this
point.
That prebuilt image you can download at that link, is indeed usable as
the image directory passed to genio-flash: it provides the partition
metadata and the lk.bin download bootstrap. We have tested that
arrangement, overriding the primary boot artifacts with the newly built
mtk-boot.bin and bootloaders.img (output from this patchset) and it
works correctly.
It cannot, however, provide the external DDR-loader input required to
build these new images. The currently published image contains bl2.img,
which is the legacy monolithic TF-A BL2. After initializing DDR it loads
and parses fip.bin; it does not copy an appended U-Boot SPL from the
fixed offset and enter it at CONFIG_SPL_TEXT_BASE. It therefore cannot
be used as ddr-loader.bin.
The Yocto integration I mentioned generates the compatible DDR loader
and the remaining inputs for the new boot chain (and inputs to the
binman processing in U-Boot), but that work is not merged or published
yet (but it will be, hopefully soon :)
So bottom line is that if you want to use this new SPL, you also need
some kind of special DDR loader firmware that is generated by a not-yet
but soon-to-be available yocto release.
I'll try to clarify better this point in V2 (and I hope this is more
clear now).
Cheers,
--
Carlo Caione
^ permalink raw reply [flat|nested] 13+ messages in thread