diff mbox

[1/5] arm64: dts: apq8016-sbc: add regulators support

Message ID 1452606392-24614-1-git-send-email-srinivas.kandagatla@linaro.org (mailing list archive)
State Superseded, archived
Delegated to: Andy Gross
Headers show

Commit Message

Srinivas Kandagatla Jan. 12, 2016, 1:46 p.m. UTC
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 141 ++++++++++++++++++++++++++++++
 1 file changed, 141 insertions(+)

Comments

Arnd Bergmann Jan. 12, 2016, 1:59 p.m. UTC | #1
On Tuesday 12 January 2016 13:46:32 Srinivas Kandagatla wrote:
>         };
>  
> +       smd {
> +               rpm {
> +                       rpm-requests {
> +                               pm8916-regulators {
> +
> +                                       vdd_l1_l2_l3-supply = <&pm8916_s3>;
> +                                       vdd_l5-supply = <&pm8916_s3>;
> +                                       vdd_l4_l5_l6-supply = <&pm8916_s4>;
> +                                       vdd_l7-supply = <&pm8916_s4>;
> +
> 

If you're nested this deeply, you should consider using labels, e.g.

/ {
       ...

       smd {
               rpm {
                      rpm-requests {
                               regulators: pm8916-regulators {

				};
			};
		};
	};

	...
};


&regulators {
        vdd_l1_l2_l3-supply = <&pm8916_s3>;
        vdd_l5-supply = <&pm8916_s3>;
        vdd_l4_l5_l6-supply = <&pm8916_s4>;
        vdd_l7-supply = <&pm8916_s4>;

	s1 {
                 regulator-min-microvolt = <375000>;
                 regulator-max-microvolt = <1562000>;
	};

        s3 {
	        regulator-min-microvolt = <375000>;
	        regulator-max-microvolt = <1562000>;
        };

	...
};

btw, it seems odd to me that all those nodes under 'smd'
have names but no addresses.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Srinivas Kandagatla Jan. 12, 2016, 2:30 p.m. UTC | #2
On 12/01/16 13:59, Arnd Bergmann wrote:
> On Tuesday 12 January 2016 13:46:32 Srinivas Kandagatla wrote:
>>          };
>>
>> +       smd {
>> +               rpm {
>> +                       rpm-requests {
>> +                               pm8916-regulators {
>> +
>> +                                       vdd_l1_l2_l3-supply = <&pm8916_s3>;
>> +                                       vdd_l5-supply = <&pm8916_s3>;
>> +                                       vdd_l4_l5_l6-supply = <&pm8916_s4>;
>> +                                       vdd_l7-supply = <&pm8916_s4>;
>> +
>>
>
> If you're nested this deeply, you should consider using labels, e.g.
>
Labels are good and works for me.

Stephen/Andy are you ok to use labels for such deeply nested nodes in 
board dts?

> / {
>         ...
>
>         smd {
>                 rpm {
>                        rpm-requests {
>                                 regulators: pm8916-regulators {
>
> 				};
> 			};
> 		};
> 	};
>
> 	...
> };
>
>
> &regulators {
>          vdd_l1_l2_l3-supply = <&pm8916_s3>;
>          vdd_l5-supply = <&pm8916_s3>;
>          vdd_l4_l5_l6-supply = <&pm8916_s4>;
>          vdd_l7-supply = <&pm8916_s4>;
>
> 	s1 {
>                   regulator-min-microvolt = <375000>;
>                   regulator-max-microvolt = <1562000>;
> 	};
>
>          s3 {
> 	        regulator-min-microvolt = <375000>;
> 	        regulator-max-microvolt = <1562000>;
>          };
>
> 	...
> };
>
> btw, it seems odd to me that all those nodes under 'smd'
> have names but no addresses.
These regulators are identified by the node names, and have no addresses 
associated with it as control goes over SMD based IPC to the rpm.

https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt?id=refs/tags/next-20160112

--srini

>
> 	Arnd
>
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andy Gross Jan. 12, 2016, 10:22 p.m. UTC | #3
On Tue, Jan 12, 2016 at 02:30:34PM +0000, Srinivas Kandagatla wrote:
> 
> 
> On 12/01/16 13:59, Arnd Bergmann wrote:
> >On Tuesday 12 January 2016 13:46:32 Srinivas Kandagatla wrote:
> >>         };
> >>
> >>+       smd {
> >>+               rpm {
> >>+                       rpm-requests {
> >>+                               pm8916-regulators {
> >>+
> >>+                                       vdd_l1_l2_l3-supply = <&pm8916_s3>;
> >>+                                       vdd_l5-supply = <&pm8916_s3>;
> >>+                                       vdd_l4_l5_l6-supply = <&pm8916_s4>;
> >>+                                       vdd_l7-supply = <&pm8916_s4>;
> >>+
> >>
> >
> >If you're nested this deeply, you should consider using labels, e.g.
> >
> Labels are good and works for me.
> 
> Stephen/Andy are you ok to use labels for such deeply nested nodes in board
> dts?

I tend to agree with Arnd.  I am ok with using labels.

<snip>
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index db17c5d..f6cd323 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -30,6 +30,147 @@ 
 		stdout-path = "serial0";
 	};
 
+	smd {
+		rpm {
+			rpm_requests {
+				pm8916-regulators {
+
+					vdd_l1_l2_l3-supply = <&pm8916_s3>;
+					vdd_l5-supply = <&pm8916_s3>;
+					vdd_l4_l5_l6-supply = <&pm8916_s4>;
+					vdd_l7-supply = <&pm8916_s4>;
+
+					s1 {
+						regulator-min-microvolt = <375000>;
+						regulator-max-microvolt = <1562000>;
+
+					};
+
+					s3 {
+						regulator-min-microvolt = <375000>;
+						regulator-max-microvolt = <1562000>;
+
+					};
+
+					s4 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <1800000>;
+
+						regulator-always-on;
+						regulator-boot-on;
+					};
+
+					l1 {
+						regulator-min-microvolt = <375000>;
+						regulator-max-microvolt = <1525000>;
+
+					};
+
+					l2 {
+						regulator-min-microvolt = <375000>;
+						regulator-max-microvolt = <1525000>;
+
+					};
+
+					l3 {
+						regulator-min-microvolt = <375000>;
+						regulator-max-microvolt = <1525000>;
+
+					};
+
+					l4 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l5 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l6 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l7 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l8 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l9 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l10 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l11 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l12 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l13 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l14 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+					
+					l15 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+					};
+
+					l16 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l17 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+
+					l18 {
+						regulator-min-microvolt = <1750000>;
+						regulator-max-microvolt = <3337000>;
+
+					};
+				};
+			};
+		};
+	};
+
 	soc {
 		serial@78af000 {
 			label = "LS-UART0";