Skip to content

Commit d975a9a

Browse files
affenull2345Ulf Hansson
authored andcommitted
pmdomain: qcom: rpmpd: Add MSM8917 power domains
MSM8917 uses the SMPA2 and LDOA3 regulators provided by the PM8937 PMIC for the VDDCX and VDDMX power domains in voltage level mode, respectively. These definitions should also work on MSM8937. 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-3-otto.pflueger@abscue.de Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 1817d56 commit d975a9a

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

drivers/pmdomain/qcom/rpmpd.c

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,24 @@ static struct rpmpd mx_l3a_corner_ao = {
257257
.key = KEY_CORNER,
258258
};
259259

260+
static struct rpmpd mx_l3a_lvl_ao;
261+
static struct rpmpd mx_l3a_lvl = {
262+
.pd = { .name = "mx", },
263+
.peer = &mx_l3a_lvl_ao,
264+
.res_type = RPMPD_LDOA,
265+
.res_id = 3,
266+
.key = KEY_LEVEL,
267+
};
268+
269+
static struct rpmpd mx_l3a_lvl_ao = {
270+
.pd = { .name = "mx_ao", },
271+
.peer = &mx_l3a_lvl,
272+
.active_only = true,
273+
.res_type = RPMPD_LDOA,
274+
.res_id = 3,
275+
.key = KEY_LEVEL,
276+
};
277+
260278
static struct rpmpd mx_l12a_lvl_ao;
261279
static struct rpmpd mx_l12a_lvl = {
262280
.pd = { .name = "mx", },
@@ -572,6 +590,20 @@ static const struct rpmpd_desc msm8916_desc = {
572590
.max_state = MAX_CORNER_RPMPD_STATE,
573591
};
574592

593+
static struct rpmpd *msm8917_rpmpds[] = {
594+
[MSM8917_VDDCX] = &cx_s2a_lvl,
595+
[MSM8917_VDDCX_AO] = &cx_s2a_lvl_ao,
596+
[MSM8917_VDDCX_VFL] = &cx_s2a_vfl,
597+
[MSM8917_VDDMX] = &mx_l3a_lvl,
598+
[MSM8917_VDDMX_AO] = &mx_l3a_lvl_ao,
599+
};
600+
601+
static const struct rpmpd_desc msm8917_desc = {
602+
.rpmpds = msm8917_rpmpds,
603+
.num_pds = ARRAY_SIZE(msm8917_rpmpds),
604+
.max_state = RPM_SMD_LEVEL_TURBO,
605+
};
606+
575607
static struct rpmpd *msm8953_rpmpds[] = {
576608
[MSM8953_VDDMD] = &md_s1a_lvl,
577609
[MSM8953_VDDMD_AO] = &md_s1a_lvl_ao,
@@ -764,6 +796,7 @@ static const struct of_device_id rpmpd_match_table[] = {
764796
{ .compatible = "qcom,msm8226-rpmpd", .data = &msm8226_desc },
765797
{ .compatible = "qcom,msm8909-rpmpd", .data = &msm8916_desc },
766798
{ .compatible = "qcom,msm8916-rpmpd", .data = &msm8916_desc },
799+
{ .compatible = "qcom,msm8917-rpmpd", .data = &msm8917_desc },
767800
{ .compatible = "qcom,msm8939-rpmpd", .data = &msm8939_desc },
768801
{ .compatible = "qcom,msm8953-rpmpd", .data = &msm8953_desc },
769802
{ .compatible = "qcom,msm8976-rpmpd", .data = &msm8976_desc },

0 commit comments

Comments
 (0)