diff mbox series

[V8,7/7] arm64: dts: qcom: sc7280: Add pm8008 support for sc7280-idp

Message ID 1648209491-30165-8-git-send-email-quic_c_skakit@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add Qualcomm Technologies, Inc. PM8008 regulator driver | expand

Commit Message

Satya Priya Kakitapalli (Temp) March 25, 2022, 11:58 a.m. UTC
Add pm8008_infra and pm8008_regulators support for sc7280 idp.

Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com>
---
Changes in V6:
 - No changes.

Changes in V7:
 - No Changes.

Changes in V8:
 - Add an extra phandle "pm8008_bus" and then include pm8008 dtsi files inside it.
 - Remove output-high from pm8008_active node.

 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 70 ++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

Comments

Stephen Boyd March 25, 2022, 5:48 p.m. UTC | #1
Quoting Satya Priya (2022-03-25 04:58:11)
> Add pm8008_infra and pm8008_regulators support for sc7280 idp.
>
> Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com>
> ---
> Changes in V6:
>  - No changes.
>
> Changes in V7:
>  - No Changes.
>
> Changes in V8:
>  - Add an extra phandle "pm8008_bus" and then include pm8008 dtsi files inside it.
>  - Remove output-high from pm8008_active node.
>
>  arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 70 ++++++++++++++++++++++++++++++++
>  1 file changed, 70 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> index ecbf2b8..0843e92 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> @@ -263,6 +263,67 @@
>         };
>  };
>
> +pm8008_bus: &i2c1 {
> +       #address-cells = <1>;
> +       #size-cells = <0>;

These two properties should already be in the i2c1 node. Can you remove
them?

> +       status = "okay";
> +};
> +
> +&pm8008_bus {
> +       #include "pm8008-infra.dtsi"
> +       #include "pm8008-regulators.dtsi"
> +};

I was thinking more of like

	&pm8008_bus: &i2c1 {
		status = "okay";
	};

	#include "pm8008.dtsi"

and then the nodes below.
Satya Priya Kakitapalli (Temp) March 30, 2022, 10:44 a.m. UTC | #2
On 3/25/2022 11:18 PM, Stephen Boyd wrote:
> Quoting Satya Priya (2022-03-25 04:58:11)
>> Add pm8008_infra and pm8008_regulators support for sc7280 idp.
>>
>> Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com>
>> ---
>> Changes in V6:
>>   - No changes.
>>
>> Changes in V7:
>>   - No Changes.
>>
>> Changes in V8:
>>   - Add an extra phandle "pm8008_bus" and then include pm8008 dtsi files inside it.
>>   - Remove output-high from pm8008_active node.
>>
>>   arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 70 ++++++++++++++++++++++++++++++++
>>   1 file changed, 70 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> index ecbf2b8..0843e92 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> @@ -263,6 +263,67 @@
>>          };
>>   };
>>
>> +pm8008_bus: &i2c1 {
>> +       #address-cells = <1>;
>> +       #size-cells = <0>;
> These two properties should already be in the i2c1 node. Can you remove
> them?


Okay.


>> +       status = "okay";
>> +};
>> +
>> +&pm8008_bus {
>> +       #include "pm8008-infra.dtsi"
>> +       #include "pm8008-regulators.dtsi"
>> +};
> I was thinking more of like
>
> 	&pm8008_bus: &i2c1 {
> 		status = "okay";
> 	};
>
> 	#include "pm8008.dtsi"
>
> and then the nodes below.


You mean

pm8008_bus: &i2c1 {

         status = "okay";

};

&pm8008_bus {

     #include "pm8008.dtsi"

};

and remaining nodes, right?
Stephen Boyd March 31, 2022, 9:18 p.m. UTC | #3
Quoting Satya Priya Kakitapalli (Temp) (2022-03-30 03:44:01)
>
> On 3/25/2022 11:18 PM, Stephen Boyd wrote:
> >       #include "pm8008.dtsi"
> >
> > and then the nodes below.
>
>
> You mean
>
> pm8008_bus: &i2c1 {
>
>          status = "okay";
>
> };
>
> &pm8008_bus {
>
>      #include "pm8008.dtsi"
>
> };
>
> and remaining nodes, right?
>

