[PATCH] arm64: dts: rockchip: remove rk3588 optee node
Chris Morgan
macromorgan at hotmail.com
Fri Jan 31 08:59:31 PST 2025
On Fri, Jan 31, 2025 at 05:46:20PM +0100, Quentin Schulz wrote:
> Hi Chris,
>
> On 1/30/25 7:10 PM, Chris Morgan wrote:
> > From: Chris Morgan <macromorgan at hotmail.com>
> >
> > Remove Optee node from rk3588 devicetree. When Optee is present and
> > used the node will be added automatically by U-Boot when
> > CONFIG_OPTEE_LIB=y and CONFIG_SPL_ATF_NO_PLATFORM_PARAM is not set.
>
> This is too big to ask for right now, 100% of the RK3588 products in
> upstream U-Boot have CONFIG_SPL_ATF_NO_PLATFORM_PARAM set.
You don't have to change it if you don't want to. But if you want the
devicetree to pass through from A-TF to Optee back to U-Boot, you do.
I wasn't even planning to make this the default change for the board
on which I'm doing this work (the Indiedroid Nova), but I was going
to update the documentation to note these steps.
>
> Does it hurt to keep it forever?
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y is a perfectly fine default,
especially if you plan on using the BSP A-TF binary.
>
> > When Optee is not present or used, the node will trigger a probe
> > that generates a (harmless) message on the kernel log.
> >
>
> And what if we have OP-TEE without this node present, which would be
> possible if we have CONFIG_SPL_ATF_NO_PLATFORM_PARAM set in U-Boot?
>
> I guess we could detect from U-Boot if a TEE is loaded as part of u-boot.itb
> and fixup the DTB otherwise to mark this node as status = "disabled"?
>
Based on my understanding of how each of these projects communicate
with each other, Optee can only work if you either include both the
Optee node in the firmware AND the reserved memory nodes yourself, or
if you have neither and let U-Boot do it (by including each of these
patches as well as setting the CONFIG_SPL_ATF_NO_PLATFORM_PARAM). So
basically just this node alone is insufficient for it to work today.
The core issue is that Optee requires you to map the memory as
reserved so that Linux doesn't try to use it. You can either do that
yourself or you can have U-Boot do it automatically. Having the Optee
node in the devicetree makes no sense today unless we also carve out
the memory.
Thank you,
Chris
> Cheers,
> Quentin
More information about the Linux-rockchip
mailing list