[PATCH 10/14] [WIP] dts: arm: stm32mp15: enable SCMI regulators (PWR & PMIC) on MP15-DK*

Etienne Carriere etienne.carriere at linaro.org
Thu Nov 4 15:23:20 CET 2021


Signed-off-by: Etienne Carriere <etienne.carriere at linaro.org>
---
 arch/arm/dts/stm32mp151.dtsi      |  40 +++++++++-
 arch/arm/dts/stm32mp15xx-dkx.dtsi | 122 +++++++++++++++++++++++++-----
 2 files changed, 138 insertions(+), 24 deletions(-)

diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi
index db48077375..cb6a14ec0c 100644
--- a/arch/arm/dts/stm32mp151.dtsi
+++ b/arch/arm/dts/stm32mp151.dtsi
@@ -5,6 +5,7 @@
  */
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/stm32mp1-clks.h>
+#include <dt-bindings/regulator/st,stm32mp15-regulator.h>
 #include <dt-bindings/reset/stm32mp1-resets.h>
 
 / {
@@ -91,6 +92,37 @@
 				reg = <0x16>;
 				#reset-cells = <1>;
 			};
+
+			scmi0_voltd: protocol at 17 {
+				reg = <0x17>;
+
+				scmi0_reguls: regulators {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					reg11: reg11 {
+						reg = <VOLTD_SCMI0_REG11>;
+						regulator-name = "reg11";
+						regulator-min-microvolt = <1100000>;
+						regulator-max-microvolt = <1100000>;
+					};
+
+					reg18: reg18 {
+						voltd-name = "reg18";
+						reg = <VOLTD_SCMI0_REG18>;
+						regulator-name = "reg18";
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <1800000>;
+					};
+
+					usb33: usb33 {
+						reg = <VOLTD_SCMI0_USB33>;
+						regulator-name = "usb33";
+						regulator-min-microvolt = <3300000>;
+						regulator-max-microvolt = <3300000>;
+					};
+				};
+			};
 		};
 
 		scmi1: scmi1 {
@@ -1190,20 +1222,22 @@
 		pwr_regulators: pwr at 50001000 {
 			compatible = "st,stm32mp1,pwr-reg";
 			reg = <0x50001000 0x10>;
+			status = "disabled";
+			secure-status = "okay";
 
-			reg11: reg11 {
+			pwr_reg11: reg11 {
 				regulator-name = "reg11";
 				regulator-min-microvolt = <1100000>;
 				regulator-max-microvolt = <1100000>;
 			};
 
-			reg18: reg18 {
+			pwr_reg18: reg18 {
 				regulator-name = "reg18";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
 			};
 
-			usb33: usb33 {
+			pwr_usb33: usb33 {
 				regulator-name = "usb33";
 				regulator-min-microvolt = <3300000>;
 				regulator-max-microvolt = <3300000>;
diff --git a/arch/arm/dts/stm32mp15xx-dkx.dtsi b/arch/arm/dts/stm32mp15xx-dkx.dtsi
index 68987f64c5..ba196c7a45 100644
--- a/arch/arm/dts/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/dts/stm32mp15xx-dkx.dtsi
@@ -6,6 +6,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/mfd/st,stpmic1.h>
+#include <dt-bindings/regulator/st,stm32mp15-regulator.h>
 
 / {
 	memory at c0000000 {
@@ -261,7 +262,7 @@
 		interrupt-parent = <&gpioi>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&stusb1600_pins_a>;
-		status = "okay";
+		status = "disabled";
 		vdd-supply = <&vin>;
 
 		connector {
@@ -284,7 +285,8 @@
 		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
-		status = "okay";
+		status = "disabled";
+		secure-status = "okay";
 
 		regulators {
 			compatible = "st,stpmic1-regulators";
@@ -292,18 +294,18 @@
 			buck2-supply = <&vin>;
 			buck3-supply = <&vin>;
 			buck4-supply = <&vin>;
-			ldo1-supply = <&v3v3>;
+			ldo1-supply = <&secure_v3v3>;
 			ldo2-supply = <&vin>;
-			ldo3-supply = <&vdd_ddr>;
+			ldo3-supply = <&secure_vdd_ddr>;
 			ldo4-supply = <&vin>;
 			ldo5-supply = <&vin>;
-			ldo6-supply = <&v3v3>;
+			ldo6-supply = <&secure_v3v3>;
 			vref_ddr-supply = <&vin>;
 			boost-supply = <&vin>;
-			pwr_sw1-supply = <&bst_out>;
-			pwr_sw2-supply = <&bst_out>;
+			pwr_sw1-supply = <&secure_bst_out>;
+			pwr_sw2-supply = <&secure_bst_out>;
 
-			vddcore: buck1 {
+			secure_vddcore: buck1 {
 				regulator-name = "vddcore";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <1350000>;
@@ -312,7 +314,7 @@
 				regulator-over-current-protection;
 			};
 
-			vdd_ddr: buck2 {
+			secure_vdd_ddr: buck2 {
 				regulator-name = "vdd_ddr";
 				regulator-min-microvolt = <1350000>;
 				regulator-max-microvolt = <1350000>;
@@ -321,7 +323,7 @@
 				regulator-over-current-protection;
 			};
 
-			vdd: buck3 {
+			secure_vdd: buck3 {
 				regulator-name = "vdd";
 				regulator-min-microvolt = <3300000>;
 				regulator-max-microvolt = <3300000>;
@@ -331,7 +333,7 @@
 				regulator-over-current-protection;
 			};
 
-			v3v3: buck4 {
+			secure_v3v3: buck4 {
 				regulator-name = "v3v3";
 				regulator-min-microvolt = <3300000>;
 				regulator-max-microvolt = <3300000>;
@@ -340,7 +342,7 @@
 				regulator-initial-mode = <0>;
 			};
 
-			v1v8_audio: ldo1 {
+			secure_v1v8_audio: ldo1 {
 				regulator-name = "v1v8_audio";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
@@ -348,7 +350,7 @@
 				interrupts = <IT_CURLIM_LDO1 0>;
 			};
 
-			v3v3_hdmi: ldo2 {
+			secure_v3v3_hdmi: ldo2 {
 				regulator-name = "v3v3_hdmi";
 				regulator-min-microvolt = <3300000>;
 				regulator-max-microvolt = <3300000>;
@@ -356,7 +358,7 @@
 				interrupts = <IT_CURLIM_LDO2 0>;
 			};
 
-			vtt_ddr: ldo3 {
+			secure_vtt_ddr: ldo3 {
 				regulator-name = "vtt_ddr";
 				regulator-min-microvolt = <500000>;
 				regulator-max-microvolt = <750000>;
@@ -364,12 +366,12 @@
 				regulator-over-current-protection;
 			};
 
-			vdd_usb: ldo4 {
+			secure_vdd_usb: ldo4 {
 				regulator-name = "vdd_usb";
 				interrupts = <IT_CURLIM_LDO4 0>;
 			};
 
-			vdda: ldo5 {
+			secure_vdda: ldo5 {
 				regulator-name = "vdda";
 				regulator-min-microvolt = <2900000>;
 				regulator-max-microvolt = <2900000>;
@@ -377,7 +379,7 @@
 				regulator-boot-on;
 			};
 
-			v1v2_hdmi: ldo6 {
+			secure_v1v2_hdmi: ldo6 {
 				regulator-name = "v1v2_hdmi";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <1200000>;
@@ -385,22 +387,22 @@
 				interrupts = <IT_CURLIM_LDO6 0>;
 			};
 
-			vref_ddr: vref_ddr {
+			secure_vref_ddr: vref_ddr {
 				regulator-name = "vref_ddr";
 				regulator-always-on;
 			};
 
-			 bst_out: boost {
+			secure_bst_out: boost {
 				regulator-name = "bst_out";
 				interrupts = <IT_OCP_BOOST 0>;
 			 };
 
-			vbus_otg: pwr_sw1 {
+			secure_vbus_otg: pwr_sw1 {
 				regulator-name = "vbus_otg";
 				interrupts = <IT_OCP_OTG 0>;
 			 };
 
-			 vbus_sw: pwr_sw2 {
+			secure_vbus_sw: pwr_sw2 {
 				regulator-name = "vbus_sw";
 				interrupts = <IT_OCP_SWOUT 0>;
 				regulator-active-discharge = <1>;
@@ -543,6 +545,84 @@
 	};
 };
 
+&scmi0_reguls {
+	vddcore: scmi-vddcore {
+		reg = <VOLTD_SCMI0_STPMIC1_BUCK1>;
+		regulator-name = "vddcore";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1350000>;
+		regulator-always-on;
+	};
+
+	vdd: scmi-vdd {
+		reg = <VOLTD_SCMI0_STPMIC1_BUCK3>;
+		regulator-name = "vdd";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
+	v3v3: scmi-v3v3 {
+		reg = <VOLTD_SCMI0_STPMIC1_BUCK4>;
+		regulator-name = "v3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
+	v1v8_audio: scmi-v1v8-audio {
+		reg = <VOLTD_SCMI0_STPMIC1_LDO1>;
+		regulator-name = "v1v8_audio";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-always-on;
+	};
+
+	v3v3_hdmi: scmi-v3v3-hdmi {
+		reg = <VOLTD_SCMI0_STPMIC1_LDO2>;
+		regulator-name = "v3v3_hdmi";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
+	vdd_usb: scmi-vdd-usb {
+		reg = <VOLTD_SCMI0_STPMIC1_LDO4>;
+		regulator-name = "vdd_usb";
+	};
+
+	vdda: scmi-vdda {
+		reg = <VOLTD_SCMI0_STPMIC1_LDO5>;
+		regulator-name = "vdda";
+		regulator-min-microvolt = <2900000>;
+		regulator-max-microvolt = <2900000>;
+		regulator-boot-on;
+	};
+
+	v1v2_hdmi: scmi-v1v2-hdmi {
+		reg = <VOLTD_SCMI0_STPMIC1_LDO6>;
+		regulator-name = "v1v2_hdmi";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		regulator-always-on;
+	};
+
+	bst_out: scmi-bst-out {
+		reg = <VOLTD_SCMI0_STPMIC1_BOOST>;
+		regulator-name = "bst_out";
+	};
+
+	vbus_otg: scmi-vbus-otg {
+		reg = <VOLTD_SCMI0_STPMIC1_PWR_SW1>;
+		regulator-name = "vbus_otg";
+	};
+
+	vbus_sw: scmi-vbus-sw {
+		reg = <VOLTD_SCMI0_STPMIC1_PWR_SW2>;
+		regulator-name = "vbus_sw";
+	};
+};
+
 &sdmmc1 {
 	pinctrl-names = "default", "opendrain", "sleep";
 	pinctrl-0 = <&sdmmc1_b4_pins_a>;
-- 
2.17.1



More information about the U-Boot mailing list