No. I meant what I wrote.


       &pm8008_bus: &i2c1 {
               status = "okay";
       };

       #include "pm8008.dtsi"

and then the pm8008.dtsi file would have

	&pm8008_bus {
		pm8008: pmic@8 {
			compatible = "qcom,pm8008";
			...
		};

		pm8008_regulators: regulators@9 {
			compatible = "qcom,pm8008-regulators";
			...
		};
	};

and then this patch would modify those nodes with phandles.
Satya Priya Kakitapalli (Temp) April 1, 2022, 10:48 a.m. UTC | #4
On 4/1/2022 2:48 AM, Stephen Boyd wrote:
> Quoting Satya Priya Kakitapalli (Temp) (2022-03-30 03:44:01)
>> On 3/25/2022 11:18 PM, Stephen Boyd wrote:
>>>        #include "pm8008.dtsi"
>>>
>>> and then the nodes below.
>>
>> You mean
>>
>> pm8008_bus: &i2c1 {
>>
>>           status = "okay";
>>
>> };
>>
>> &pm8008_bus {
>>
>>       #include "pm8008.dtsi"
>>
>> };
>>
>> and remaining nodes, right?
>>
> No. I meant what I wrote.
>

Okay thank you for elaborating,


>         &pm8008_bus: &i2c1 {


but this still needs to be "pm8008_bus: &i2c {" right.. no '&' before 
pm8008_bus.


>                 status = "okay";
>         };
>
>         #include "pm8008.dtsi"
>
> and then the pm8008.dtsi file would have
>
> 	&pm8008_bus {
> 		pm8008: pmic@8 {
> 			compatible = "qcom,pm8008";
> 			...
> 		};
>
> 		pm8008_regulators: regulators@9 {
> 			compatible = "qcom,pm8008-regulators";
> 			...
> 		};
> 	};
>
> and then this patch would modify those nodes with phandles.
Stephen Boyd April 1, 2022, 6:48 p.m. UTC | #5
Quoting Satya Priya Kakitapalli (Temp) (2022-04-01 03:48:46)
>
> On 4/1/2022 2:48 AM, Stephen Boyd wrote:
>
>
> >         &pm8008_bus: &i2c1 {
>
>
> but this still needs to be "pm8008_bus: &i2c {" right.. no '&' before
> pm8008_bus.

Correct. Thanks for spotting my typo.
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 ecbf2b8..0843e92 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
@@ -263,6 +263,67 @@ 
 	};
 };
 
+pm8008_bus: &i2c1 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+};
+
+&pm8008_bus {
+	#include "pm8008-infra.dtsi"
+	#include "pm8008-regulators.dtsi"
+};
+
+&pm8008_infra {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pm8008_active>;
+
+	reset-gpios = <&pm8350c_gpios 4 GPIO_ACTIVE_HIGH>;
+};
+
+&pm8008_regulators {
+	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-min-microvolt = <950000>;
+	regulator-max-microvolt = <1300000>;
+};
+
+&pm8008_l2 {
+	regulator-min-microvolt = <950000>;
+	regulator-max-microvolt = <1250000>;
+};
+
+&pm8008_l3 {
+	regulator-min-microvolt = <1650000>;
+	regulator-max-microvolt = <3000000>;
+};
+
+&pm8008_l4 {
+	regulator-min-microvolt = <1504000>;
+	regulator-max-microvolt = <1600000>;
+};
+
+&pm8008_l5 {
+	regulator-min-microvolt = <2600000>;
+	regulator-max-microvolt = <3000000>;
+};
+
+&pm8008_l6 {
+	regulator-min-microvolt = <2600000>;
+	regulator-max-microvolt = <3000000>;
+};
+
+&pm8008_l7 {
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3544000>;
+};
+
 &qfprom {
 	vcc-supply = <&vreg_l1c_1p8>;
 };
@@ -375,6 +436,15 @@ 
 	drive-strength = <2>;
 };
 
+&pm8350c_gpios {
+	pm8008_active: pm8008-active {
+		pins = "gpio4";
+		function = "normal";
+		bias-disable;
+		power-source = <0>;
+	};
+};
+
 &qspi_cs0 {
 	bias-disable;
 };