ipq806x: qcom rpm fix support for smb208

In commit "regulator: qcom: Rework to single platform device" the smb208
regulator used in IPQ8064 was left out.

Add it to that new framework and update Docs and DT accordingly.

Signed-off-by: Adrian Panella <ianchi74@outlook.com>
owl
Adrian Panella 2016-05-30 14:56:50 -05:00 committed by John Crispin
parent 928163bad2
commit bdaf558134
2 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,50 @@
In commit "regulator: qcom: Rework to single platform device" the smb208 regulator
used in IPQ8064 was left out.
Add it to that new framework and update Docs accordingly.
Signed-off-by: Adrian Panella <ianchi74@outlook.com>
--- a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt
+++ b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt
@@ -59,6 +59,7 @@ Regulator nodes are identified by their
"qcom,rpm-pm8058-regulators"
"qcom,rpm-pm8901-regulators"
"qcom,rpm-pm8921-regulators"
+ "qcom,rpm-smb208-regulators"
- vdd_l0_l1_lvs-supply:
- vdd_l2_l11_l12-supply:
@@ -156,6 +157,9 @@ pm8921:
l29, lvs1, lvs2, lvs3, lvs4, lvs5, lvs6, lvs7, usb-switch, hdmi-switch,
ncp
+smb208:
+ s1a, s1b, s2a, s2b
+
The content of each sub-node is defined by the standard binding for regulators -
see regulator.txt - with additional custom properties described below:
--- a/drivers/regulator/qcom_rpm-regulator.c
+++ b/drivers/regulator/qcom_rpm-regulator.c
@@ -869,10 +869,19 @@ static const struct rpm_regulator_data r
{ }
};
+static const struct rpm_regulator_data rpm_smb208_regulators[] = {
+ { "s1a", QCOM_RPM_SMB208_S1a, &smb208_smps, "vin_s1a" },
+ { "s1b", QCOM_RPM_SMB208_S1b, &smb208_smps, "vin_s1b" },
+ { "s2a", QCOM_RPM_SMB208_S2a, &smb208_smps, "vin_s2a" },
+ { "s2b", QCOM_RPM_SMB208_S2b, &smb208_smps, "vin_s2b" },
+ { }
+};
+
static const struct of_device_id rpm_of_match[] = {
{ .compatible = "qcom,rpm-pm8058-regulators", .data = &rpm_pm8058_regulators },
{ .compatible = "qcom,rpm-pm8901-regulators", .data = &rpm_pm8901_regulators },
{ .compatible = "qcom,rpm-pm8921-regulators", .data = &rpm_pm8921_regulators },
+ { .compatible = "qcom,rpm-smb208-regulators", .data = &rpm_smb208_regulators },
{ }
};
MODULE_DEVICE_TABLE(of, rpm_of_match);

View File

@ -0,0 +1,74 @@
Change DT to use new smb208 regulator driver.
Signed-off-by: Adrian Panella <ianchi74@outlook.com>
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -167,45 +167,37 @@
#address-cells = <1>;
#size-cells = <0>;
- smb208_s1a: smb208-s1a {
- compatible = "qcom,rpm-smb208";
- reg = <QCOM_RPM_SMB208_S1a>;
-
- regulator-min-microvolt = <1050000>;
- regulator-max-microvolt = <1150000>;
+ regulators {
+ compatible = "qcom,rpm-smb208-regulators";
- qcom,switch-mode-frequency = <1200000>;
-
- };
+ smb208_s1a: s1a {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1150000>;
- smb208_s1b: smb208-s1b {
- compatible = "qcom,rpm-smb208";
- reg = <QCOM_RPM_SMB208_S1b>;
+ qcom,switch-mode-frequency = <1200000>;
- regulator-min-microvolt = <1050000>;
- regulator-max-microvolt = <1150000>;
-
- qcom,switch-mode-frequency = <1200000>;
- };
+ };
- smb208_s2a: smb208-s2a {
- compatible = "qcom,rpm-smb208";
- reg = <QCOM_RPM_SMB208_S2a>;
+ smb208_s1b: s1b {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1150000>;
- regulator-min-microvolt = < 800000>;
- regulator-max-microvolt = <1250000>;
+ qcom,switch-mode-frequency = <1200000>;
+ };
- qcom,switch-mode-frequency = <1200000>;
- };
+ smb208_s2a: s2a {
+ regulator-min-microvolt = < 800000>;
+ regulator-max-microvolt = <1250000>;
- smb208_s2b: smb208-s2b {
- compatible = "qcom,rpm-smb208";
- reg = <QCOM_RPM_SMB208_S2b>;
+ qcom,switch-mode-frequency = <1200000>;
+ };
- regulator-min-microvolt = < 800000>;
- regulator-max-microvolt = <1250000>;
+ smb208_s2b: s2b {
+ regulator-min-microvolt = < 800000>;
+ regulator-max-microvolt = <1250000>;
- qcom,switch-mode-frequency = <1200000>;
+ qcom,switch-mode-frequency = <1200000>;
+ };
};
};