Skip to contentSkip to conversation

SDM670 Power Domains

PATCH Applied Richard Acayan 2 participants 4 messages Oct 4, 2022 – Oct 18, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover SDM670 Power Domains

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(+)
Signature · 1 line
2.38.0
#1 lore raw

PATCH v2 1/2 dt-bindings: power: rpmpd: add sdm670 power domains

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

---
 .../devicetree/bindings/power/qcom,rpmpd.yaml          |  1 +
 include/dt-bindings/power/qcom-rpmpd.h                 | 10 ++++++++++
 2 files changed, 11 insertions(+)
Documentation/devicetree/bindings/power/qcom,rpmpd.yaml +1 -0
index 5b4eda919911..2ca98bad2d35 100644
@@ -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
include/dt-bindings/power/qcom-rpmpd.h +10 -0
index f5f82dde7399..578e060890dd 100644
@@ -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
Signature · 1 line
2.38.0
#2 lore raw

PATCH v2 2/2 soc: qcom: rpmhpd: add sdm670 power domains

In reply to Richard Acayan

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.

---
 drivers/soc/qcom/rpmhpd.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
drivers/soc/qcom/rpmhpd.c +18 -0
index 092f6ab09acf..319a2cf7e694 100644
@@ -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},
Signature · 1 line
2.38.0
maintainer Applied
#3 lore raw
In reply to Richard Acayan
Quoted 10 lines · Richard Acayan

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,

Signature · 1 line
Bjorn Andersson <[email protected]>