Skip to contentSkip to conversation

ARM: dts: stm32: add U-Boot specific dtsi for stm32mp157f-dk2

PATCH In review Dario Binacchi 2 participants 5 messages May 29 – Jul 3

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: dts: stm32: add U-Boot specific dtsi for stm32mp157f-dk2

The STM32MP157F-DK2 board is a direct derivative of the STM32MP157C-DK2. As explained by ST [1], the "STM32MP157F-DK2 is assembled with latest STM32MP15 RevZ cut which is the only one available for new product now. The major differences in this 'F' variant SoC are the increased max frequency of the Cortex-A7 cores and the correction of some HW bugs (Device Rev.Z, see errata ES0438)".

On the software/architecture side, this variant utilizes SCMI (System Control and Management Interface) for secure world resource management. As a consequence, the underlying stm32mp15-scmi.dtsi explicitly deletes several fixed clock nodes (such as clk_hse, clk_hsi, clk_lse, clk_lsi, and clk_csi), making it impossible to include stm32mp157c-dk2-u-boot.dtsi without triggering compilation errors due to these missing clock labels.

So let's introduce a dedicated stm32mp157f-dk2-u-boot.dtsi that directly defines the fwu-mdata node. This provides the necessary FWU metadata configuration required to allow automatic A/B bank selection, supported for STM32MP15 boards by commit 560d8f32703f ("board: st: stm32mp15:
support dynamic A/B bank bootup").

[1] https://community.st.com/t5/stm32-mpus-products-and-hardware/i-m-wondering-what-s-the-difference-point-between-stm32mp157c/td-p/213460

---

Changes in v2:
- Drop the inclusion of stm32mp157c-dk2-u-boot.dtsi to avoid compilation errors caused by deleted clock nodes in stm32mp15-scmi.dtsi.
- Directly define the fwu-mdata node in stm32mp157f-dk2-u-boot.dtsi to properly support automatic A/B bank selection.

 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi new file +11 -0
new file mode 100644
index 000000000000..77805417bfa9
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]>
+ */
+
+/ {
+	fwu-mdata {
+		compatible = "u-boot,fwu-mdata-gpt";
+		fwu-mdata-store = <&sdmmc1>;
+	};
+};
Signature · 4 lines
2.43.0

base-commit: 987907ae4bcc5d6055bdf7d318a3edf53e14d5fa
branch: stm32mp157f-dk2-u-boot
Reviewed-by on v2 1/1
#1 lore raw
Quoted 42 lines · Dario Binacchi

The STM32MP157F-DK2 board is a direct derivative of the STM32MP157C-DK2. As explained by ST [1], the "STM32MP157F-DK2 is assembled with latest STM32MP15 RevZ cut which is the only one available for new product now. The major differences in this 'F' variant SoC are the increased max frequency of the Cortex-A7 cores and the correction of some HW bugs (Device Rev.Z, see errata ES0438)".

On the software/architecture side, this variant utilizes SCMI (System Control and Management Interface) for secure world resource management. As a consequence, the underlying stm32mp15-scmi.dtsi explicitly deletes several fixed clock nodes (such as clk_hse, clk_hsi, clk_lse, clk_lsi, and clk_csi), making it impossible to include stm32mp157c-dk2-u-boot.dtsi without triggering compilation errors due to these missing clock labels.

So let's introduce a dedicated stm32mp157f-dk2-u-boot.dtsi that directly defines the fwu-mdata node. This provides the necessary FWU metadata configuration required to allow automatic A/B bank selection, supported for STM32MP15 boards by commit 560d8f32703f ("board: st: stm32mp15:
support dynamic A/B bank bootup").

[1] https://community.st.com/t5/stm32-mpus-products-and-hardware/i-m-wondering-what-s-the-difference-point-between-stm32mp157c/td-p/213460

---

Changes in v2:
- Drop the inclusion of stm32mp157c-dk2-u-boot.dtsi to avoid compilation errors caused by deleted clock nodes in stm32mp15-scmi.dtsi.
- Directly define the fwu-mdata node in stm32mp157f-dk2-u-boot.dtsi to properly support automatic A/B bank selection.

 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi new file +1 -0
new file mode 100644
index 000000000000..77805417bfa9
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+

arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi line 11

Quoted 10 lines
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi new file +10 -0
+/*
+ * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]>
+ */
+
+/ {
+	fwu-mdata {
+		compatible = "u-boot,fwu-mdata-gpt";
+		fwu-mdata-store = <&sdmmc1>;
+	};
+};

Thanks
Patrice

#2 lore raw
In reply to Dario Binacchi
Quoted 42 lines · Dario Binacchi

The STM32MP157F-DK2 board is a direct derivative of the STM32MP157C-DK2. As explained by ST [1], the "STM32MP157F-DK2 is assembled with latest STM32MP15 RevZ cut which is the only one available for new product now. The major differences in this 'F' variant SoC are the increased max frequency of the Cortex-A7 cores and the correction of some HW bugs (Device Rev.Z, see errata ES0438)".

On the software/architecture side, this variant utilizes SCMI (System Control and Management Interface) for secure world resource management. As a consequence, the underlying stm32mp15-scmi.dtsi explicitly deletes several fixed clock nodes (such as clk_hse, clk_hsi, clk_lse, clk_lsi, and clk_csi), making it impossible to include stm32mp157c-dk2-u-boot.dtsi without triggering compilation errors due to these missing clock labels.

So let's introduce a dedicated stm32mp157f-dk2-u-boot.dtsi that directly defines the fwu-mdata node. This provides the necessary FWU metadata configuration required to allow automatic A/B bank selection, supported for STM32MP15 boards by commit 560d8f32703f ("board: st: stm32mp15:
support dynamic A/B bank bootup").

[1] https://community.st.com/t5/stm32-mpus-products-and-hardware/i-m-wondering-what-s-the-difference-point-between-stm32mp157c/td-p/213460

---

Changes in v2:
- Drop the inclusion of stm32mp157c-dk2-u-boot.dtsi to avoid compilation errors caused by deleted clock nodes in stm32mp15-scmi.dtsi.
- Directly define the fwu-mdata node in stm32mp157f-dk2-u-boot.dtsi to properly support automatic A/B bank selection.

 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi new file +1 -0
new file mode 100644
index 000000000000..77805417bfa9
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+

arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi line 11

Quoted 10 lines
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi new file +10 -0
+/*
+ * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]>
+ */
+
+/ {
+	fwu-mdata {
+		compatible = "u-boot,fwu-mdata-gpt";
+		fwu-mdata-store = <&sdmmc1>;
+	};
+};

Hi Dario

What about including stm32mp157c-dk2-u-boot.dtsi instead of defining fwu-mdata node ?

Thanks
Patrice

#3 lore raw

Hi Patrice

Quoted 59 lines · Patrice CHOTARD
Quoted 42 lines · Dario Binacchi

The STM32MP157F-DK2 board is a direct derivative of the STM32MP157C-DK2. As explained by ST [1], the "STM32MP157F-DK2 is assembled with latest STM32MP15 RevZ cut which is the only one available for new product now. The major differences in this 'F' variant SoC are the increased max frequency of the Cortex-A7 cores and the correction of some HW bugs (Device Rev.Z, see errata ES0438)".

On the software/architecture side, this variant utilizes SCMI (System Control and Management Interface) for secure world resource management. As a consequence, the underlying stm32mp15-scmi.dtsi explicitly deletes several fixed clock nodes (such as clk_hse, clk_hsi, clk_lse, clk_lsi, and clk_csi), making it impossible to include stm32mp157c-dk2-u-boot.dtsi without triggering compilation errors due to these missing clock labels.

So let's introduce a dedicated stm32mp157f-dk2-u-boot.dtsi that directly defines the fwu-mdata node. This provides the necessary FWU metadata configuration required to allow automatic A/B bank selection, supported for STM32MP15 boards by commit 560d8f32703f ("board: st: stm32mp15:
support dynamic A/B bank bootup").

[1] https://community.st.com/t5/stm32-mpus-products-and-hardware/i-m-wondering-what-s-the-difference-point-between-stm32mp157c/td-p/213460

---

Changes in v2:
- Drop the inclusion of stm32mp157c-dk2-u-boot.dtsi to avoid compilation errors caused by deleted clock nodes in stm32mp15-scmi.dtsi.
- Directly define the fwu-mdata node in stm32mp157f-dk2-u-boot.dtsi to properly support automatic A/B bank selection.

 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi new file +1 -0
new file mode 100644
index 000000000000..77805417bfa9
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+

arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi line 11

Quoted 10 lines
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi new file +10 -0
+/*
+ * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]>
+ */
+
+/ {
+     fwu-mdata {
+             compatible = "u-boot,fwu-mdata-gpt";
+             fwu-mdata-store = <&sdmmc1>;
+     };
+};

Hi Dario

Quoted 1 line

What about including stm32mp157c-dk2-u-boot.dtsi instead of defining fwu-mdata node ?

This was actually the approach used in v1. However, as you pointed out in the v1 thread [1], it does not build because stm32mp15-scmi.dtsi removes the clk_hse, clk_hsi, clk_lse, clk_lsi and clk_csi labels referenced by stm32mp157c-dk2-u-boot.dtsi.

That's why I dropped the include in v2 and defined only the fwu-mdata node locally.

Or am I perhaps missing something?

[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks and regards,
Dario

Quoted 3 lines

Thanks
Patrice

Signature · 9 lines
Dario Binacchi
Senior Embedded Software Engineer
M. +39 328 0625246
[email protected]
―――――――――――――――
Amarula Solutions SRL
 Via Felice Cavallotti 25D, 41012 Carpi, MO, IT
[email protected]
www.amarulasolutions.com
#4 lore raw
Quoted 70 lines · Dario Binacchi

Hi Patrice

Quoted 59 lines · Patrice CHOTARD
Quoted 42 lines · Dario Binacchi

The STM32MP157F-DK2 board is a direct derivative of the STM32MP157C-DK2. As explained by ST [1], the "STM32MP157F-DK2 is assembled with latest STM32MP15 RevZ cut which is the only one available for new product now. The major differences in this 'F' variant SoC are the increased max frequency of the Cortex-A7 cores and the correction of some HW bugs (Device Rev.Z, see errata ES0438)".

On the software/architecture side, this variant utilizes SCMI (System Control and Management Interface) for secure world resource management. As a consequence, the underlying stm32mp15-scmi.dtsi explicitly deletes several fixed clock nodes (such as clk_hse, clk_hsi, clk_lse, clk_lsi, and clk_csi), making it impossible to include stm32mp157c-dk2-u-boot.dtsi without triggering compilation errors due to these missing clock labels.

So let's introduce a dedicated stm32mp157f-dk2-u-boot.dtsi that directly defines the fwu-mdata node. This provides the necessary FWU metadata configuration required to allow automatic A/B bank selection, supported for STM32MP15 boards by commit 560d8f32703f ("board: st: stm32mp15:
support dynamic A/B bank bootup").

[1] https://community.st.com/t5/stm32-mpus-products-and-hardware/i-m-wondering-what-s-the-difference-point-between-stm32mp157c/td-p/213460

---

Changes in v2:
- Drop the inclusion of stm32mp157c-dk2-u-boot.dtsi to avoid compilation errors caused by deleted clock nodes in stm32mp15-scmi.dtsi.
- Directly define the fwu-mdata node in stm32mp157f-dk2-u-boot.dtsi to properly support automatic A/B bank selection.

 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi new file +1 -0
new file mode 100644
index 000000000000..77805417bfa9
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+

arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi line 11

Quoted 10 lines
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi new file +10 -0
+/*
+ * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]>
+ */
+
+/ {
+     fwu-mdata {
+             compatible = "u-boot,fwu-mdata-gpt";
+             fwu-mdata-store = <&sdmmc1>;
+     };
+};

Hi Dario

Quoted 1 line

What about including stm32mp157c-dk2-u-boot.dtsi instead of defining fwu-mdata node ?

This was actually the approach used in v1. However, as you pointed out in the v1 thread [1], it does not build because stm32mp15-scmi.dtsi removes the clk_hse, clk_hsi, clk_lse, clk_lsi and clk_csi labels referenced by stm32mp157c-dk2-u-boot.dtsi.

Quoted 4 lines

That's why I dropped the include in v2 and defined only the fwu-mdata node locally.

Or am I perhaps missing something?

Hi Dario

Sorry, you are right, it's just following an internal discussion with Patrick and i totally forgot your v1 implementation already included stm32mp157c-dk2-u-boot.dtsi and has compilatioj issue.

Patrice

Quoted 12 lines

[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks and regards,
Dario

Quoted 3 lines

Thanks
Patrice