This patch adds rpm node to apq8064 dt as rpm would be used by other
devices for regulator support. Also adds all the regulators in the rpm.
Signed-off-by: Srinivas Kandagatla <[email protected]>
---
arch/arm/boot/dts/qcom-apq8064.dtsi | 241 ++++++++++++++++++++++++++++++++++++
1 file changed, 241 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index b3154c0..db5fc59 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -3,6 +3,7 @@
#include "skeleton.dtsi"
#include <dt-bindings/clock/qcom,gcc-msm8960.h>
#include <dt-bindings/clock/qcom,mmcc-msm8960.h>
+#include <dt-bindings/mfd/qcom-rpm.h>
#include <dt-bindings/soc/qcom,gsbi.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -246,6 +247,246 @@
#reset-cells = <1>;
};
+ l2cc: clock-controller@2011000 {
+ compatible = "syscon";
+ reg = <0x2011000 0x1000>;
+ };
+
+ rpm@108000 {
+ compatible = "qcom,rpm-apq8064";
+ reg = <0x108000 0x1000>;
+ qcom,ipc = <&l2cc 0x8 2>;
+
+ interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
+ interrupt-names = "ack", "err", "wakeup";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Buck SMPS */
+ pm8921_s1: pm8921-s1 {
+ compatible = "qcom,rpm-pm8921-smps";
+ reg = <QCOM_RPM_PM8921_SMPS1>;
+ };
+
+ pm8921_s2: pm8921-s2 {
+ compatible = "qcom,rpm-pm8921-smps";
+ reg = <QCOM_RPM_PM8921_SMPS2>;
+ };
+
+ pm8921_s3: pm8921-s3 {
+ compatible = "qcom,rpm-pm8921-smps";
+ reg = <QCOM_RPM_PM8921_SMPS3>;
+ };
+
+ pm8921_s4: pm8921-s4 {
+ compatible = "qcom,rpm-pm8921-smps";
+ reg = <QCOM_RPM_PM8921_SMPS4>;
+ };
+
+ pm8921_s5: pm8921-s5 {
+ compatible = "qcom,rpm-pm8921-ftsmps";
+ reg = <QCOM_RPM_PM8921_SMPS5>;
+ };
+
+ pm8921_s6: pm8921-s6 {
+ compatible = "qcom,rpm-pm8921-ftsmps";
+ reg = <QCOM_RPM_PM8921_SMPS6>;
+ };
+
+ pm8921_s7: pm8921-s7 {
+ compatible = "qcom,rpm-pm8921-smps";
+ reg = <QCOM_RPM_PM8921_SMPS7>;
+ };
+
+ pm8921_s8: pm8921-s8 {
+ compatible = "qcom,rpm-pm8921-smps";
+ reg = <QCOM_RPM_PM8921_SMPS8>;
+ };
+
+ /* PMOS LDO */
+ pm8921_l1: pm8921-l1 {
+ compatible = "qcom,rpm-pm8921-nldo";
+ reg = <QCOM_RPM_PM8921_LDO1>;
+ };
+
+ pm8921_l2: pm8921-l2 {
+ compatible = "qcom,rpm-pm8921-nldo";
+ reg = <QCOM_RPM_PM8921_LDO2>;
+ };
+
+ pm8921_l3: pm8921-l3 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO3>;
+ };
+
+ pm8921_l4: pm8921-l4 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO4>;
+ };
+
+ pm8921_l5: pm8921-l5 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO5>;
+ };
+
+ pm8921_l6: pm8921-l6 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO6>;
+ };
+
+ pm8921_l7: pm8921-l7 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO7>;
+ };
+
+ pm8921_l8: pm8921-l8 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO8>;
+ };
+
+ pm8921_l9: pm8921-l9 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO9>;
+ };
+
+ pm8921_l10: pm8921-l10 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO10>;
+ };
+
+ pm8921_l11: pm8921-l11 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO11>;
+ };
+
+ pm8921_l12: pm8921-l12 {
+ compatible = "qcom,rpm-pm8921-nldo";
+ reg = <QCOM_RPM_PM8921_LDO12>;
+ };
+
+ pm8921_l14: pm8921-l14 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO14>;
+ };
+
+ pm8921_l15: pm8921-l15 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO15>;
+ };
+
+ pm8921_l16: pm8921-l16 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO16>;
+ };
+
+ pm8921_l17: pm8921-l17 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO17>;
+ };
+
+ pm8921_l18: pm8921-l18 {
+ compatible = "qcom,rpm-pm8921-nldo";
+ reg = <QCOM_RPM_PM8921_LDO18>;
+ };
+
+ pm8921_l21: pm8921-l21 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO21>;
+ };
+
+ pm8921_l22: pm8921-l22 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO22>;
+ };
+
+ pm8921_l23: pm8921-l23 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO23>;
+ };
+
+ pm8921_l24: pm8921-l24 {
+ compatible = "qcom,rpm-pm8921-nldo1200";
+ reg = <QCOM_RPM_PM8921_LDO24>;
+ };
+
+ pm8921_l25: pm8921-l25 {
+ compatible = "qcom,rpm-pm8921-nldo1200";
+ reg = <QCOM_RPM_PM8921_LDO25>;
+ };
+
+ pm8921_l26: pm8921-l26 {
+ compatible = "qcom,rpm-pm8921-nldo1200";
+ reg = <QCOM_RPM_PM8921_LDO26>;
+ };
+
+ pm8921_l27: pm8921-l27 {
+ compatible = "qcom,rpm-pm8921-nldo1200";
+ reg = <QCOM_RPM_PM8921_LDO27>;
+ };
+
+ pm8921_l28: pm8921-l28 {
+ compatible = "qcom,rpm-pm8921-nldo1200";
+ reg = <QCOM_RPM_PM8921_LDO28>;
+ };
+
+ pm8921_l29: pm8921-l29 {
+ compatible = "qcom,rpm-pm8921-pldo";
+ reg = <QCOM_RPM_PM8921_LDO29>;
+ };
+
+ /* Low Voltage Switch */
+ pm8921_lvs1: pm8921-lvs1 {
+ compatible = "qcom,rpm-pm8921-switch";
+ reg = <QCOM_RPM_PM8921_LVS1>;
+ };
+
+ pm8921_lvs2: pm8921-lvs2 {
+ compatible = "qcom,rpm-pm8921-switch";
+ reg = <QCOM_RPM_PM8921_LVS2>;
+ };
+
+ pm8921_lvs3: pm8921-lvs3 {
+ compatible = "qcom,rpm-pm8921-switch";
+ reg = <QCOM_RPM_PM8921_LVS3>;
+ };
+
+ pm8921_lvs4: pm8921-lvs4 {
+ compatible = "qcom,rpm-pm8921-switch";
+ reg = <QCOM_RPM_PM8921_LVS4>;
+ };
+
+ pm8921_lvs5: pm8921-lvs5 {
+ compatible = "qcom,rpm-pm8921-switch";
+ reg = <QCOM_RPM_PM8921_LVS5>;
+ };
+
+ pm8921_lvs6: pm8921-lvs6 {
+ compatible = "qcom,rpm-pm8921-switch";
+ reg = <QCOM_RPM_PM8921_LVS6>;
+ };
+
+ pm8921_lvs7: pm8921-lvs7 {
+ compatible = "qcom,rpm-pm8921-switch";
+ reg = <QCOM_RPM_PM8921_LVS7>;
+ };
+
+ pm8921_usb_switch: pm8921-usb-switch {
+ compatible = "qcom,rpm-pm8921-switch";
+ reg = <QCOM_RPM_USB_OTG_SWITCH>;
+ };
+
+ pm8921_hdmi_switch: pm8921-hdmi-switch {
+ compatible = "qcom,rpm-pm8921-switch";
+ reg = <QCOM_RPM_HDMI_SWITCH>;
+ };
+
+ pm8921_ncp: pm8921-ncp {
+ compatible = "qcom,rpm-pm8921-ncp";
+ reg = <QCOM_RPM_PM8921_NCP>;
+ };
+ };
+
/* Temporary fixed regulator */
vsdcc_fixed: vsdcc-regulator {
compatible = "regulator-fixed";
--
1.9.1
On Feb 23, 2015, at 1:54 AM, Srinivas Kandagatla <[email protected]> wrote:
> This patch adds rpm node to apq8064 dt as rpm would be used by other
> devices for regulator support. Also adds all the regulators in the rpm.
>
> Signed-off-by: Srinivas Kandagatla <[email protected]>
> ---
> arch/arm/boot/dts/qcom-apq8064.dtsi | 241 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 241 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
> index b3154c0..db5fc59 100644
> --- a/arch/arm/boot/dts/qcom-apq8064.dtsi
> +++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
> @@ -3,6 +3,7 @@
> #include "skeleton.dtsi"
> #include <dt-bindings/clock/qcom,gcc-msm8960.h>
> #include <dt-bindings/clock/qcom,mmcc-msm8960.h>
> +#include <dt-bindings/mfd/qcom-rpm.h>
> #include <dt-bindings/soc/qcom,gsbi.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
>
> @@ -246,6 +247,246 @@
> #reset-cells = <1>;
> };
>
> + l2cc: clock-controller@2011000 {
> + compatible = "syscon";
> + reg = <0x2011000 0x1000>;
> + };
> +
> + rpm@108000 {
> + compatible = "qcom,rpm-apq8064";
> + reg = <0x108000 0x1000>;
> + qcom,ipc = <&l2cc 0x8 2>;
> +
> + interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
> + interrupt-names = "ack", "err", "wakeup";
> +
Can you use the defines for GIC for the interrupts. Also, I think the last property should probably be level high instead of 0.
- k
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
On 26/02/15 18:25, Kumar Gala wrote:
>
> On Feb 23, 2015, at 1:54 AM, Srinivas Kandagatla <[email protected]> wrote:
>
>> This patch adds rpm node to apq8064 dt as rpm would be used by other
>> devices for regulator support. Also adds all the regulators in the rpm.
>>
>> Signed-off-by: Srinivas Kandagatla <[email protected]>
>> ---
>> arch/arm/boot/dts/qcom-apq8064.dtsi | 241 ++++++++++++++++++++++++++++++++++++
>> 1 file changed, 241 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
>> index b3154c0..db5fc59 100644
>> --- a/arch/arm/boot/dts/qcom-apq8064.dtsi
>> +++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
>> @@ -3,6 +3,7 @@
>> #include "skeleton.dtsi"
>> #include <dt-bindings/clock/qcom,gcc-msm8960.h>
>> #include <dt-bindings/clock/qcom,mmcc-msm8960.h>
>> +#include <dt-bindings/mfd/qcom-rpm.h>
>> #include <dt-bindings/soc/qcom,gsbi.h>
>> #include <dt-bindings/interrupt-controller/arm-gic.h>
>>
>> @@ -246,6 +247,246 @@
>> #reset-cells = <1>;
>> };
>>
>> + l2cc: clock-controller@2011000 {
>> + compatible = "syscon";
>> + reg = <0x2011000 0x1000>;
>> + };
>> +
>> + rpm@108000 {
>> + compatible = "qcom,rpm-apq8064";
>> + reg = <0x108000 0x1000>;
>> + qcom,ipc = <&l2cc 0x8 2>;
>> +
>> + interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
>> + interrupt-names = "ack", "err", "wakeup";
>> +
>
> Can you use the defines for GIC for the interrupts. Also, I think the last property should probably be level high instead of 0.
Yep, I will fix it.
--srini
>
> - k
>
On Sun, Feb 22, 2015 at 11:54 PM, Srinivas Kandagatla
<[email protected]> wrote:
> This patch adds rpm node to apq8064 dt as rpm would be used by other
> devices for regulator support. Also adds all the regulators in the rpm.
>
This looks good, with Kumars suggestion of GIT defines
Reviewed-by: Bjorn Andersson <[email protected]>
However, this binding is not merged yet and Stephen have requesting a
complete redesign of the binding as well as the code. So that has to
be concluded first, I presume.
Separate of that, as it's highly likely that everyone will follow the
pcb design guidelines for apq8064 the vin-supplies should be okay to
specify at this level (and not in all board files). Perhaps also the
switching frequencies for the SMPSs?
Regards,
Bjorn
On Thu, Feb 26, 2015 at 10:25 AM, Kumar Gala <[email protected]> wrote:
>
> On Feb 23, 2015, at 1:54 AM, Srinivas Kandagatla <[email protected]> wrote:
>
>> This patch adds rpm node to apq8064 dt as rpm would be used by other
>> devices for regulator support. Also adds all the regulators in the rpm.
>>
>> Signed-off-by: Srinivas Kandagatla <[email protected]>
[..]
>> + interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
>> + interrupt-names = "ack", "err", "wakeup";
>> +
>
> Can you use the defines for GIC for the interrupts. Also, I think the last property should probably be level high instead of 0.
>
The code sets it to rising, but better move that to the dt (as you suggest).
Regards,
Bjorn
On Thu, Feb 26, 2015 at 11:00 AM, Bjorn Andersson <[email protected]> wrote:
> On Sun, Feb 22, 2015 at 11:54 PM, Srinivas Kandagatla
> <[email protected]> wrote:
>> This patch adds rpm node to apq8064 dt as rpm would be used by other
>> devices for regulator support. Also adds all the regulators in the rpm.
>>
>
> This looks good, with Kumars suggestion of GIT defines
"GIC", stupid manual autocomplete.
Regards,
Bjorn
On 02/22/15 23:54, Srinivas Kandagatla wrote:
> + pm8921_s5: pm8921-s5 {
> + compatible = "qcom,rpm-pm8921-ftsmps";
> + reg = <QCOM_RPM_PM8921_SMPS5>;
> + };
> +
> + pm8921_s6: pm8921-s6 {
> + compatible = "qcom,rpm-pm8921-ftsmps";
> + reg = <QCOM_RPM_PM8921_SMPS6>;
> + };
> +
There's no RPM control for S5 and S6. Please remove. Also, has this been
tested?
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
On 26/02/15 19:31, Stephen Boyd wrote:
> On 02/22/15 23:54, Srinivas Kandagatla wrote:
>> + pm8921_s5: pm8921-s5 {
>> + compatible = "qcom,rpm-pm8921-ftsmps";
>> + reg = <QCOM_RPM_PM8921_SMPS5>;
>> + };
>> +
>> + pm8921_s6: pm8921-s6 {
>> + compatible = "qcom,rpm-pm8921-ftsmps";
>> + reg = <QCOM_RPM_PM8921_SMPS6>;
>> + };
>> +
>
> There's no RPM control for S5 and S6. Please remove. Also, has this been
> tested?
>
Ahh. these are SAW regulators, I will remove it from the list.
Obviously, I did not test all the regulators.
--srini
On 02/26/15 12:09, Srinivas Kandagatla wrote:
>
>
> On 26/02/15 19:31, Stephen Boyd wrote:
>> On 02/22/15 23:54, Srinivas Kandagatla wrote:
>>> + pm8921_s5: pm8921-s5 {
>>> + compatible = "qcom,rpm-pm8921-ftsmps";
>>> + reg = <QCOM_RPM_PM8921_SMPS5>;
>>> + };
>>> +
>>> + pm8921_s6: pm8921-s6 {
>>> + compatible = "qcom,rpm-pm8921-ftsmps";
>>> + reg = <QCOM_RPM_PM8921_SMPS6>;
>>> + };
>>> +
>>
>> There's no RPM control for S5 and S6. Please remove. Also, has this been
>> tested?
>>
> Ahh. these are SAW regulators, I will remove it from the list.
> Obviously, I did not test all the regulators.
There are some more that don't seem to match what we have downstream.
L26 is also SAW related, and the usb and hdmi switches are "locally"
controlled via ssbi pmic writes.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
On 26/02/15 19:00, Bjorn Andersson wrote:
> On Sun, Feb 22, 2015 at 11:54 PM, Srinivas Kandagatla
> <[email protected]> wrote:
>> This patch adds rpm node to apq8064 dt as rpm would be used by other
>> devices for regulator support. Also adds all the regulators in the rpm.
>>
>
> This looks good, with Kumars suggestion of GIT defines
> Reviewed-by: Bjorn Andersson <[email protected]>
>
Thanks Bjorn for Review.
> However, this binding is not merged yet and Stephen have requesting a
> complete redesign of the binding as well as the code. So that has to
> be concluded first, I presume.
>
Hmm, I know, It does not make sense to keep these patches locally
waiting for something to change in future, Am not sure when those new
changes be actually merged into the mainline?
IMHO, we should merge this patches as they are perfectly applicable to
whats on linus-tree. And fix if required when the new design is accepted.
>
> Separate of that, as it's highly likely that everyone will follow the
> pcb design guidelines for apq8064 the vin-supplies should be okay to
> specify at this level (and not in all board files). Perhaps also the
> switching frequencies for the SMPSs?
I will investigate on this and see If I can add some more useful
contents to the nodes.
Thanks,
srini
>
> Regards,
> Bjorn
>
On Thu, Feb 26, 2015 at 12:11 PM, Stephen Boyd <[email protected]> wrote:
> On 02/26/15 12:09, Srinivas Kandagatla wrote:
>>
>>
>> On 26/02/15 19:31, Stephen Boyd wrote:
>>> On 02/22/15 23:54, Srinivas Kandagatla wrote:
>>>> + pm8921_s5: pm8921-s5 {
>>>> + compatible = "qcom,rpm-pm8921-ftsmps";
>>>> + reg = <QCOM_RPM_PM8921_SMPS5>;
>>>> + };
>>>> +
>>>> + pm8921_s6: pm8921-s6 {
>>>> + compatible = "qcom,rpm-pm8921-ftsmps";
>>>> + reg = <QCOM_RPM_PM8921_SMPS6>;
>>>> + };
>>>> +
>>>
>>> There's no RPM control for S5 and S6. Please remove. Also, has this been
>>> tested?
>>>
>> Ahh. these are SAW regulators, I will remove it from the list.
>> Obviously, I did not test all the regulators.
>
> There are some more that don't seem to match what we have downstream.
> L26 is also SAW related, and the usb and hdmi switches are "locally"
> controlled via ssbi pmic writes.
>
According to msm-3.4 all three are controlled by pm8xxx-regulator, but
they are also exposed through the RPM - which I think I tested (a year
ago or so).
Regards,
Bjorn