Message ID | 20241017-sar2130p-rpmhpd-v1-2-f4bf7f6fd12e@linaro.org (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | pmdomain: qcom: add support for RPMh power domains on SAR2130P | expand |
On 17/10/2024 19:52, Dmitry Baryshkov wrote: > Define power domains as supported by the RPMh on the SAR2130P platform. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > drivers/pmdomain/qcom/rpmhpd.c | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c > index 731feab9f17ddae699815332d193e9a298fff0e1..5c5f9542c3925045cc90872e81cae3e6c2936212 100644 > --- a/drivers/pmdomain/qcom/rpmhpd.c > +++ b/drivers/pmdomain/qcom/rpmhpd.c > @@ -259,6 +259,30 @@ static const struct rpmhpd_desc sa8775p_desc = { > .num_pds = ARRAY_SIZE(sa8775p_rpmhpds), > }; > > +/* SAR2130P RPMH powerdomains */ > +static struct rpmhpd *sar2130p_rpmhpds[] = { > + [RPMHPD_CX] = &cx, > + [RPMHPD_CX_AO] = &cx_ao, > + [RPMHPD_EBI] = &ebi, > + [RPMHPD_GFX] = &gfx, > + [RPMHPD_LCX] = &lcx, > + [RPMHPD_LMX] = &lmx, > + [RPMHPD_MMCX] = &mmcx_w_cx_parent, > + [RPMHPD_MMCX_AO] = &mmcx_ao_w_cx_parent, > + [RPMHPD_MSS] = &mss, > + [RPMHPD_MX] = &mx, > + [RPMHPD_MX_AO] = &mx_ao, > + [RPMHPD_MXC] = &mxc, > + [RPMHPD_MXC_AO] = &mxc_ao, > + [RPMHPD_NSP] = &nsp, > + [RPMHPD_QPHY] = &qphy, > +}; > + > +static const struct rpmhpd_desc sar2130p_desc = { > + .rpmhpds = sar2130p_rpmhpds, > + .num_pds = ARRAY_SIZE(sar2130p_rpmhpds), > +}; > + > /* SDM670 RPMH powerdomains */ > static struct rpmhpd *sdm670_rpmhpds[] = { > [SDM670_CX] = &cx_w_mx_parent, > @@ -665,6 +689,7 @@ static const struct of_device_id rpmhpd_match_table[] = { > { .compatible = "qcom,sa8155p-rpmhpd", .data = &sa8155p_desc }, > { .compatible = "qcom,sa8540p-rpmhpd", .data = &sa8540p_desc }, > { .compatible = "qcom,sa8775p-rpmhpd", .data = &sa8775p_desc }, > + { .compatible = "qcom,sar2130p-rpmhpd", .data = &sar2130p_desc}, > { .compatible = "qcom,sc7180-rpmhpd", .data = &sc7180_desc }, > { .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc }, > { .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc }, > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c index 731feab9f17ddae699815332d193e9a298fff0e1..5c5f9542c3925045cc90872e81cae3e6c2936212 100644 --- a/drivers/pmdomain/qcom/rpmhpd.c +++ b/drivers/pmdomain/qcom/rpmhpd.c @@ -259,6 +259,30 @@ static const struct rpmhpd_desc sa8775p_desc = { .num_pds = ARRAY_SIZE(sa8775p_rpmhpds), }; +/* SAR2130P RPMH powerdomains */ +static struct rpmhpd *sar2130p_rpmhpds[] = { + [RPMHPD_CX] = &cx, + [RPMHPD_CX_AO] = &cx_ao, + [RPMHPD_EBI] = &ebi, + [RPMHPD_GFX] = &gfx, + [RPMHPD_LCX] = &lcx, + [RPMHPD_LMX] = &lmx, + [RPMHPD_MMCX] = &mmcx_w_cx_parent, + [RPMHPD_MMCX_AO] = &mmcx_ao_w_cx_parent, + [RPMHPD_MSS] = &mss, + [RPMHPD_MX] = &mx, + [RPMHPD_MX_AO] = &mx_ao, + [RPMHPD_MXC] = &mxc, + [RPMHPD_MXC_AO] = &mxc_ao, + [RPMHPD_NSP] = &nsp, + [RPMHPD_QPHY] = &qphy, +}; + +static const struct rpmhpd_desc sar2130p_desc = { + .rpmhpds = sar2130p_rpmhpds, + .num_pds = ARRAY_SIZE(sar2130p_rpmhpds), +}; + /* SDM670 RPMH powerdomains */ static struct rpmhpd *sdm670_rpmhpds[] = { [SDM670_CX] = &cx_w_mx_parent, @@ -665,6 +689,7 @@ static const struct of_device_id rpmhpd_match_table[] = { { .compatible = "qcom,sa8155p-rpmhpd", .data = &sa8155p_desc }, { .compatible = "qcom,sa8540p-rpmhpd", .data = &sa8540p_desc }, { .compatible = "qcom,sa8775p-rpmhpd", .data = &sa8775p_desc }, + { .compatible = "qcom,sar2130p-rpmhpd", .data = &sar2130p_desc}, { .compatible = "qcom,sc7180-rpmhpd", .data = &sc7180_desc }, { .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc }, { .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc },
Define power domains as supported by the RPMh on the SAR2130P platform. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/pmdomain/qcom/rpmhpd.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)