diff options
Diffstat (limited to 'drivers/pmdomain/qcom/rpmhpd.c')
-rw-r--r-- | drivers/pmdomain/qcom/rpmhpd.c | 83 |
1 files changed, 76 insertions, 7 deletions
diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c index a87e336d5e..f2e64324de 100644 --- a/drivers/pmdomain/qcom/rpmhpd.c +++ b/drivers/pmdomain/qcom/rpmhpd.c @@ -197,11 +197,21 @@ static struct rpmhpd nsp1 = { .res_name = "nsp1.lvl", }; +static struct rpmhpd nsp2 = { + .pd = { .name = "nsp2", }, + .res_name = "nsp2.lvl", +}; + static struct rpmhpd qphy = { .pd = { .name = "qphy", }, .res_name = "qphy.lvl", }; +static struct rpmhpd gmxc = { + .pd = { .name = "gmxc", }, + .res_name = "gmxc.lvl", +}; + /* SA8540P RPMH powerdomains */ static struct rpmhpd *sa8540p_rpmhpds[] = { [SC8280XP_CX] = &cx, @@ -337,6 +347,23 @@ static const struct rpmhpd_desc sm6350_desc = { .num_pds = ARRAY_SIZE(sm6350_rpmhpds), }; +/* SM7150 RPMH powerdomains */ +static struct rpmhpd *sm7150_rpmhpds[] = { + [RPMHPD_CX] = &cx_w_mx_parent, + [RPMHPD_CX_AO] = &cx_ao_w_mx_parent, + [RPMHPD_GFX] = &gfx, + [RPMHPD_LCX] = &lcx, + [RPMHPD_LMX] = &lmx, + [RPMHPD_MX] = &mx, + [RPMHPD_MX_AO] = &mx_ao, + [RPMHPD_MSS] = &mss, +}; + +static const struct rpmhpd_desc sm7150_desc = { + .rpmhpds = sm7150_rpmhpds, + .num_pds = ARRAY_SIZE(sm7150_rpmhpds), +}; + /* SM8150 RPMH powerdomains */ static struct rpmhpd *sm8150_rpmhpds[] = { [SM8150_CX] = &cx_w_mx_parent, @@ -458,6 +485,30 @@ static const struct rpmhpd_desc sm8550_desc = { .num_pds = ARRAY_SIZE(sm8550_rpmhpds), }; +/* SM8650 RPMH powerdomains */ +static struct rpmhpd *sm8650_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_NSP2] = &nsp2, +}; + +static const struct rpmhpd_desc sm8650_desc = { + .rpmhpds = sm8650_rpmhpds, + .num_pds = ARRAY_SIZE(sm8650_rpmhpds), +}; + /* QDU1000/QRU1000 RPMH powerdomains */ static struct rpmhpd *qdu1000_rpmhpds[] = { [QDU1000_CX] = &cx, @@ -547,6 +598,28 @@ static const struct rpmhpd_desc sc8280xp_desc = { .num_pds = ARRAY_SIZE(sc8280xp_rpmhpds), }; +/* SC8380xp RPMH powerdomains */ +static struct rpmhpd *sc8380xp_rpmhpds[] = { + [RPMHPD_CX] = &cx, + [RPMHPD_CX_AO] = &cx_ao, + [RPMHPD_EBI] = &ebi, + [RPMHPD_GFX] = &gfx, + [RPMHPD_LCX] = &lcx, + [RPMHPD_LMX] = &lmx, + [RPMHPD_MMCX] = &mmcx, + [RPMHPD_MMCX_AO] = &mmcx_ao, + [RPMHPD_MX] = &mx, + [RPMHPD_MX_AO] = &mx_ao, + [RPMHPD_NSP] = &nsp, + [RPMHPD_MXC] = &mxc, + [RPMHPD_GMXC] = &gmxc, +}; + +static const struct rpmhpd_desc sc8380xp_desc = { + .rpmhpds = sc8380xp_rpmhpds, + .num_pds = ARRAY_SIZE(sc8380xp_rpmhpds), +}; + static const struct of_device_id rpmhpd_match_table[] = { { .compatible = "qcom,qdu1000-rpmhpd", .data = &qdu1000_desc }, { .compatible = "qcom,sa8155p-rpmhpd", .data = &sa8155p_desc }, @@ -556,17 +629,20 @@ static const struct of_device_id rpmhpd_match_table[] = { { .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc }, { .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc }, { .compatible = "qcom,sc8280xp-rpmhpd", .data = &sc8280xp_desc }, + { .compatible = "qcom,sc8380xp-rpmhpd", .data = &sc8380xp_desc }, { .compatible = "qcom,sdm670-rpmhpd", .data = &sdm670_desc }, { .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc }, { .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc}, { .compatible = "qcom,sdx65-rpmhpd", .data = &sdx65_desc}, { .compatible = "qcom,sdx75-rpmhpd", .data = &sdx75_desc}, { .compatible = "qcom,sm6350-rpmhpd", .data = &sm6350_desc }, + { .compatible = "qcom,sm7150-rpmhpd", .data = &sm7150_desc }, { .compatible = "qcom,sm8150-rpmhpd", .data = &sm8150_desc }, { .compatible = "qcom,sm8250-rpmhpd", .data = &sm8250_desc }, { .compatible = "qcom,sm8350-rpmhpd", .data = &sm8350_desc }, { .compatible = "qcom,sm8450-rpmhpd", .data = &sm8450_desc }, { .compatible = "qcom,sm8550-rpmhpd", .data = &sm8550_desc }, + { .compatible = "qcom,sm8650-rpmhpd", .data = &sm8650_desc }, { } }; MODULE_DEVICE_TABLE(of, rpmhpd_match_table); @@ -725,12 +801,6 @@ out: return ret; } -static unsigned int rpmhpd_get_performance_state(struct generic_pm_domain *genpd, - struct dev_pm_opp *opp) -{ - return dev_pm_opp_get_level(opp); -} - static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd) { int i; @@ -820,7 +890,6 @@ static int rpmhpd_probe(struct platform_device *pdev) rpmhpds[i]->pd.power_off = rpmhpd_power_off; rpmhpds[i]->pd.power_on = rpmhpd_power_on; rpmhpds[i]->pd.set_performance_state = rpmhpd_set_performance_state; - rpmhpds[i]->pd.opp_to_performance_state = rpmhpd_get_performance_state; pm_genpd_init(&rpmhpds[i]->pd, NULL, true); data->domains[i] = &rpmhpds[i]->pd; |