* [PATCH 1/2] dt-bindings: arm: stm32: don't mix SCMI and non-SCMI board compatibles
@ 2023-11-22 18:52 Ahmad Fatoum
2023-11-22 18:52 ` [PATCH 2/2] ARM: dts: " Ahmad Fatoum
2023-11-27 20:36 ` [PATCH 1/2] dt-bindings: arm: " Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2023-11-22 18:52 UTC (permalink / raw)
To: Maxime Coquelin, Alexandre Torgue, Rob Herring
Cc: kernel, Ahmad Fatoum, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
SCMI-enabled boards may restrict access to resources like clocks, resets
and regulators to the secure world.
A normal world bootloader or kernel compatible with the non-SCMI-enabled
board is thus not guaranteed to be able to deal with the SCMI variant.
It follows, that the SCMI-enabled board is not compatible with the
non-SCMI enabled board, so drop that compatible.
This change is motivated by the barebox' bootloader's use of bootloader
specification files[1][2]: barebox for non-SCMI DK2 will compare its
own top-level "stm32mp157c-dk2" compatible with all compatibles
listed in the device tree referenced by each bootloader spec file.
If the boot medium contains a configuration with
compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157";
it will match, because of the second compatible and boot a kernel with
SCMI enabled, although no SCMI may exist on the platform.
[1]: https://uapi-group.org/specifications/specs/boot_loader_specification/
[2]: https://www.barebox.org/doc/latest/user/booting-linux.html#boot-loader-specification
Fixes: 8e14ebb1f08f ("dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
.../devicetree/bindings/arm/stm32/stm32.yaml | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
index df087c81c69e..bc2f43330ae4 100644
--- a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
+++ b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
@@ -82,29 +82,19 @@ properties:
- shiratech,stm32mp157a-iot-box # IoT Box
- shiratech,stm32mp157a-stinger96 # Stinger96
- st,stm32mp157c-ed1
+ - st,stm32mp157c-ed1-scmi
- st,stm32mp157a-dk1
+ - st,stm32mp157a-dk1-scmi
- st,stm32mp157c-dk2
+ - st,stm32mp157c-dk2-scmi
- const: st,stm32mp157
- - items:
- - const: st,stm32mp157a-dk1-scmi
- - const: st,stm32mp157a-dk1
- - const: st,stm32mp157
- - items:
- - const: st,stm32mp157c-dk2-scmi
- - const: st,stm32mp157c-dk2
- - const: st,stm32mp157
- - items:
- - const: st,stm32mp157c-ed1-scmi
- - const: st,stm32mp157c-ed1
- - const: st,stm32mp157
- items:
- const: st,stm32mp157c-ev1
- const: st,stm32mp157c-ed1
- const: st,stm32mp157
- items:
- const: st,stm32mp157c-ev1-scmi
- - const: st,stm32mp157c-ev1
- const: st,stm32mp157c-ed1
- const: st,stm32mp157
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] ARM: dts: stm32: don't mix SCMI and non-SCMI board compatibles 2023-11-22 18:52 [PATCH 1/2] dt-bindings: arm: stm32: don't mix SCMI and non-SCMI board compatibles Ahmad Fatoum @ 2023-11-22 18:52 ` Ahmad Fatoum 2023-12-14 15:37 ` Alexandre TORGUE 2023-11-27 20:36 ` [PATCH 1/2] dt-bindings: arm: " Rob Herring 1 sibling, 1 reply; 4+ messages in thread From: Ahmad Fatoum @ 2023-11-22 18:52 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin, Alexandre Torgue Cc: kernel, Ahmad Fatoum, devicetree, linux-stm32, linux-arm-kernel, linux-kernel The binding erroneously decreed that the SCMI variants of the ST evaluation kits are compatible with the non-SCMI variants. This is not correct, as a kernel or bootloader compatible with the non-SCMI variant is not necessarily able to function, when direct access to resources is replaced by having to talk SCMI to the secure monitor. The binding has been adjusted to reflect thus, so synchronize the device trees now. Fixes: 5b7e58313a77 ("ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts | 2 +- arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts | 2 +- arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts | 2 +- arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts b/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts index afcd6285890c..c27963898b5e 100644 --- a/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts +++ b/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts @@ -11,7 +11,7 @@ / { model = "STMicroelectronics STM32MP157A-DK1 SCMI Discovery Board"; - compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157a-dk1", "st,stm32mp157"; + compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157"; reserved-memory { optee@de000000 { diff --git a/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts b/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts index 39358d902000..622618943134 100644 --- a/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts +++ b/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts @@ -11,7 +11,7 @@ / { model = "STMicroelectronics STM32MP157C-DK2 SCMI Discovery Board"; - compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157"; + compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157"; reserved-memory { optee@de000000 { diff --git a/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts b/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts index 07ea765a4553..c7c4d7e89d61 100644 --- a/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts +++ b/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts @@ -11,7 +11,7 @@ / { model = "STMicroelectronics STM32MP157C-ED1 SCMI eval daughter"; - compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157"; + compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157"; reserved-memory { optee@fe000000 { diff --git a/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts b/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts index 813086ec2489..2ab77e64f1bb 100644 --- a/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts +++ b/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts @@ -11,8 +11,7 @@ / { model = "STMicroelectronics STM32MP157C-EV1 SCMI eval daughter on eval mother"; - compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", - "st,stm32mp157"; + compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157"; reserved-memory { optee@fe000000 { -- 2.39.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ARM: dts: stm32: don't mix SCMI and non-SCMI board compatibles 2023-11-22 18:52 ` [PATCH 2/2] ARM: dts: " Ahmad Fatoum @ 2023-12-14 15:37 ` Alexandre TORGUE 0 siblings, 0 replies; 4+ messages in thread From: Alexandre TORGUE @ 2023-12-14 15:37 UTC (permalink / raw) To: Ahmad Fatoum, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin Cc: kernel, devicetree, linux-stm32, linux-arm-kernel, linux-kernel Hi Ahmad On 11/22/23 19:52, Ahmad Fatoum wrote: > The binding erroneously decreed that the SCMI variants of the ST > evaluation kits are compatible with the non-SCMI variants. > > This is not correct, as a kernel or bootloader compatible with the non-SCMI > variant is not necessarily able to function, when direct access > to resources is replaced by having to talk SCMI to the secure monitor. > > The binding has been adjusted to reflect thus, so synchronize the device > trees now. > > Fixes: 5b7e58313a77 ("ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)") > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > --- Thanks to have fix my error. Both patches applied on stm32-next. Cheers Alex > arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts | 2 +- > arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts | 2 +- > arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts | 2 +- > arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts | 3 +-- > 4 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts b/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts > index afcd6285890c..c27963898b5e 100644 > --- a/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts > +++ b/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts > @@ -11,7 +11,7 @@ > > / { > model = "STMicroelectronics STM32MP157A-DK1 SCMI Discovery Board"; > - compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157a-dk1", "st,stm32mp157"; > + compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157"; > > reserved-memory { > optee@de000000 { > diff --git a/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts b/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts > index 39358d902000..622618943134 100644 > --- a/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts > +++ b/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts > @@ -11,7 +11,7 @@ > > / { > model = "STMicroelectronics STM32MP157C-DK2 SCMI Discovery Board"; > - compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157"; > + compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157"; > > reserved-memory { > optee@de000000 { > diff --git a/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts b/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts > index 07ea765a4553..c7c4d7e89d61 100644 > --- a/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts > +++ b/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts > @@ -11,7 +11,7 @@ > > / { > model = "STMicroelectronics STM32MP157C-ED1 SCMI eval daughter"; > - compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157"; > + compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157"; > > reserved-memory { > optee@fe000000 { > diff --git a/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts b/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts > index 813086ec2489..2ab77e64f1bb 100644 > --- a/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts > +++ b/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts > @@ -11,8 +11,7 @@ > > / { > model = "STMicroelectronics STM32MP157C-EV1 SCMI eval daughter on eval mother"; > - compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", > - "st,stm32mp157"; > + compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157"; > > reserved-memory { > optee@fe000000 { _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: arm: stm32: don't mix SCMI and non-SCMI board compatibles 2023-11-22 18:52 [PATCH 1/2] dt-bindings: arm: stm32: don't mix SCMI and non-SCMI board compatibles Ahmad Fatoum 2023-11-22 18:52 ` [PATCH 2/2] ARM: dts: " Ahmad Fatoum @ 2023-11-27 20:36 ` Rob Herring 1 sibling, 0 replies; 4+ messages in thread From: Rob Herring @ 2023-11-27 20:36 UTC (permalink / raw) To: Ahmad Fatoum Cc: Maxime Coquelin, linux-stm32, devicetree, Alexandre Torgue, Rob Herring, Conor Dooley, linux-arm-kernel, linux-kernel, Krzysztof Kozlowski, kernel On Wed, 22 Nov 2023 19:52:33 +0100, Ahmad Fatoum wrote: > SCMI-enabled boards may restrict access to resources like clocks, resets > and regulators to the secure world. > > A normal world bootloader or kernel compatible with the non-SCMI-enabled > board is thus not guaranteed to be able to deal with the SCMI variant. > > It follows, that the SCMI-enabled board is not compatible with the > non-SCMI enabled board, so drop that compatible. > > This change is motivated by the barebox' bootloader's use of bootloader > specification files[1][2]: barebox for non-SCMI DK2 will compare its > own top-level "stm32mp157c-dk2" compatible with all compatibles > listed in the device tree referenced by each bootloader spec file. > If the boot medium contains a configuration with > compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157"; > it will match, because of the second compatible and boot a kernel with > SCMI enabled, although no SCMI may exist on the platform. > > [1]: https://uapi-group.org/specifications/specs/boot_loader_specification/ > [2]: https://www.barebox.org/doc/latest/user/booting-linux.html#boot-loader-specification > > Fixes: 8e14ebb1f08f ("dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)") > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > --- > .../devicetree/bindings/arm/stm32/stm32.yaml | 16 +++------------- > 1 file changed, 3 insertions(+), 13 deletions(-) > Acked-by: Rob Herring <robh@kernel.org> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-14 15:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-11-22 18:52 [PATCH 1/2] dt-bindings: arm: stm32: don't mix SCMI and non-SCMI board compatibles Ahmad Fatoum 2023-11-22 18:52 ` [PATCH 2/2] ARM: dts: " Ahmad Fatoum 2023-12-14 15:37 ` Alexandre TORGUE 2023-11-27 20:36 ` [PATCH 1/2] dt-bindings: arm: " Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).