regulator: qcom_spmi: Add PM8950 SPMI regulator
authorAngelo G. Del Regno <kholk11@gmail.com>
Sat, 21 Sep 2019 09:50:40 +0000 (11:50 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 1 Oct 2019 11:22:12 +0000 (12:22 +0100)
The PM8950 has 5 HFSMPS, 1 FTSMPS2.5 (s5, controlling APC voltage)
and 23 LDO regulators.
Add the configuration for this chip.

Signed-off-by: Angelo G. Del Regno <kholk11@gmail.com>
Link: https://lore.kernel.org/r/20190921095043.62593-3-kholk11@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
drivers/regulator/qcom_spmi-regulator.c

index 430b8622bda1ab74091c2db67a6c07cacb711923..76885fd8a3c978237fb4cd5091a86e778aeb70c6 100644 (file)
@@ -8,6 +8,7 @@ Qualcomm SPMI Regulators
                        "qcom,pm8841-regulators"
                        "qcom,pm8916-regulators"
                        "qcom,pm8941-regulators"
+                       "qcom,pm8950-regulators"
                        "qcom,pm8994-regulators"
                        "qcom,pmi8994-regulators"
                        "qcom,pms405-regulators"
@@ -72,6 +73,26 @@ Qualcomm SPMI Regulators
        Definition: Reference to regulator supplying the input pin, as
                    described in the data sheet.
 
+- vdd_s1-supply:
+- vdd_s2-supply:
+- vdd_s3-supply:
+- vdd_s4-supply:
+- vdd_s4-supply:
+- vdd_s5-supply:
+- vdd_s6-supply:
+- vdd_l1_l19-supply:
+- vdd_l2_l23-supply:
+- vdd_l3-supply:
+- vdd_l4_l5_l6_l7_l16-supply:
+- vdd_l8_l11_l12_l17_l22-supply:
+- vdd_l9_l10_l13_l14_l15_l18-supply:
+- vdd_l20-supply:
+- vdd_l21-supply:
+       Usage: optional (pm8950 only)
+       Value type: <phandle>
+       Definition: reference to regulator supplying the input pin, as
+                   described in the data sheet
+
 - vdd_s1-supply:
 - vdd_s2-supply:
 - vdd_s3-supply:
index 7f51c5fc8194dd1f4fbc85e31871c77caea96b72..049ac3887ecdc6aa1f2e9874719e5c1befed8faa 100644 (file)
@@ -1869,6 +1869,39 @@ static const struct spmi_regulator_data pm8916_regulators[] = {
        { }
 };
 
+static const struct spmi_regulator_data pm8950_regulators[] = {
+       { "s1", 0x1400, "vdd_s1", },
+       { "s2", 0x1700, "vdd_s2", },
+       { "s3", 0x1a00, "vdd_s3", },
+       { "s4", 0x1d00, "vdd_s4", },
+       { "s5", 0x2000, "vdd_s5", },
+       { "s6", 0x2300, "vdd_s6", },
+       { "l1", 0x4000, "vdd_l1_l19", },
+       { "l2", 0x4100, "vdd_l2_l23", },
+       { "l3", 0x4200, "vdd_l3", },
+       { "l4", 0x4300, "vdd_l4_l5_l6_l7_l16", },
+       { "l5", 0x4400, "vdd_l4_l5_l6_l7_l16", },
+       { "l6", 0x4500, "vdd_l4_l5_l6_l7_l16", },
+       { "l7", 0x4600, "vdd_l4_l5_l6_l7_l16", },
+       { "l8", 0x4700, "vdd_l8_l11_l12_l17_l22", },
+       { "l9", 0x4800, "vdd_l9_l10_l13_l14_l15_l18", },
+       { "l10", 0x4900, "vdd_l9_l10_l13_l14_l15_l18", },
+       { "l11", 0x4a00, "vdd_l8_l11_l12_l17_l22", },
+       { "l12", 0x4b00, "vdd_l8_l11_l12_l17_l22", },
+       { "l13", 0x4c00, "vdd_l9_l10_l13_l14_l15_l18", },
+       { "l14", 0x4d00, "vdd_l9_l10_l13_l14_l15_l18", },
+       { "l15", 0x4e00, "vdd_l9_l10_l13_l14_l15_l18", },
+       { "l16", 0x4f00, "vdd_l4_l5_l6_l7_l16", },
+       { "l17", 0x5000, "vdd_l8_l11_l12_l17_l22", },
+       { "l18", 0x5100, "vdd_l9_l10_l13_l14_l15_l18", },
+       { "l19", 0x5200, "vdd_l1_l19", },
+       { "l20", 0x5300, "vdd_l20", },
+       { "l21", 0x5400, "vdd_l21", },
+       { "l22", 0x5500, "vdd_l8_l11_l12_l17_l22", },
+       { "l23", 0x5600, "vdd_l2_l23", },
+       { }
+};
+
 static const struct spmi_regulator_data pm8994_regulators[] = {
        { "s1", 0x1400, "vdd_s1", },
        { "s2", 0x1700, "vdd_s2", },
@@ -1945,6 +1978,7 @@ static const struct of_device_id qcom_spmi_regulator_match[] = {
        { .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators },
        { .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators },
        { .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators },
+       { .compatible = "qcom,pm8950-regulators", .data = &pm8950_regulators },
        { .compatible = "qcom,pm8994-regulators", .data = &pm8994_regulators },
        { .compatible = "qcom,pmi8994-regulators", .data = &pmi8994_regulators },
        { .compatible = "qcom,pms405-regulators", .data = &pms405_regulators },