Skip to contentSkip to conversation

Add SCMI regulators description on STM32MP21

PATCH New Patrick Delaunay 1 participant 3 messages Nov 17

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

v2 cover Add SCMI regulators description on STM32MP21

Add the description for SCMI regulators provided by OP-TEE firmware. The file named "stm32mp21-regulator.h" is also used in the OP-TEE firmware to have the same SCMI voltd identifiers.

V2 of series [1]

[1] Add SCMI regulators description on STM32MP21

    https://patchwork.kernel.org/series/1210600/

[2] [PATCH 1/3] dt-bindings: add STM32MP21 regulator bindings

    https://patchwork.kernel.org/project/linux-arm-kernel/patch/20261113151038.1.I3b816ba92be5ff94cfe86a2f1c643645416cdb2b@changeid/

Changes in v2:
- Drop the initial patch [2]
The mapping of which ID controls which physical SoC voltage rail or STPMIC1 channel is defined inside OP-TEE SCMI server configuration. It is not a part of device tree binding as pointed by Conor Dooley.

Patrick Delaunay (2):
arm64: dts: st: add SCMI voltage domain regulators for STM32MP211
arm64: dts: st: add SCMI regulators for stm32mp215f-dk board

 arch/arm64/boot/dts/st/stm32mp21-regulator.h | 48 ++++++++++++++++++++
 arch/arm64/boot/dts/st/stm32mp211.dtsi       | 27 +++++++++++
 arch/arm64/boot/dts/st/stm32mp215f-dk.dts    | 23 ++++++++++
 3 files changed, 98 insertions(+)
 create mode 100644 arch/arm64/boot/dts/st/stm32mp21-regulator.h

---
base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
branch: master

Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/2 arm64: dts: st: add SCMI voltage domain regulators for STM32MP211

Add SCMI-based regulator descriptions in the STM32MP211 SoC DTS, covering VDDIO1, VDDIO2, VDDIO3 and VDDA18ADC voltage domains.

These regulators are exposed through the SCMI voltage protocol and will be referenced by board-level DTS files.

---

Changes in v2:
- Move the SCMI ID definitions in stm32mp21-regulator.h to the DTS directory; it is not a part of DT bindings

 arch/arm64/boot/dts/st/stm32mp21-regulator.h | 48 ++++++++++++++++++++
 arch/arm64/boot/dts/st/stm32mp211.dtsi       | 27 +++++++++++
 2 files changed, 75 insertions(+)
 create mode 100644 arch/arm64/boot/dts/st/stm32mp21-regulator.h
arch/arm64/boot/dts/st/stm32mp21-regulator.h new file +48 -0
new file mode 100644
index 000000000000..bf26b7efd2ec
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
+/*
+ * Copyright (C) 2026, STMicroelectronics - All Rights Reserved
+ */
+
+#ifndef __DTS_STM32MP21_REGULATOR_H
+#define __DTS_STM32MP21_REGULATOR_H
+
+/* SCMI voltage domains identifiers */
+
+/* SOC Internal regulators */
+#define VOLTD_SCMI_VDDIO1		0
+#define VOLTD_SCMI_VDDIO2		1
+#define VOLTD_SCMI_VDDIO3		2
+#define VOLTD_SCMI_ADC			3
+#define VOLTD_SCMI_VREFBUF		4
+
+/* STPMIC regulators (STPMIC25/STM32MP2L/STPMIC1L) */
+#define VOLTD_SCMI_STPMIC_BUCK1		5
+#define VOLTD_SCMI_STPMIC_BUCK2		6
+#define VOLTD_SCMI_STPMIC_BUCK3		7
+#define VOLTD_SCMI_STPMIC_BUCK4		8
+#define VOLTD_SCMI_STPMIC_BUCK5		9
+#define VOLTD_SCMI_STPMIC_BUCK6		10
+#define VOLTD_SCMI_STPMIC_BUCK7		11
+#define VOLTD_SCMI_STPMIC_LDO1		12
+#define VOLTD_SCMI_STPMIC_LDO2		13
+#define VOLTD_SCMI_STPMIC_LDO3		14
+#define VOLTD_SCMI_STPMIC_LDO4		15
+#define VOLTD_SCMI_STPMIC_LDO5		16
+#define VOLTD_SCMI_STPMIC_LDO6		17
+#define VOLTD_SCMI_STPMIC_LDO7		18
+#define VOLTD_SCMI_STPMIC_LDO8		19
+#define VOLTD_SCMI_STPMIC_REFDDR	20
+#define VOLTD_SCMI_STPMIC_GPO1		21
+#define VOLTD_SCMI_STPMIC_GPO2		22
+#define VOLTD_SCMI_STPMIC_GPO3		23
+#define VOLTD_SCMI_STPMIC_GPO4		24
+#define VOLTD_SCMI_STPMIC_GPO5		25
+
+/* External regulators */
+#define VOLTD_SCMI_REGU0		26
+#define VOLTD_SCMI_REGU1		27
+#define VOLTD_SCMI_REGU2		28
+#define VOLTD_SCMI_REGU3		29
+#define VOLTD_SCMI_REGU4		30
+
+#endif /* __DTS_STM32MP21_REGULATOR_H */
arch/arm64/boot/dts/st/stm32mp211.dtsi +27 -0
index 4bfd58b26b51..84a2b51d705f 100644
@@ -4,6 +4,7 @@
  * Author: Alexandre Torgue <[email protected]> for STMicroelectronics.
  */
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "stm32mp21-regulator.h"
 
 / {
 	#address-cells = <2>;
@@ -67,6 +68,32 @@ scmi_reset: protocol@16 {
 				reg = <0x16>;
 				#reset-cells = <1>;
 			};
+
+			scmi_voltd: protocol@17 {
+				reg = <0x17>;
+
+				scmi_regu: regulators {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					scmi_vddio1: regulator@0 {
+						reg = <VOLTD_SCMI_VDDIO1>;
+						regulator-name = "vddio1";
+					};
+					scmi_vddio2: regulator@1 {
+						reg = <VOLTD_SCMI_VDDIO2>;
+						regulator-name = "vddio2";
+					};
+					scmi_vddio3: regulator@2 {
+						reg = <VOLTD_SCMI_VDDIO3>;
+						regulator-name = "vddio3";
+					};
+					scmi_vdda18adc: regulator@3 {
+						reg = <VOLTD_SCMI_ADC>;
+						regulator-name = "vdda18adc";
+					};
+				};
+			};
 		};
 	};
 
Signature · 1 line
2.43.0
#2 lore raw

PATCH v2 2/2 arm64: dts: st: add SCMI regulators for stm32mp215f-dk board

In reply to Patrick Delaunay

Add SCMI-based regulator nodes:
- vddcore (BUCK1)
- vdd3v3_usb (LDO4)
- vdd_flash (LDO5)
- vdda_1v8 (LDO6)
- v3v3 (GPO1)

These regulators are provided through the SCMI voltage protocol and will be used by on-board peripherals.

---

(no changes since v1)

 arch/arm64/boot/dts/st/stm32mp215f-dk.dts | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm64/boot/dts/st/stm32mp215f-dk.dts +23 -0
index a1285abc80ca..fc7010bf8d88 100644
@@ -48,6 +48,29 @@ &bsec {
 	bootph-all;
 };
 
+&scmi_regu {
+	scmi_vddcore: regulator@5 {
+		reg = <VOLTD_SCMI_STPMIC_BUCK1>;
+		regulator-name = "vddcore";
+	};
+	scmi_vdd3v3_usb: regulator@f {
+		reg = <VOLTD_SCMI_STPMIC_LDO4>;
+		regulator-name = "vdd3v3_usb";
+	};
+	scmi_vdd_flash: regulator@10 {
+		reg = <VOLTD_SCMI_STPMIC_LDO5>;
+		regulator-name = "vdd_flash";
+	};
+	scmi_vdda_1v8: regulator@11 {
+		reg = <VOLTD_SCMI_STPMIC_LDO6>;
+		regulator-name = "vdda_1v8";
+	};
+	scmi_v3v3: regulator@15 {
+		reg = <VOLTD_SCMI_STPMIC_GPO1>;
+		regulator-name = "v3v3";
+	};
+};
+
 &usart2 {
 	status = "okay";
 };
Signature · 1 line
2.43.0