summaryrefslogtreecommitdiff
path: root/drivers/soc/qcom
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>2021-12-01 12:57:44 +0530
committerBjorn Andersson <bjorn.andersson@linaro.org>2021-12-20 19:10:10 -0600
commit5d12289516d943dd6f348826a9f56f84199af0b1 (patch)
tree4ce1e284cc6c486d748e6dee8bc0dce3794bc48a /drivers/soc/qcom
parent22c755708c2395c58eb7670357baa110ba1ca2e0 (diff)
soc: qcom: rpmhpd: Add SM8450 power domains
Add the power domains exposed by RPMH in the Qualcomm SM8450 platform. Unlike previous generations CX domain is not a child of MX domain. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20211201072745.3969077-7-vkoul@kernel.org
Diffstat (limited to 'drivers/soc/qcom')
-rw-r--r--drivers/soc/qcom/rpmhpd.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
index 1118345d8824..e7e150ce1b1a 100644
--- a/drivers/soc/qcom/rpmhpd.c
+++ b/drivers/soc/qcom/rpmhpd.c
@@ -253,6 +253,57 @@ static const struct rpmhpd_desc sm8350_desc = {
.num_pds = ARRAY_SIZE(sm8350_rpmhpds),
};
+/* SM8450 RPMH powerdomains */
+static struct rpmhpd sm8450_cx_ao;
+static struct rpmhpd sm8450_cx = {
+ .pd = { .name = "cx", },
+ .peer = &sm8450_cx_ao,
+ .res_name = "cx.lvl",
+};
+
+static struct rpmhpd sm8450_cx_ao = {
+ .pd = { .name = "cx_ao", },
+ .active_only = true,
+ .res_name = "cx.lvl",
+};
+
+static struct rpmhpd sm8450_mmcx_ao;
+static struct rpmhpd sm8450_mmcx = {
+ .pd = { .name = "mmcx", },
+ .peer = &sm8450_mmcx_ao,
+ .parent = &sm8450_cx.pd,
+ .res_name = "mmcx.lvl",
+};
+
+static struct rpmhpd sm8450_mmcx_ao = {
+ .pd = { .name = "mmcx_ao", },
+ .active_only = true,
+ .peer = &sm8450_mmcx,
+ .parent = &sm8450_cx_ao.pd,
+ .res_name = "mmcx.lvl",
+};
+
+static struct rpmhpd *sm8450_rpmhpds[] = {
+ [SM8450_CX] = &sm8450_cx,
+ [SM8450_CX_AO] = &sm8450_cx_ao,
+ [SM8450_EBI] = &sdm845_ebi,
+ [SM8450_GFX] = &sdm845_gfx,
+ [SM8450_LCX] = &sdm845_lcx,
+ [SM8450_LMX] = &sdm845_lmx,
+ [SM8450_MMCX] = &sm8450_mmcx,
+ [SM8450_MMCX_AO] = &sm8450_mmcx_ao,
+ [SM8450_MX] = &sdm845_mx,
+ [SM8450_MX_AO] = &sdm845_mx_ao,
+ [SM8450_MXC] = &sm8350_mxc,
+ [SM8450_MXC_AO] = &sm8350_mxc_ao,
+ [SM8450_MSS] = &sdm845_mss,
+};
+
+static const struct rpmhpd_desc sm8450_desc = {
+ .rpmhpds = sm8450_rpmhpds,
+ .num_pds = ARRAY_SIZE(sm8450_rpmhpds),
+};
+
/* SC7180 RPMH powerdomains */
static struct rpmhpd *sc7180_rpmhpds[] = {
[SC7180_CX] = &sdm845_cx,
@@ -318,6 +369,7 @@ static const struct of_device_id rpmhpd_match_table[] = {
{ .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 },
{ }
};
MODULE_DEVICE_TABLE(of, rpmhpd_match_table);