summaryrefslogtreecommitdiff
path: root/drivers/pmdomain
diff options
context:
space:
mode:
authorOtto Pflüger <otto.pflueger@abscue.de>2023-10-14 16:38:23 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2023-10-24 13:50:31 +0300
commitfad5bf2e2c900232277288460b7a91b147954aab (patch)
tree5bb10f8eb047467579f3479ee88203a1f29b5009 /drivers/pmdomain
parentd975a9a9d631da97d22af06a9c806a0530b0f90b (diff)
downloadlinux-fad5bf2e2c900232277288460b7a91b147954aab.tar.xz
pmdomain: qcom: rpmpd: Add QM215 power domains
QM215 is typically paired with a PM8916 PMIC and uses its SMPA1 and LDOA2 regulators in voltage level mode for VDDCX and VDDMX, respectively. Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20231014133823.14088-4-otto.pflueger@abscue.de Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/pmdomain')
-rw-r--r--drivers/pmdomain/qcom/rpmpd.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/pmdomain/qcom/rpmpd.c b/drivers/pmdomain/qcom/rpmpd.c
index ae71f78243e1..07590a3ef19c 100644
--- a/drivers/pmdomain/qcom/rpmpd.c
+++ b/drivers/pmdomain/qcom/rpmpd.c
@@ -105,6 +105,24 @@ static struct rpmpd cx_s1a_corner_ao = {
.key = KEY_CORNER,
};
+static struct rpmpd cx_s1a_lvl_ao;
+static struct rpmpd cx_s1a_lvl = {
+ .pd = { .name = "cx", },
+ .peer = &cx_s1a_lvl_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd cx_s1a_lvl_ao = {
+ .pd = { .name = "cx_ao", },
+ .peer = &cx_s1a_lvl,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_LEVEL,
+};
+
static struct rpmpd cx_s2a_corner_ao;
static struct rpmpd cx_s2a_corner = {
.pd = { .name = "cx", },
@@ -180,6 +198,13 @@ static struct rpmpd cx_s1a_vfc = {
.key = KEY_FLOOR_CORNER,
};
+static struct rpmpd cx_s1a_vfl = {
+ .pd = { .name = "cx_vfl", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_FLOOR_LEVEL,
+};
+
static struct rpmpd cx_s2a_vfc = {
.pd = { .name = "cx_vfc", },
.res_type = RPMPD_SMPA,
@@ -239,6 +264,24 @@ static struct rpmpd gx_rwgx0_lvl_ao = {
};
/* MX */
+static struct rpmpd mx_l2a_lvl_ao;
+static struct rpmpd mx_l2a_lvl = {
+ .pd = { .name = "mx", },
+ .peer = &mx_l2a_lvl_ao,
+ .res_type = RPMPD_LDOA,
+ .res_id = 2,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd mx_l2a_lvl_ao = {
+ .pd = { .name = "mx_ao", },
+ .peer = &mx_l2a_lvl,
+ .active_only = true,
+ .res_type = RPMPD_LDOA,
+ .res_id = 2,
+ .key = KEY_LEVEL,
+};
+
static struct rpmpd mx_l3a_corner_ao;
static struct rpmpd mx_l3a_corner = {
.pd = { .name = "mx", },
@@ -704,6 +747,20 @@ static const struct rpmpd_desc qcs404_desc = {
.max_state = RPM_SMD_LEVEL_BINNING,
};
+static struct rpmpd *qm215_rpmpds[] = {
+ [QM215_VDDCX] = &cx_s1a_lvl,
+ [QM215_VDDCX_AO] = &cx_s1a_lvl_ao,
+ [QM215_VDDCX_VFL] = &cx_s1a_vfl,
+ [QM215_VDDMX] = &mx_l2a_lvl,
+ [QM215_VDDMX_AO] = &mx_l2a_lvl_ao,
+};
+
+static const struct rpmpd_desc qm215_desc = {
+ .rpmpds = qm215_rpmpds,
+ .num_pds = ARRAY_SIZE(qm215_rpmpds),
+ .max_state = RPM_SMD_LEVEL_TURBO,
+};
+
static struct rpmpd *sdm660_rpmpds[] = {
[SDM660_VDDCX] = &cx_rwcx0_lvl,
[SDM660_VDDCX_AO] = &cx_rwcx0_lvl_ao,
@@ -805,6 +862,7 @@ static const struct of_device_id rpmpd_match_table[] = {
{ .compatible = "qcom,msm8998-rpmpd", .data = &msm8998_desc },
{ .compatible = "qcom,qcm2290-rpmpd", .data = &qcm2290_desc },
{ .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc },
+ { .compatible = "qcom,qm215-rpmpd", .data = &qm215_desc },
{ .compatible = "qcom,sdm660-rpmpd", .data = &sdm660_desc },
{ .compatible = "qcom,sm6115-rpmpd", .data = &sm6115_desc },
{ .compatible = "qcom,sm6125-rpmpd", .data = &sm6125_desc },