regulator: qcom-rpmh: Add PM6350 regulators
authorLuca Weiss <luca@z3ntu.xyz>
Thu, 7 Oct 2021 21:24:30 +0000 (23:24 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 21 Oct 2021 13:19:10 +0000 (14:19 +0100)
Add the configuration for pm6350 regulators. The supplies are not known
so leave them out for now.

Additionally leave out configuration of smps3 - smps5 and ldo17 as these
are not configured in the downstream kernel and the type of them is not
known.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Link: https://lore.kernel.org/r/20211007212444.328034-4-luca@z3ntu.xyz
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom-rpmh-regulator.c

index 7f458d5..12425f6 100644 (file)
@@ -1047,6 +1047,34 @@ static const struct rpmh_vreg_init_data pm6150l_vreg_data[] = {
        {}
 };
 
+static const struct rpmh_vreg_init_data pm6350_vreg_data[] = {
+       RPMH_VREG("smps1",  "smp%s1",  &pmic5_ftsmps510, NULL),
+       RPMH_VREG("smps2",  "smp%s2",  &pmic5_hfsmps510, NULL),
+       /* smps3 - smps5 not configured */
+       RPMH_VREG("ldo1",   "ldo%s1",  &pmic5_nldo,      NULL),
+       RPMH_VREG("ldo2",   "ldo%s2",  &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo3",   "ldo%s3",  &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo4",   "ldo%s4",  &pmic5_nldo,      NULL),
+       RPMH_VREG("ldo5",   "ldo%s5",  &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo6",   "ldo%s6",  &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo7",   "ldo%s7",  &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo8",   "ldo%s8",  &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo9",   "ldo%s9",  &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo10",  "ldo%s10", &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo11",  "ldo%s11", &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo12",  "ldo%s12", &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo13",  "ldo%s13", &pmic5_nldo,      NULL),
+       RPMH_VREG("ldo14",  "ldo%s14", &pmic5_pldo,      NULL),
+       RPMH_VREG("ldo15",  "ldo%s15", &pmic5_nldo,      NULL),
+       RPMH_VREG("ldo16",  "ldo%s16", &pmic5_nldo,      NULL),
+       /* ldo17 not configured */
+       RPMH_VREG("ldo18",  "ldo%s18", &pmic5_nldo,      NULL),
+       RPMH_VREG("ldo19",  "ldo%s19", &pmic5_nldo,      NULL),
+       RPMH_VREG("ldo20",  "ldo%s20", &pmic5_nldo,      NULL),
+       RPMH_VREG("ldo21",  "ldo%s21", &pmic5_nldo,      NULL),
+       RPMH_VREG("ldo22",  "ldo%s22", &pmic5_nldo,      NULL),
+};
+
 static const struct rpmh_vreg_init_data pmx55_vreg_data[] = {
        RPMH_VREG("smps1",   "smp%s1",    &pmic5_ftsmps510, "vdd-s1"),
        RPMH_VREG("smps2",   "smp%s2",    &pmic5_hfsmps510, "vdd-s2"),
@@ -1202,6 +1230,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = {
                .data = pm6150l_vreg_data,
        },
        {
+               .compatible = "qcom,pm6350-rpmh-regulators",
+               .data = pm6350_vreg_data,
+       },
+       {
                .compatible = "qcom,pmc8180-rpmh-regulators",
                .data = pm8150_vreg_data,
        },