diff mbox series

[4/4] arm64: dts: qcom: sc7280: Add pm8008 regulators support for sc7280-idp

Message ID 1631875538-22473-5-git-send-email-skakit@codeaurora.org (mailing list archive)
State Superseded
Headers show
Series Add Qualcomm Technologies, Inc. PM8008 regulator driver | expand

Commit Message

Satya Priya Sept. 17, 2021, 10:45 a.m. UTC
From: satya priya <skakit@codeaurora.org>

Add pm8008 regulators support for sc7280 idp.

Signed-off-by: satya priya <skakit@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 103 +++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)

Comments

Stephen Boyd Sept. 20, 2021, 7:37 p.m. UTC | #1
Quoting Satya Priya (2021-09-17 03:45:38)
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> index 52638e2..3b3af49 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> @@ -207,6 +207,97 @@
>         };
>  };
>
> +&i2c1 {
> +       #address-cells = <1>;
> +       #size-cells = <0>;
> +       status = "okay";
> +
> +       pm8008_chip: pm8008@8 {
> +               compatible = "qcom,pm8008";
> +               reg = <0x8>;
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&pm8008_active>;
> +       };
> +
> +       pm8008_ldo: pm8008@9 {
[...]
> +
> +                       pm8008_l7: regulator@4600 {
> +                               reg = <0x4600>;
> +                               regulator-name = "pm8008_l7";
> +                               regulator-min-microvolt = <3000000>;
> +                               regulator-max-microvolt = <3544000>;
> +                               qcom,min-dropout-voltage = <96000>;

Is this headroom? Is it actually configurable or is it merely a property
of the hardware? If it's the latter then it should be in the driver and
not in the DTS.

> +                       };
> +               };
> +       };
> +};
> +
>  &qfprom {
>         vcc-supply = <&vreg_l1c_1p8>;
>  };
> @@ -313,6 +404,18 @@
>
>  /* PINCTRL - additions to nodes defined in sc7280.dtsi */
>
> +&pm8350c_gpios {
> +       pm8008_reset {

Is this a pinctrl node?

> +               pm8008_active: pm8008_active {

Please use dashes in node names wherever an underscore goes.

> +                       pins = "gpio4";
> +                       function = "normal";
> +                       bias-disable;
> +                       output-high;
> +                       power-source = <0>;
> +               };
> +       };
> +};
Satya Priya Sept. 28, 2021, 12:42 p.m. UTC | #2
On 2021-09-21 01:07, Stephen Boyd wrote:
> Quoting Satya Priya (2021-09-17 03:45:38)
>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi 
>> b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> index 52638e2..3b3af49 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> @@ -207,6 +207,97 @@
>>         };
>>  };
>> 
>> +&i2c1 {
>> +       #address-cells = <1>;
>> +       #size-cells = <0>;
>> +       status = "okay";
>> +
>> +       pm8008_chip: pm8008@8 {
>> +               compatible = "qcom,pm8008";
>> +               reg = <0x8>;
>> +               #address-cells = <1>;
>> +               #size-cells = <0>;
>> +
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&pm8008_active>;
>> +       };
>> +
>> +       pm8008_ldo: pm8008@9 {
> [...]
>> +
>> +                       pm8008_l7: regulator@4600 {
>> +                               reg = <0x4600>;
>> +                               regulator-name = "pm8008_l7";
>> +                               regulator-min-microvolt = <3000000>;
>> +                               regulator-max-microvolt = <3544000>;
>> +                               qcom,min-dropout-voltage = <96000>;
> 
> Is this headroom? Is it actually configurable or is it merely a 
> property
> of the hardware? If it's the latter then it should be in the driver and
> not in the DTS.
> 

Yes this is a headroom and its configurable.

>> +                       };
>> +               };
>> +       };
>> +};
>> +
>>  &qfprom {
>>         vcc-supply = <&vreg_l1c_1p8>;
>>  };
>> @@ -313,6 +404,18 @@
>> 
>>  /* PINCTRL - additions to nodes defined in sc7280.dtsi */
>> 
>> +&pm8350c_gpios {
>> +       pm8008_reset {
> 
> Is this a pinctrl node?
> 

No.

>> +               pm8008_active: pm8008_active {
> 
> Please use dashes in node names wherever an underscore goes.
> 

Okay.

>> +                       pins = "gpio4";
>> +                       function = "normal";
>> +                       bias-disable;
>> +                       output-high;
>> +                       power-source = <0>;
>> +               };
>> +       };
>> +};
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
index 52638e2..3b3af49 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
@@ -207,6 +207,97 @@ 
 	};
 };
 
+&i2c1 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	pm8008_chip: pm8008@8 {
+		compatible = "qcom,pm8008";
+		reg = <0x8>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&pm8008_active>;
+	};
+
+	pm8008_ldo: pm8008@9 {
+		compatible = "qcom,pm8008";
+		reg = <0x9>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pm8008-regulator {
+			compatible = "qcom,pm8008-regulator";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			vdd_l1_l2-supply = <&vreg_s8b_1p2>;
+			vdd_l3_l4-supply = <&vreg_s1b_1p8>;
+			vdd_l5-supply = <&vreg_bob>;
+			vdd_l6-supply = <&vreg_bob>;
+			vdd_l7-supply = <&vreg_bob>;
+
+			pm8008_l1: regulator@4000 {
+				reg = <0x4000>;
+				regulator-name = "pm8008_l1";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1300000>;
+				qcom,min-dropout-voltage = <96000>;
+			};
+
+			pm8008_l2: regulator@4100 {
+				reg = <0x4100>;
+				regulator-name = "pm8008_l2";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1250000>;
+				qcom,min-dropout-voltage = <24000>;
+			};
+
+			pm8008_l3: regulator@4200 {
+				reg = <0x4200>;
+				regulator-name = "pm8008_l3";
+				regulator-min-microvolt = <1650000>;
+				regulator-max-microvolt = <3000000>;
+				qcom,min-dropout-voltage = <224000>;
+			};
+
+			pm8008_l4: regulator@4300 {
+				reg = <0x4300>;
+				regulator-name = "pm8008_l4";
+				regulator-min-microvolt = <1504000>;
+				regulator-max-microvolt = <1600000>;
+				qcom,min-dropout-voltage = <0>;
+			};
+
+			pm8008_l5: regulator@4400 {
+				reg = <0x4400>;
+				regulator-name = "pm8008_l5";
+				regulator-min-microvolt = <2600000>;
+				regulator-max-microvolt = <3000000>;
+				qcom,min-dropout-voltage = <104000>;
+			};
+
+			pm8008_l6: regulator@4500 {
+				reg = <0x4500>;
+				regulator-name = "pm8008_l6";
+				regulator-min-microvolt = <2600000>;
+				regulator-max-microvolt = <3000000>;
+				qcom,min-dropout-voltage = <112000>;
+			};
+
+			pm8008_l7: regulator@4600 {
+				reg = <0x4600>;
+				regulator-name = "pm8008_l7";
+				regulator-min-microvolt = <3000000>;
+				regulator-max-microvolt = <3544000>;
+				qcom,min-dropout-voltage = <96000>;
+			};
+		};
+	};
+};
+
 &qfprom {
 	vcc-supply = <&vreg_l1c_1p8>;
 };
@@ -313,6 +404,18 @@ 
 
 /* PINCTRL - additions to nodes defined in sc7280.dtsi */
 
+&pm8350c_gpios {
+	pm8008_reset {
+		pm8008_active: pm8008_active {
+			pins = "gpio4";
+			function = "normal";
+			bias-disable;
+			output-high;
+			power-source = <0>;
+		};
+	};
+};
+
 &qspi_cs0 {
 	bias-disable;
 };