Skip to content

Commit 65f1b1d

Browse files
Bartosz Golaszewskibroonie
authored andcommitted
regulator: qcom-rpmh: add support for pmm8654au regulators
Add the RPMH regulators exposed by the PMM8654au PMIC and its variants. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent cba6cfd commit 65f1b1d

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

drivers/regulator/qcom-rpmh-regulator.c

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,16 @@ static const struct rpmh_vreg_hw_data pmic5_pldo_lv = {
694694
.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
695695
};
696696

697+
static const struct rpmh_vreg_hw_data pmic5_pldo515_mv = {
698+
.regulator_type = VRM,
699+
.ops = &rpmh_regulator_vrm_drms_ops,
700+
.voltage_range = REGULATOR_LINEAR_RANGE(1800000, 0, 187, 8000),
701+
.n_voltages = 188,
702+
.hpm_min_load_uA = 10000,
703+
.pmic_mode_map = pmic_mode_map_pmic5_ldo,
704+
.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
705+
};
706+
697707
static const struct rpmh_vreg_hw_data pmic5_nldo = {
698708
.regulator_type = VRM,
699709
.ops = &rpmh_regulator_vrm_drms_ops,
@@ -704,6 +714,16 @@ static const struct rpmh_vreg_hw_data pmic5_nldo = {
704714
.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
705715
};
706716

717+
static const struct rpmh_vreg_hw_data pmic5_nldo515 = {
718+
.regulator_type = VRM,
719+
.ops = &rpmh_regulator_vrm_drms_ops,
720+
.voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 210, 8000),
721+
.n_voltages = 211,
722+
.hpm_min_load_uA = 30000,
723+
.pmic_mode_map = pmic_mode_map_pmic5_ldo,
724+
.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
725+
};
726+
707727
static const struct rpmh_vreg_hw_data pmic5_hfsmps510 = {
708728
.regulator_type = VRM,
709729
.ops = &rpmh_regulator_vrm_ops,
@@ -749,6 +769,15 @@ static const struct rpmh_vreg_hw_data pmic5_ftsmps525_mv = {
749769
.of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode,
750770
};
751771

772+
static const struct rpmh_vreg_hw_data pmic5_ftsmps527 = {
773+
.regulator_type = VRM,
774+
.ops = &rpmh_regulator_vrm_ops,
775+
.voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 215, 8000),
776+
.n_voltages = 215,
777+
.pmic_mode_map = pmic_mode_map_pmic5_smps,
778+
.of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode,
779+
};
780+
752781
static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = {
753782
.regulator_type = VRM,
754783
.ops = &rpmh_regulator_vrm_ops,
@@ -937,6 +966,28 @@ static const struct rpmh_vreg_init_data pmm8155au_vreg_data[] = {
937966
{}
938967
};
939968

969+
static const struct rpmh_vreg_init_data pmm8654au_vreg_data[] = {
970+
RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps527, "vdd-s1"),
971+
RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps527, "vdd-s2"),
972+
RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps527, "vdd-s3"),
973+
RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps527, "vdd-s4"),
974+
RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps527, "vdd-s5"),
975+
RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps527, "vdd-s6"),
976+
RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps527, "vdd-s7"),
977+
RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps527, "vdd-s8"),
978+
RPMH_VREG("smps9", "smp%s9", &pmic5_ftsmps527, "vdd-s9"),
979+
RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo515, "vdd-s9"),
980+
RPMH_VREG("ldo2", "ldo%s2", &pmic5_nldo515, "vdd-l2-l3"),
981+
RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo515, "vdd-l2-l3"),
982+
RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo515, "vdd-s9"),
983+
RPMH_VREG("ldo5", "ldo%s5", &pmic5_nldo515, "vdd-s9"),
984+
RPMH_VREG("ldo6", "ldo%s6", &pmic5_nldo515, "vdd-l6-l7"),
985+
RPMH_VREG("ldo7", "ldo%s7", &pmic5_nldo515, "vdd-l6-l7"),
986+
RPMH_VREG("ldo8", "ldo%s8", &pmic5_pldo515_mv, "vdd-l8-l9"),
987+
RPMH_VREG("ldo9", "ldo%s9", &pmic5_pldo, "vdd-l8-l9"),
988+
{}
989+
};
990+
940991
static const struct rpmh_vreg_init_data pm8350_vreg_data[] = {
941992
RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps510, "vdd-s1"),
942993
RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps510, "vdd-s2"),
@@ -1431,6 +1482,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = {
14311482
.compatible = "qcom,pmm8155au-rpmh-regulators",
14321483
.data = pmm8155au_vreg_data,
14331484
},
1485+
{
1486+
.compatible = "qcom,pmm8654au-rpmh-regulators",
1487+
.data = pmm8654au_vreg_data,
1488+
},
14341489
{
14351490
.compatible = "qcom,pmx55-rpmh-regulators",
14361491
.data = pmx55_vreg_data,

0 commit comments

Comments
 (0)