devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] SDM670 Power Domains
@ 2022-10-04 22:11 Richard Acayan
  2022-10-04 22:11 ` [PATCH v2 1/2] dt-bindings: power: rpmpd: add sdm670 power domains Richard Acayan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Acayan @ 2022-10-04 22:11 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree

Changes since v1:
 - accumulate review tags (reviewers are probably not the maintainers
   who are meant to apply this)
 - remove minor grammatical error in the cover letter

These are the power domains for the Qualcomm Snapdragon 670. I haven't
tried to turn on EBI with pd_ignore_unused but it is not present in
Google's msm-4.9 vendor kernel.

Richard Acayan (2):
  dt-bindings: power: rpmpd: add sdm670 power domains
  soc: qcom: rpmhpd: add sdm670 power domains

 .../devicetree/bindings/power/qcom,rpmpd.yaml  |  1 +
 drivers/soc/qcom/rpmhpd.c                      | 18 ++++++++++++++++++
 include/dt-bindings/power/qcom-rpmpd.h         | 10 ++++++++++
 3 files changed, 29 insertions(+)

-- 
2.38.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/2] dt-bindings: power: rpmpd: add sdm670 power domains
  2022-10-04 22:11 [PATCH v2 0/2] SDM670 Power Domains Richard Acayan
@ 2022-10-04 22:11 ` Richard Acayan
  2022-10-04 22:11 ` [PATCH v2 2/2] soc: qcom: rpmhpd: " Richard Acayan
  2022-10-18  3:05 ` [PATCH v2 0/2] SDM670 Power Domains Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Acayan @ 2022-10-04 22:11 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree

Add the RPMh power domain IDs and compatible string for Snapdragon 670 to
make SDM670 power domains accessible to the device trees.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/power/qcom,rpmpd.yaml          |  1 +
 include/dt-bindings/power/qcom-rpmpd.h                 | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
index 5b4eda919911..2ca98bad2d35 100644
--- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
+++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
@@ -34,6 +34,7 @@ properties:
       - qcom,sc7280-rpmhpd
       - qcom,sc8180x-rpmhpd
       - qcom,sc8280xp-rpmhpd
+      - qcom,sdm670-rpmhpd
       - qcom,sdm845-rpmhpd
       - qcom,sdx55-rpmhpd
       - qcom,sdx65-rpmhpd
diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
index f5f82dde7399..578e060890dd 100644
--- a/include/dt-bindings/power/qcom-rpmpd.h
+++ b/include/dt-bindings/power/qcom-rpmpd.h
@@ -4,6 +4,16 @@
 #ifndef _DT_BINDINGS_POWER_QCOM_RPMPD_H
 #define _DT_BINDINGS_POWER_QCOM_RPMPD_H
 
+/* SDM670 Power Domain Indexes */
+#define SDM670_MX	0
+#define SDM670_MX_AO	1
+#define SDM670_CX	2
+#define SDM670_CX_AO	3
+#define SDM670_LMX	4
+#define SDM670_LCX	5
+#define SDM670_GFX	6
+#define SDM670_MSS	7
+
 /* SDM845 Power Domain Indexes */
 #define SDM845_EBI	0
 #define SDM845_MX	1
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] soc: qcom: rpmhpd: add sdm670 power domains
  2022-10-04 22:11 [PATCH v2 0/2] SDM670 Power Domains Richard Acayan
  2022-10-04 22:11 ` [PATCH v2 1/2] dt-bindings: power: rpmpd: add sdm670 power domains Richard Acayan
@ 2022-10-04 22:11 ` Richard Acayan
  2022-10-18  3:05 ` [PATCH v2 0/2] SDM670 Power Domains Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Acayan @ 2022-10-04 22:11 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree

The Snapdragon 670 has similar power domains to SDM845 but no EBI power
domain. Add a new array for them to avoid requesting a power domain which
is unsupported by the hardware.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
 drivers/soc/qcom/rpmhpd.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
index 092f6ab09acf..319a2cf7e694 100644
--- a/drivers/soc/qcom/rpmhpd.c
+++ b/drivers/soc/qcom/rpmhpd.c
@@ -210,6 +210,23 @@ static const struct rpmhpd_desc sa8540p_desc = {
 	.num_pds = ARRAY_SIZE(sa8540p_rpmhpds),
 };
 
+/* SDM670 RPMH powerdomains */
+static struct rpmhpd *sdm670_rpmhpds[] = {
+	[SDM670_CX] = &cx_w_mx_parent,
+	[SDM670_CX_AO] = &cx_ao_w_mx_parent,
+	[SDM670_GFX] = &gfx,
+	[SDM670_LCX] = &lcx,
+	[SDM670_LMX] = &lmx,
+	[SDM670_MSS] = &mss,
+	[SDM670_MX] = &mx,
+	[SDM670_MX_AO] = &mx_ao,
+};
+
+static const struct rpmhpd_desc sdm670_desc = {
+	.rpmhpds = sdm670_rpmhpds,
+	.num_pds = ARRAY_SIZE(sdm670_rpmhpds),
+};
+
 /* SDM845 RPMH powerdomains */
 static struct rpmhpd *sdm845_rpmhpds[] = {
 	[SDM845_CX] = &cx_w_mx_parent,
@@ -435,6 +452,7 @@ 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,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},
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 0/2] SDM670 Power Domains
  2022-10-04 22:11 [PATCH v2 0/2] SDM670 Power Domains Richard Acayan
  2022-10-04 22:11 ` [PATCH v2 1/2] dt-bindings: power: rpmpd: add sdm670 power domains Richard Acayan
  2022-10-04 22:11 ` [PATCH v2 2/2] soc: qcom: rpmhpd: " Richard Acayan
@ 2022-10-18  3:05 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2022-10-18  3:05 UTC (permalink / raw)
  To: linux-arm-msm, mailingradian
  Cc: devicetree, robh+dt, agross, Krzysztof Kozlowski, Konrad Dybcio

On Tue, 4 Oct 2022 18:11:28 -0400, Richard Acayan wrote:
> Changes since v1:
>  - accumulate review tags (reviewers are probably not the maintainers
>    who are meant to apply this)
>  - remove minor grammatical error in the cover letter
> 
> These are the power domains for the Qualcomm Snapdragon 670. I haven't
> tried to turn on EBI with pd_ignore_unused but it is not present in
> Google's msm-4.9 vendor kernel.
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: power: rpmpd: add sdm670 power domains
      commit: 9ba5080e688d0e37a0d93bb63d83199d464debf4
[2/2] soc: qcom: rpmhpd: add sdm670 power domains
      commit: 5faeae4eac74685c3eda3e55bc3725a331ecd09d

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-18  3:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-04 22:11 [PATCH v2 0/2] SDM670 Power Domains Richard Acayan
2022-10-04 22:11 ` [PATCH v2 1/2] dt-bindings: power: rpmpd: add sdm670 power domains Richard Acayan
2022-10-04 22:11 ` [PATCH v2 2/2] soc: qcom: rpmhpd: " Richard Acayan
2022-10-18  3:05 ` [PATCH v2 0/2] SDM670 Power Domains Bjorn Andersson

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).