Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15

From: Rouven Czerwinski
Date: Mon Apr 25 2022 - 06:31:20 EST


Hi,

On Mon, 2022-04-25 at 12:25 +0200, Marek Vasut wrote:
> On 4/25/22 12:19, Etienne CARRIERE wrote:
> > Hello Marek,
>
> Hi,
>
> > > From: Marek Vasut <marex@xxxxxxx>
> > >
> > > > On 4/22/22 17:09, Alexandre Torgue wrote:
> > > > Enable optee and SCMI clocks/reset protocols support.
> > > >
> > > > Signed-off-by: Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx>
> > > >
> > > > diff --git a/arch/arm/boot/dts/stm32mp151.dtsi
> > > > b/arch/arm/boot/dts/stm32mp151.dtsi
> > > > index 7fdc324b3cf9..1b2fd3426a81 100644
> > > > --- a/arch/arm/boot/dts/stm32mp151.dtsi
> > > > +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> > > > @@ -115,6 +115,33 @@
> > > >                 status = "disabled";
> > > >         };
> > > >
> > > > +     firmware {
> > > > +             optee: optee {
> > > > +                     compatible = "linaro,optee-tz";
> > > > +                     method = "smc";
> > > > +                     status = "disabled";
> > > > +             };
> > >
> > > Doesn't this TEE node get automatically generated and patched into DT by
> > > the TEE ? I think OpTee-OS does that.
> >
> > OP-TEE OS does that if it gets passed the DT from early boot stage which is not always the case.
>
> Shouldn't that be something to fix ?
>
> I think R-Car3 does that already.

FWIW it's also possible for OP-TEE to generate a device tree overlay
which can be applied by later boot stages.

Drawback is that you either need an additional parameter to pass
between boot stages (address of the DT overlay) or it needs to be
hardcoded. Hardcoding has it's own bag of drawbacks, but it's what we
do for some i.MX6 platforms within barebox. However there is no TF-A
there, so only OP-TEE and Barebox need to agree on the fixed location
beforehand.

Best regards,
Rouven Czerwinski

--
Pengutronix e.K. | Rouven Czerwinski |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |