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

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 the
Google's msm-4.9 vendor kernel.

 .../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(+)



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

* [PATCH 1/2] dt-bindings: power: rpmpd: add sdm670 power domains
  2022-09-20  2:19 [PATCH 0/2] SDM670 Power Domains Richard Acayan
@ 2022-09-20  2:19 ` Richard Acayan
  2022-09-20  8:17   ` Krzysztof Kozlowski
  2022-09-20  8:48   ` Krzysztof Kozlowski
  2022-09-20  2:19 ` [PATCH 2/2] soc: qcom: rpmhpd: " Richard Acayan
  1 sibling, 2 replies; 7+ messages in thread
From: Richard Acayan @ 2022-09-20  2:19 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>
---
 .../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.37.3


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

* [PATCH 2/2] soc: qcom: rpmhpd: add sdm670 power domains
  2022-09-20  2:19 [PATCH 0/2] SDM670 Power Domains Richard Acayan
  2022-09-20  2:19 ` [PATCH 1/2] dt-bindings: power: rpmpd: add sdm670 power domains Richard Acayan
@ 2022-09-20  2:19 ` Richard Acayan
  2022-09-20 22:50   ` Konrad Dybcio
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Acayan @ 2022-09-20  2:19 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>
---
 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.37.3


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

* Re: [PATCH 1/2] dt-bindings: power: rpmpd: add sdm670 power domains
  2022-09-20  2:19 ` [PATCH 1/2] dt-bindings: power: rpmpd: add sdm670 power domains Richard Acayan
@ 2022-09-20  8:17   ` Krzysztof Kozlowski
  2022-09-20  8:48     ` Krzysztof Kozlowski
  2022-09-20  8:48   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-20  8:17 UTC (permalink / raw)
  To: Richard Acayan
  Cc: Rob Herring, linux-arm-msm, Krzysztof Kozlowski, Bjorn Andersson,
	Andy Gross, devicetree, Konrad Dybcio

On Mon, 19 Sep 2022 22:19:27 -0400, Richard Acayan wrote:
> 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>
> ---
>  .../devicetree/bindings/power/qcom,rpmpd.yaml          |  1 +
>  include/dt-bindings/power/qcom-rpmpd.h                 | 10 ++++++++++
>  2 files changed, 11 insertions(+)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


power-controller: 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dtb

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

* Re: [PATCH 1/2] dt-bindings: power: rpmpd: add sdm670 power domains
  2022-09-20  8:17   ` Krzysztof Kozlowski
@ 2022-09-20  8:48     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-20  8:48 UTC (permalink / raw)
  To: Richard Acayan
  Cc: Rob Herring, linux-arm-msm, Krzysztof Kozlowski, Bjorn Andersson,
	Andy Gross, devicetree, Konrad Dybcio

On 20/09/2022 10:17, Krzysztof Kozlowski wrote:
> On Mon, 19 Sep 2022 22:19:27 -0400, Richard Acayan wrote:
>> 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>
>> ---
>>  .../devicetree/bindings/power/qcom,rpmpd.yaml          |  1 +
>>  include/dt-bindings/power/qcom-rpmpd.h                 | 10 ++++++++++
>>  2 files changed, 11 insertions(+)
>>
> 
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
> 
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
> 
> Full log is available here: https://patchwork.ozlabs.org/patch/
> 
> 
> power-controller: 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
> 	arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dtb

This might be unrelated to your patch.

Best regards,
Krzysztof

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

* Re: [PATCH 1/2] dt-bindings: power: rpmpd: add sdm670 power domains
  2022-09-20  2:19 ` [PATCH 1/2] dt-bindings: power: rpmpd: add sdm670 power domains Richard Acayan
  2022-09-20  8:17   ` Krzysztof Kozlowski
@ 2022-09-20  8:48   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-20  8:48 UTC (permalink / raw)
  To: Richard Acayan, linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree

On 20/09/2022 04:19, Richard Acayan wrote:
> 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>


Best regards,
Krzysztof

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

* Re: [PATCH 2/2] soc: qcom: rpmhpd: add sdm670 power domains
  2022-09-20  2:19 ` [PATCH 2/2] soc: qcom: rpmhpd: " Richard Acayan
@ 2022-09-20 22:50   ` Konrad Dybcio
  0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2022-09-20 22:50 UTC (permalink / raw)
  To: Richard Acayan, linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	devicetree



On 20.09.2022 04:19, Richard Acayan wrote:
> 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>

Konrad

>  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},

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

end of thread, other threads:[~2022-09-20 22:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-20  2:19 [PATCH 0/2] SDM670 Power Domains Richard Acayan
2022-09-20  2:19 ` [PATCH 1/2] dt-bindings: power: rpmpd: add sdm670 power domains Richard Acayan
2022-09-20  8:17   ` Krzysztof Kozlowski
2022-09-20  8:48     ` Krzysztof Kozlowski
2022-09-20  8:48   ` Krzysztof Kozlowski
2022-09-20  2:19 ` [PATCH 2/2] soc: qcom: rpmhpd: " Richard Acayan
2022-09-20 22:50   ` Konrad Dybcio

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