ARM: dts: stm32: add SCMI PMIC regulators on stm32mp135f-dk board
authorEtienne Carriere <etienne.carriere@foss.st.com>
Wed, 12 Jul 2023 14:24:31 +0000 (16:24 +0200)
committerAlexandre Torgue <alexandre.torgue@foss.st.com>
Wed, 16 Aug 2023 08:58:45 +0000 (10:58 +0200)
Since OP-TEE release tag 3.22.0, OP-TEE SCMI service for STM32MP13x
SoC family exposes PMIC voltage regulators. This change defines
them in the platform DTS file and removes the fixed regulators that
were previously defined to abstract them before OP-TEE firmware was
ready.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Signed-off-by: Pascal Paillet <p.paillet@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
arch/arm/boot/dts/st/stm32mp135f-dk.dts

index f0900ca672b5a86893e1c6bc5361f2c8a00314f7..eea740d097c72ff1f866c540f7147a20993db6ae 100644 (file)
@@ -9,6 +9,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/regulator/st,stm32mp13-regulator.h>
 #include "stm32mp135.dtsi"
 #include "stm32mp13xf.dtsi"
 #include "stm32mp13-pinctrl.dtsi"
                        default-state = "off";
                };
        };
-
-       v3v3_sw: v3v3-sw {
-               compatible = "regulator-fixed";
-               regulator-name = "v3v3_sw";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               regulator-always-on;
-       };
-
-       vdd_adc: vdd-adc {
-               compatible = "regulator-fixed";
-               regulator-name = "vdd_adc";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               regulator-always-on;
-       };
-
-       vdd_sd: vdd-sd {
-               compatible = "regulator-fixed";
-               regulator-name = "vdd_sd";
-               regulator-min-microvolt = <2900000>;
-               regulator-max-microvolt = <2900000>;
-               regulator-always-on;
-       };
-
-       vdd_usb: vdd-usb {
-               compatible = "regulator-fixed";
-               regulator-name = "vdd_usb";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               regulator-always-on;
-       };
 };
 
 &adc_1 {
        pinctrl-names = "default";
        pinctrl-0 = <&adc1_usb_cc_pins_a>;
-       vdda-supply = <&vdd_adc>;
-       vref-supply = <&vdd_adc>;
+       vdda-supply = <&scmi_vdd_adc>;
+       vref-supply = <&scmi_vdd_adc>;
        status = "okay";
        adc1: adc@0 {
                status = "okay";
        status = "okay";
 };
 
+&scmi_regu {
+       scmi_vdd_adc: regulator@10 {
+               reg = <VOLTD_SCMI_STPMIC1_LDO1>;
+               regulator-name = "vdd_adc";
+       };
+       scmi_vdd_usb: regulator@13 {
+               reg = <VOLTD_SCMI_STPMIC1_LDO4>;
+               regulator-name = "vdd_usb";
+       };
+       scmi_vdd_sd: regulator@14 {
+               reg = <VOLTD_SCMI_STPMIC1_LDO5>;
+               regulator-name = "vdd_sd";
+       };
+       scmi_v1v8_periph: regulator@15 {
+               reg = <VOLTD_SCMI_STPMIC1_LDO6>;
+               regulator-name = "v1v8_periph";
+       };
+       scmi_v3v3_sw: regulator@19 {
+               reg = <VOLTD_SCMI_STPMIC1_PWR_SW2>;
+               regulator-name = "v3v3_sw";
+       };
+};
+
 &sdmmc1 {
        pinctrl-names = "default", "opendrain", "sleep";
        pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>;
        disable-wp;
        st,neg-edge;
        bus-width = <4>;
-       vmmc-supply = <&vdd_sd>;
+       vmmc-supply = <&scmi_vdd_sd>;
        status = "okay";
 };
 
        hub@1 {
                compatible = "usb424,2514";
                reg = <1>;
-               vdd-supply = <&v3v3_sw>;
+               vdd-supply = <&scmi_v3v3_sw>;
        };
 };
 
 };
 
 &usbphyc_port0 {
-       phy-supply = <&vdd_usb>;
+       phy-supply = <&scmi_vdd_usb>;
        st,current-boost-microamp = <1000>;
        st,decrease-hs-slew-rate;
        st,tune-hs-dc-level = <2>;
 };
 
 &usbphyc_port1 {
-       phy-supply = <&vdd_usb>;
+       phy-supply = <&scmi_vdd_usb>;
        st,current-boost-microamp = <1000>;
        st,decrease-hs-slew-rate;
        st,tune-hs-dc-level = <2>;