linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Rob Herring <robh+dt@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-arm-msm@vger.kernel.org,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vinod Koul <vkoul@kernel.org>
Subject: [PATCH 6/7] soc: qcom: rpmhpd: Add SM8450 power domains
Date: Wed,  1 Dec 2021 12:57:44 +0530	[thread overview]
Message-ID: <20211201072745.3969077-7-vkoul@kernel.org> (raw)
In-Reply-To: <20211201072745.3969077-1-vkoul@kernel.org>

From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

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>
---
 drivers/soc/qcom/rpmhpd.c | 52 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

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);
-- 
2.31.1


  parent reply	other threads:[~2021-12-01  7:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  7:27 [PATCH 0/7] soc: qcom: Add support for SM8450 Vinod Koul
2021-12-01  7:27 ` [PATCH 1/7] dt-bindings: arm: cpus: Add kryo780 compatible Vinod Koul
2021-12-01  7:27 ` [PATCH 2/7] dt-bindings: firmware: scm: Add SM8450 compatible Vinod Koul
2021-12-01  7:27 ` [PATCH 3/7] dt-bindings: arm: qcom: Document SM8450 SoC and boards Vinod Koul
2021-12-01  7:27 ` [PATCH 4/7] soc: qcom: smem: Update max processor count Vinod Koul
2021-12-01  7:27 ` [PATCH 5/7] dt-bindings: power: rpmpd: Add SM8450 to rpmpd binding Vinod Koul
2021-12-01  7:27 ` Vinod Koul [this message]
2021-12-01  7:27 ` [PATCH 7/7] soc: qcom: socinfo: add SM8450 ID Vinod Koul
2021-12-08 20:20 ` [PATCH 0/7] soc: qcom: Add support for SM8450 Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211201072745.3969077-7-vkoul@kernel.org \
    --to=vkoul@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).