]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soc: qcom: rpmhpd: add sc8280xp & sa8540p rpmh power-domains
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 26 Apr 2022 23:35:08 +0000 (16:35 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 28 Apr 2022 19:19:57 +0000 (14:19 -0500)
The Qualcomm sc8280xp platform has 13 and the sa8540p platform has 11
power-domains. Add compatibles, the typically used ones power-domains
and their relevant active-only variants, to the RPMh power-domain
driver.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220426233508.1762345-4-bjorn.andersson@linaro.org
drivers/soc/qcom/rpmhpd.c

index f8d28e902942acffcc78ca80a5af3f92d9a21653..05fff8691ee3f949aedfa0240e2e9e5318c86ce4 100644 (file)
@@ -180,6 +180,36 @@ static struct rpmhpd mxc_ao = {
        .res_name = "mxc.lvl",
 };
 
+static struct rpmhpd nsp = {
+       .pd = { .name = "nsp", },
+       .res_name = "nsp.lvl",
+};
+
+static struct rpmhpd qphy = {
+       .pd = { .name = "qphy", },
+       .res_name = "qphy.lvl",
+};
+
+/* SA8540P RPMH powerdomains */
+static struct rpmhpd *sa8540p_rpmhpds[] = {
+       [SC8280XP_CX] = &cx,
+       [SC8280XP_CX_AO] = &cx_ao,
+       [SC8280XP_EBI] = &ebi,
+       [SC8280XP_GFX] = &gfx,
+       [SC8280XP_LCX] = &lcx,
+       [SC8280XP_LMX] = &lmx,
+       [SC8280XP_MMCX] = &mmcx,
+       [SC8280XP_MMCX_AO] = &mmcx_ao,
+       [SC8280XP_MX] = &mx,
+       [SC8280XP_MX_AO] = &mx_ao,
+       [SC8280XP_NSP] = &nsp,
+};
+
+static const struct rpmhpd_desc sa8540p_desc = {
+       .rpmhpds = sa8540p_rpmhpds,
+       .num_pds = ARRAY_SIZE(sa8540p_rpmhpds),
+};
+
 /* SDM845 RPMH powerdomains */
 static struct rpmhpd *sdm845_rpmhpds[] = {
        [SDM845_CX] = &cx_w_mx_parent,
@@ -378,10 +408,33 @@ static const struct rpmhpd_desc sc8180x_desc = {
        .num_pds = ARRAY_SIZE(sc8180x_rpmhpds),
 };
 
+/* SC8280xp RPMH powerdomains */
+static struct rpmhpd *sc8280xp_rpmhpds[] = {
+       [SC8280XP_CX] = &cx,
+       [SC8280XP_CX_AO] = &cx_ao,
+       [SC8280XP_EBI] = &ebi,
+       [SC8280XP_GFX] = &gfx,
+       [SC8280XP_LCX] = &lcx,
+       [SC8280XP_LMX] = &lmx,
+       [SC8280XP_MMCX] = &mmcx,
+       [SC8280XP_MMCX_AO] = &mmcx_ao,
+       [SC8280XP_MX] = &mx,
+       [SC8280XP_MX_AO] = &mx_ao,
+       [SC8280XP_NSP] = &nsp,
+       [SC8280XP_QPHY] = &qphy,
+};
+
+static const struct rpmhpd_desc sc8280xp_desc = {
+       .rpmhpds = sc8280xp_rpmhpds,
+       .num_pds = ARRAY_SIZE(sc8280xp_rpmhpds),
+};
+
 static const struct of_device_id rpmhpd_match_table[] = {
+       { .compatible = "qcom,sa8540p-rpmhpd", .data = &sa8540p_desc },
        { .compatible = "qcom,sc7180-rpmhpd", .data = &sc7180_desc },
        { .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc },
        { .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc },
+       { .compatible = "qcom,sc8280xp-rpmhpd", .data = &sc8280xp_desc },
        { .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc },
        { .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc},
        { .compatible = "qcom,sdx65-rpmhpd", .data = &sdx65_desc},