Re: [PATCH v2 0/7] Import optee node from u-boot device trees
From: Marco Felsch
Date: Wed Jul 15 2026 - 11:26:07 EST
Hi Mathieu,
On 26-07-15, Mathieu Dubois-Briand wrote:
> In a recent discussion on the U-Boot mailing list [1], it was found out
> that several platforms were adding the OP-TEE device tree-node thanks to
> some U-Boot specific dtsi. This was deemed as a bad solution, as this
> should instead be added in the DTS files hosted in Linux sources,
> particularly for platforms already using the "upstream" (Linux) device
> tree.
>
> Most i.MX8 and i.MX9 platforms are already using OF_UPSTREAM
> configuration in U-Boot. Some are not, but are fairly new, so we can
> expect them to use the Linux device tree once their support is a bit
> more stable. So they will benefit from these changes once upstream
> device trees are refreshed in U-Boot.
>
> STM32MP157 platforms are using OF_UPSTREAM, with similar consequences.
>
> The two other platforms are using an U-Boot specific device tree, yet
> adding these nodes on the kernel side will help to reduce the
> differences.
>
> The zynqmp platform was ignored, as a similar change was previously
> reverted [2]. I also ignored a few platforms without direct match
> between U-Boot and Linux dts files.
We do the same in barebox bootloader for all OP-TEE supported i.MX
platforms. Therefore this change would cause a regression for barebox as
well.
Furthermore, this change would cause an anyoing dmesg warning on
platforms which don't use OP-TEE at all, because it's not ensured that
the OP-TEE firmware was actually loaded.
Therefore the bootloader adds the OP-TEE nodes only if the OP-TEE binary
was actually loaded.
Therefore I vote for dynamic adding the nodes and not this static
approach.
Furthermore OP-TEE can provide a DTB overlay fragment with all the
required nodes, which you only need to apply within the bootloader. This
is cleanest way. You only need to provide OP-TEE the DTB location during
runtime.
Regards,
Marco
> Also add the OP-TEE node on the imx93 FRDM platform device tree: while
> this is not part of U-Boot code today, it is the change that triggered
> the U-Boot discussion.
>
> [1]: https://lore.kernel.org/all/20260706145906.GW749385@bill-the-cat/
> [2]: https://lore.kernel.org/all/20251125-revert-zynqmp-optee-v1-1-d2ce4c0fcaf6@xxxxxxxxxxx/
>
> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@xxxxxxxxxxx>
> ---
> Changes in v2:
> - Splitting i.MX8 SoC changes in a separate commit.
> - Adding bootph-pre-ram on stm32mp157c-ed1 reserved memory.
> - Rebased on v7.2-rc3.
> - Link to v1: https://lore.kernel.org/r/20260710-mathieu-uboot-dts-import-v1-0-ffe0210e50c9@xxxxxxxxxxx
>
> ---
> Mathieu Dubois-Briand (7):
> arm64: dts: freescale: Import optee node from u-boot i.MX91 and i.MX93 device trees
> arm64: dts: freescale: Import optee node from u-boot i.MX8 device trees
> arm: dts: st: Import optee node from u-boot device trees
> arm: dts: st: stm32mp157c-ed1: Add bootph-pre-ram tag on optee reserved memory
> arm64: dts: hisilicon: hi3798cv200-poplar: Import optee node from u-boot device tree
> arm64: dts: nuvoton: npcm845-evb: Import optee node from u-boot device tree
> arm64: dts: freescale: imx93-frdm: Add OP-TEE device tree node
>
> arch/arm/boot/dts/st/stm32mp157a-dk1.dts | 17 +++++++++++++++++
> arch/arm/boot/dts/st/stm32mp157c-ed1.dts | 14 ++++++++++++++
> arch/arm64/boot/dts/freescale/imx8mm.dtsi | 7 +++++++
> arch/arm64/boot/dts/freescale/imx8mn.dtsi | 7 +++++++
> arch/arm64/boot/dts/freescale/imx8mp.dtsi | 7 +++++++
> arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts | 7 +++++++
> arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts | 7 +++++++
> arch/arm64/boot/dts/freescale/imx91-phyboard-segin.dts | 7 +++++++
> arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 7 +++++++
> arch/arm64/boot/dts/freescale/imx93-11x11-frdm.dts | 7 +++++++
> arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 7 +++++++
> .../arm64/boot/dts/freescale/imx93-kontron-bl-osm-s.dts | 7 +++++++
> arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts | 7 +++++++
> .../arm64/boot/dts/freescale/imx93-var-som-symphony.dts | 7 +++++++
> arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts | 7 +++++++
> arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts | 7 +++++++
> 16 files changed, 129 insertions(+)
> ---
> base-commit: a13c140cc289c0b7b3770bce5b3ad42ab35074aa
> change-id: 20260710-mathieu-uboot-dts-import-69f51bc097d7
>
> Best regards,
> --
> Mathieu Dubois-Briand <mathieu.dubois-briand@xxxxxxxxxxx>
>
>
>
--
#gernperDu
#CallMeByMyFirstName
Pengutronix e.K. | |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |