Skip to contentSkip to conversation

board/stmicroelectronics/stm32mp135f-dk: fix silent crash in U-Boot

PATCH Superseded Thomas Richard via buildroot 1 participant 2 messages Feb 10 – Feb 13 Arm STM32

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board/stmicroelectronics/stm32mp135f-dk: fix silent crash in U-Boot

Backport upstream patches to fix a silent crash in U-Boot on STM32MP135F-DK.

---
 ...d-SCMI-clocks-in-rcc-node-for-stm32m.patch |   57 +
 ...te-clock-management-for-STM32MP13-25.patch | 1546 +++++++++++++++++
 2 files changed, 1603 insertions(+)
 create mode 100644 board/stmicroelectronics/common/stm32mp1xx/patches/uboot/001-ARM-dts-stm32-Add-SCMI-clocks-in-rcc-node-for-stm32m.patch
 create mode 100644 board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch
board/stmicroelectronics/common/stm32mp1xx/patches/uboot/001-ARM-dts-stm32-Add-SCMI-clocks-in-rcc-node-for-stm32m.patch new file +57 -0
new file mode 100644
index 0000000000..a1550476f1
@@ -0,0 +1,57 @@
+From 7795c5ec6a608a104cf41331cbd387d39f7f6f49 Mon Sep 17 00:00:00 2001
+From: Patrice Chotard <[email protected]>
+Date: Fri, 16 Jan 2026 19:57:26 +0100
+Subject: [PATCH] ARM: dts: stm32: Add SCMI clocks in rcc node for
+ stm32mp131.dtsi
+
+Add SCMI clocks. These clocks are used as parent clocks and are
+referenced by their rcc's node position in clk-stm32mp13.c
+
+Fixes: fdb1bffe2827 ("clk: scmi: Postpone clock name resolution")
+Reviewed-by: Patrick Delaunay <[email protected]>
+Signed-off-by: Patrice Chotard <[email protected]>
+---
+ arch/arm/dts/stm32mp13-u-boot.dtsi | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/arch/arm/dts/stm32mp13-u-boot.dtsi b/arch/arm/dts/stm32mp13-u-boot.dtsi
+index ad63d5027b2..623c796cc79 100644
+--- a/arch/arm/dts/stm32mp13-u-boot.dtsi
++++ b/arch/arm/dts/stm32mp13-u-boot.dtsi
+@@ -186,6 +186,33 @@
+ };
+ 
+ &rcc {
++	clocks = <&scmi_clk CK_SCMI_HSE>,
++		 <&scmi_clk CK_SCMI_HSI>,
++		 <&scmi_clk CK_SCMI_CSI>,
++		 <&scmi_clk CK_SCMI_LSE>,
++		 <&scmi_clk CK_SCMI_LSI>,
++		 <&scmi_clk CK_SCMI_HSE_DIV2>,
++		 <&scmi_clk CK_SCMI_PLL2_Q>,
++		 <&scmi_clk CK_SCMI_PLL2_R>,
++		 <&scmi_clk CK_SCMI_PLL3_P>,
++		 <&scmi_clk CK_SCMI_PLL3_Q>,
++		 <&scmi_clk CK_SCMI_PLL3_R>,
++		 <&scmi_clk CK_SCMI_PLL4_P>,
++		 <&scmi_clk CK_SCMI_PLL4_Q>,
++		 <&scmi_clk CK_SCMI_PLL4_R>,
++		 <&scmi_clk CK_SCMI_MPU>,
++		 <&scmi_clk CK_SCMI_AXI>,
++		 <&scmi_clk CK_SCMI_MLAHB>,
++		 <&scmi_clk CK_SCMI_CKPER>,
++		 <&scmi_clk CK_SCMI_PCLK1>,
++		 <&scmi_clk CK_SCMI_PCLK2>,
++		 <&scmi_clk CK_SCMI_PCLK3>,
++		 <&scmi_clk CK_SCMI_PCLK4>,
++		 <&scmi_clk CK_SCMI_PCLK5>,
++		 <&scmi_clk CK_SCMI_PCLK6>,
++		 <&scmi_clk CK_SCMI_CKTIMG1>,
++		 <&scmi_clk CK_SCMI_CKTIMG2>,
++		 <&scmi_clk CK_SCMI_CKTIMG3>;
+ 	bootph-all;
+ };
+ 
+-- 
+2.51.0
+
board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch new file +1546 -0

1,546 lines not on this page · raw message

Signature · 6 lines
2.51.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi Thomas,

Thanks for the patch.

It generates errors when running the command
"utils/docker-run make check-package". See below.

Quoted 22 lines · Thomas Richard via buildroot

Backport upstream patches to fix a silent crash in U-Boot on STM32MP135F-DK.

---
 ...d-SCMI-clocks-in-rcc-node-for-stm32m.patch |   57 +
 ...te-clock-management-for-STM32MP13-25.patch | 1546 +++++++++++++++++
 2 files changed, 1603 insertions(+)
 create mode 100644 
board/stmicroelectronics/common/stm32mp1xx/patches/uboot/001-ARM-dts-stm32-Add-SCMI-clocks-in-rcc-node-for-stm32m.patch
 create mode 100644 

board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch

(quoted diff) +0 -0
new file mode 100644
index 0000000000..a1550476f1

b/board/stmicroelectronics/common/stm32mp1xx/patches/uboot/001-ARM-dts-stm32-Add-SCMI-clocks-in-rcc-node-for-stm32m.patch

board/stmicroelectronics/common/stm32mp1xx/patches/uboot/001-ARM-dts-stm32-Add-SCMI-clocks-in-rcc-node-for-stm32m.patch new file +2 -0
@@ -0,0 +1,57 @@
+From 7795c5ec6a608a104cf41331cbd387d39f7f6f49 Mon Sep 17 00:00:00 2001
+From: Patrice Chotard <[email protected]>

board/stmicroelectronics/common/stm32mp1xx/patches/uboot/001-ARM-dts-stm32-Add-SCMI-clocks-in-rcc-node-for-stm32m.patch line 12

Quoted 10 lines
board/stmicroelectronics/common/stm32mp1xx/patches/uboot/001-ARM-dts-stm32-Add-SCMI-clocks-in-rcc-node-for-stm32m.patch new file +10 -0
+Date: Fri, 16 Jan 2026 19:57:26 +0100
+Subject: [PATCH] ARM: dts: stm32: Add SCMI clocks in rcc node for
+ stm32mp131.dtsi
+
+Add SCMI clocks. These clocks are used as parent clocks and are
+referenced by their rcc's node position in clk-stm32mp13.c
+
+Fixes: fdb1bffe2827 ("clk: scmi: Postpone clock name resolution")
+Reviewed-by: Patrick Delaunay <[email protected]>
+Signed-off-by: Patrice Chotard <[email protected]>

To make maintenance easier, we ask in Buildroot to add an "Upstream:" tag for make tracking easier. For example:

Upstream: https://source.denx.de/u-boot/u-boot/-/commit/7795c5ec6a608a104cf41331cbd387d39f7f6f49

Since you manipulated this patch yourself, you should also add your line:

Quoted 3 lines
board/stmicroelectronics/common/stm32mp1xx/patches/uboot/001-ARM-dts-stm32-Add-SCMI-clocks-in-rcc-node-for-stm32m.patch new file +3 -0
+---
+ arch/arm/dts/stm32mp13-u-boot.dtsi | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)

[...]

Quoted 33 lines
(quoted diff) +0 -0
new file mode 100644
index 0000000000..e9c2c7b1f5

b/board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch

board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch new file +7 -1
@@ -0,0 +1,1546 @@
+From 213f927a59288bbaa4b141c593424c3b205b5e6c Mon Sep 17 00:00:00 2001
+From: Patrice Chotard <[email protected]>
+Date: Fri, 16 Jan 2026 19:57:27 +0100
+Subject: [PATCH] clk: stm32: Update clock management for STM32MP13/25
+
+During clock's registration, clock's name are used to establish parent 
-
+child relation. On STM32MP13 and STM32MP25, most of SCMI clocks are 

parent

board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch new file +3 -0
+clocks.
+
+Since commit fdb1bffe2827 ("clk: scmi: Postpone clock name 

resolution"),
+all scmi clocks are named by default "scmi-%zu" until they are enabled,

board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch new file +9 -0
+it breaks clocks registration and boot process for STM32MP13/25
+platforms.
+
+Rework the STM32 core clock driver and STM32MP13/25 clock description
+to use clock index instead of their real name.
+
+Introduce struct clk_parent_data which allows to identify parent clock
+either by index or by name. Name is only used for particular clocks
+provided by IP which are clock provider as i2s/i2s_ckin, 

usb0/ck_usbo_48m,

board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch new file +1 -0
+and ltdc/ck_ker_ltdc.

board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch line 31

Quoted 10 lines
board/stmicroelectronics/common/stm32mp1xx/patches/uboot/002-clk-stm32-Update-clock-management-for-STM32MP13-25.patch new file +10 -0
+
+STM32_GATE() and STM32_COMPOSITE_NOMUX macros are updated in order to
+use parent clock index.
+
+As STM32MP13 supports both SPL and SCMI boot, keep using an array
+with clock's name for SPL.
+
+Fixes: fdb1bffe2827 ("clk: scmi: Postpone clock name resolution")
+Reviewed-by: Patrick Delaunay <[email protected]>
+Signed-off-by: Patrice Chotard <[email protected]>

Same comment here:

Upstream: https://source.denx.de/u-boot/u-boot/-/commit/213f927a59288bbaa4b141c593424c3b205b5e6c

Could you send an updated patch please?

Best regards,

Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot