Message ID | 20230914065422.5452-3-otto.pflueger@abscue.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | pmdomain: qcom: rpmpd: Add MSM8917 and similar SoCs | expand |
On 14.09.2023 08:54, Otto Pflüger wrote: > 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> > --- Would you mind picking up the RPMPD part of [1] and integrating QM215 and MSM8917 to use the new bindings? Konrad [1] https://lore.kernel.org/linux-arm-msm/1688647793-20950-2-git-send-email-quic_rohiagar@quicinc.com/
On Fri, 15 Sept 2023 at 16:41, Konrad Dybcio <konrad.dybcio@linaro.org> wrote: > > On 14.09.2023 08:54, Otto Pflüger wrote: > > 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> > > --- > Would you mind picking up the RPMPD part of [1] and integrating > QM215 and MSM8917 to use the new bindings? Please, no. That patch was dropped in favour of [2], which doesn't include RPMPD indices. And it's good, since we can introduce logical 'default' ones instead of the ones proposed in the [1]. I started working at making generic RPMPD indices, but I haven't sent the patches yet. So, I think, this patch is fine. > > Konrad > > [1] https://lore.kernel.org/linux-arm-msm/1688647793-20950-2-git-send-email-quic_rohiagar@quicinc.com/ [2] https://lore.kernel.org/linux-arm-msm/1689744162-9421-2-git-send-email-quic_rohiagar@quicinc.com/
diff --git a/drivers/pmdomain/qcom/rpmpd.c b/drivers/pmdomain/qcom/rpmpd.c index 3135dd1dafe0..2980ebd6ed8c 100644 --- a/drivers/pmdomain/qcom/rpmpd.c +++ b/drivers/pmdomain/qcom/rpmpd.c @@ -257,6 +257,24 @@ static struct rpmpd mx_l3a_corner_ao = { .key = KEY_CORNER, }; +static struct rpmpd mx_l3a_lvl_ao; +static struct rpmpd mx_l3a_lvl = { + .pd = { .name = "mx", }, + .peer = &mx_l3a_lvl_ao, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_LEVEL, +}; + +static struct rpmpd mx_l3a_lvl_ao = { + .pd = { .name = "mx_ao", }, + .peer = &mx_l3a_lvl, + .active_only = true, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_LEVEL, +}; + static struct rpmpd mx_l12a_lvl_ao; static struct rpmpd mx_l12a_lvl = { .pd = { .name = "mx", }, @@ -572,6 +590,20 @@ static const struct rpmpd_desc msm8916_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; +static struct rpmpd *msm8917_rpmpds[] = { + [MSM8917_VDDCX] = &cx_s2a_lvl, + [MSM8917_VDDCX_AO] = &cx_s2a_lvl_ao, + [MSM8917_VDDCX_VFL] = &cx_s2a_vfl, + [MSM8917_VDDMX] = &mx_l3a_lvl, + [MSM8917_VDDMX_AO] = &mx_l3a_lvl_ao, +}; + +static const struct rpmpd_desc msm8917_desc = { + .rpmpds = msm8917_rpmpds, + .num_pds = ARRAY_SIZE(msm8917_rpmpds), + .max_state = RPM_SMD_LEVEL_TURBO, +}; + static struct rpmpd *msm8953_rpmpds[] = { [MSM8953_VDDMD] = &md_s1a_lvl, [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao, @@ -764,6 +796,7 @@ static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,msm8226-rpmpd", .data = &msm8226_desc }, { .compatible = "qcom,msm8909-rpmpd", .data = &msm8916_desc }, { .compatible = "qcom,msm8916-rpmpd", .data = &msm8916_desc }, + { .compatible = "qcom,msm8917-rpmpd", .data = &msm8917_desc }, { .compatible = "qcom,msm8939-rpmpd", .data = &msm8939_desc }, { .compatible = "qcom,msm8953-rpmpd", .data = &msm8953_desc }, { .compatible = "qcom,msm8976-rpmpd", .data = &msm8976_desc },
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> --- drivers/pmdomain/qcom/rpmpd.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)