Commit 65f1b1dc authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Mark Brown

regulator: qcom-rpmh: add support for pmm8654au regulators

Add the RPMH regulators exposed by the PMM8654au PMIC and its variants.
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230406192811.460888-3-brgl@bgdev.plSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent cba6cfdc
...@@ -694,6 +694,16 @@ static const struct rpmh_vreg_hw_data pmic5_pldo_lv = { ...@@ -694,6 +694,16 @@ static const struct rpmh_vreg_hw_data pmic5_pldo_lv = {
.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
}; };
static const struct rpmh_vreg_hw_data pmic5_pldo515_mv = {
.regulator_type = VRM,
.ops = &rpmh_regulator_vrm_drms_ops,
.voltage_range = REGULATOR_LINEAR_RANGE(1800000, 0, 187, 8000),
.n_voltages = 188,
.hpm_min_load_uA = 10000,
.pmic_mode_map = pmic_mode_map_pmic5_ldo,
.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
};
static const struct rpmh_vreg_hw_data pmic5_nldo = { static const struct rpmh_vreg_hw_data pmic5_nldo = {
.regulator_type = VRM, .regulator_type = VRM,
.ops = &rpmh_regulator_vrm_drms_ops, .ops = &rpmh_regulator_vrm_drms_ops,
...@@ -704,6 +714,16 @@ static const struct rpmh_vreg_hw_data pmic5_nldo = { ...@@ -704,6 +714,16 @@ static const struct rpmh_vreg_hw_data pmic5_nldo = {
.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
}; };
static const struct rpmh_vreg_hw_data pmic5_nldo515 = {
.regulator_type = VRM,
.ops = &rpmh_regulator_vrm_drms_ops,
.voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 210, 8000),
.n_voltages = 211,
.hpm_min_load_uA = 30000,
.pmic_mode_map = pmic_mode_map_pmic5_ldo,
.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
};
static const struct rpmh_vreg_hw_data pmic5_hfsmps510 = { static const struct rpmh_vreg_hw_data pmic5_hfsmps510 = {
.regulator_type = VRM, .regulator_type = VRM,
.ops = &rpmh_regulator_vrm_ops, .ops = &rpmh_regulator_vrm_ops,
...@@ -749,6 +769,15 @@ static const struct rpmh_vreg_hw_data pmic5_ftsmps525_mv = { ...@@ -749,6 +769,15 @@ static const struct rpmh_vreg_hw_data pmic5_ftsmps525_mv = {
.of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode,
}; };
static const struct rpmh_vreg_hw_data pmic5_ftsmps527 = {
.regulator_type = VRM,
.ops = &rpmh_regulator_vrm_ops,
.voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 215, 8000),
.n_voltages = 215,
.pmic_mode_map = pmic_mode_map_pmic5_smps,
.of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode,
};
static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = { static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = {
.regulator_type = VRM, .regulator_type = VRM,
.ops = &rpmh_regulator_vrm_ops, .ops = &rpmh_regulator_vrm_ops,
...@@ -937,6 +966,28 @@ static const struct rpmh_vreg_init_data pmm8155au_vreg_data[] = { ...@@ -937,6 +966,28 @@ static const struct rpmh_vreg_init_data pmm8155au_vreg_data[] = {
{} {}
}; };
static const struct rpmh_vreg_init_data pmm8654au_vreg_data[] = {
RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps527, "vdd-s1"),
RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps527, "vdd-s2"),
RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps527, "vdd-s3"),
RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps527, "vdd-s4"),
RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps527, "vdd-s5"),
RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps527, "vdd-s6"),
RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps527, "vdd-s7"),
RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps527, "vdd-s8"),
RPMH_VREG("smps9", "smp%s9", &pmic5_ftsmps527, "vdd-s9"),
RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo515, "vdd-s9"),
RPMH_VREG("ldo2", "ldo%s2", &pmic5_nldo515, "vdd-l2-l3"),
RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo515, "vdd-l2-l3"),
RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo515, "vdd-s9"),
RPMH_VREG("ldo5", "ldo%s5", &pmic5_nldo515, "vdd-s9"),
RPMH_VREG("ldo6", "ldo%s6", &pmic5_nldo515, "vdd-l6-l7"),
RPMH_VREG("ldo7", "ldo%s7", &pmic5_nldo515, "vdd-l6-l7"),
RPMH_VREG("ldo8", "ldo%s8", &pmic5_pldo515_mv, "vdd-l8-l9"),
RPMH_VREG("ldo9", "ldo%s9", &pmic5_pldo, "vdd-l8-l9"),
{}
};
static const struct rpmh_vreg_init_data pm8350_vreg_data[] = { static const struct rpmh_vreg_init_data pm8350_vreg_data[] = {
RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps510, "vdd-s1"), RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps510, "vdd-s1"),
RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps510, "vdd-s2"), 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[] = { ...@@ -1431,6 +1482,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = {
.compatible = "qcom,pmm8155au-rpmh-regulators", .compatible = "qcom,pmm8155au-rpmh-regulators",
.data = pmm8155au_vreg_data, .data = pmm8155au_vreg_data,
}, },
{
.compatible = "qcom,pmm8654au-rpmh-regulators",
.data = pmm8654au_vreg_data,
},
{ {
.compatible = "qcom,pmx55-rpmh-regulators", .compatible = "qcom,pmx55-rpmh-regulators",
.data = pmx55_vreg_data, .data = pmx55_vreg_data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment