linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains
@ 2022-07-16 19:32 Konrad Dybcio
  2022-07-16 19:32 ` [PATCH 2/2] soc: qcom: rpmpd: Add SM6375 support Konrad Dybcio
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Konrad Dybcio @ 2022-07-16 19:32 UTC (permalink / raw)
  To: ~postmarketos/upstreaming
  Cc: martin.botka, angelogioacchino.delregno, marijn.suijten,
	jamipkettunen, Konrad Dybcio, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Rajendra Nayak, linux-arm-msm,
	devicetree, linux-kernel

Add the bindings for SM6375 RPMPDs.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
 .../devicetree/bindings/power/qcom,rpmpd.yaml        |  1 +
 include/dt-bindings/power/qcom-rpmpd.h               | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
index ad77a6380f38..8b58cbc298a1 100644
--- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
+++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
@@ -39,6 +39,7 @@ properties:
       - qcom,sm6115-rpmpd
       - qcom,sm6125-rpmpd
       - qcom,sm6350-rpmhpd
+      - qcom,sm6375-rpmpd
       - qcom,sm8150-rpmhpd
       - qcom,sm8250-rpmhpd
       - qcom,sm8350-rpmhpd
diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
index 6cce5b7aa940..8b770bfcf46b 100644
--- a/include/dt-bindings/power/qcom-rpmpd.h
+++ b/include/dt-bindings/power/qcom-rpmpd.h
@@ -36,6 +36,18 @@
 #define SM6350_MSS	4
 #define SM6350_MX	5
 
+/* SM6350 Power Domain Indexes */
+#define SM6375_VDDCX		0
+#define SM6375_VDDCX_AO	1
+#define SM6375_VDDCX_VFL	2
+#define SM6375_VDDMX		3
+#define SM6375_VDDMX_AO	4
+#define SM6375_VDDMX_VFL	5
+#define SM6375_VDDGX		6
+#define SM6375_VDDGX_AO	7
+#define SM6375_VDD_LPI_CX	8
+#define SM6375_VDD_LPI_MX	9
+
 /* SM8150 Power Domain Indexes */
 #define SM8150_MSS	0
 #define SM8150_EBI	1
-- 
2.37.0


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

* [PATCH 2/2] soc: qcom: rpmpd: Add SM6375 support
  2022-07-16 19:32 [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains Konrad Dybcio
@ 2022-07-16 19:32 ` Konrad Dybcio
  2022-07-20 22:28 ` [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains Rob Herring
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2022-07-16 19:32 UTC (permalink / raw)
  To: ~postmarketos/upstreaming
  Cc: martin.botka, angelogioacchino.delregno, marijn.suijten,
	jamipkettunen, Konrad Dybcio, Andy Gross, Bjorn Andersson,
	linux-arm-msm, linux-kernel

Add support for RPMPDs on SM6375.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
 drivers/soc/qcom/rpmpd.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index 3b5b91621532..a6ea59193c42 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -29,6 +29,7 @@
 #define RPMPD_RWLM 0x6d6c7772
 #define RPMPD_RWSC 0x63737772
 #define RPMPD_RWSM 0x6d737772
+#define RPMPD_RWGX 0x78677772
 
 /* Operation Keys */
 #define KEY_CORNER		0x6e726f63 /* corn */
@@ -433,6 +434,26 @@ static const struct rpmpd_desc sm6125_desc = {
 	.max_state = RPM_SMD_LEVEL_BINNING,
 };
 
+DEFINE_RPMPD_PAIR(sm6375, vddgx, vddgx_ao, RWGX, LEVEL, 0);
+static struct rpmpd *sm6375_rpmpds[] = {
+	[SM6375_VDDCX] = &sm6125_vddcx,
+	[SM6375_VDDCX_AO] = &sm6125_vddcx_ao,
+	[SM6375_VDDCX_VFL] = &sm6125_vddcx_vfl,
+	[SM6375_VDDMX] = &sm6125_vddmx,
+	[SM6375_VDDMX_AO] = &sm6125_vddmx_ao,
+	[SM6375_VDDMX_VFL] = &sm6125_vddmx_vfl,
+	[SM6375_VDDGX] = &sm6375_vddgx,
+	[SM6375_VDDGX_AO] = &sm6375_vddgx_ao,
+	[SM6375_VDD_LPI_CX] = &sm6115_vdd_lpi_cx,
+	[SM6375_VDD_LPI_MX] = &sm6115_vdd_lpi_mx,
+};
+
+static const struct rpmpd_desc sm6375_desc = {
+	.rpmpds = sm6375_rpmpds,
+	.num_pds = ARRAY_SIZE(sm6375_rpmpds),
+	.max_state = RPM_SMD_LEVEL_TURBO_NO_CPR,
+};
+
 static struct rpmpd *qcm2290_rpmpds[] = {
 	[QCM2290_VDDCX] = &sm6115_vddcx,
 	[QCM2290_VDDCX_AO] = &sm6115_vddcx_ao,
@@ -465,6 +486,7 @@ static const struct of_device_id rpmpd_match_table[] = {
 	{ .compatible = "qcom,sdm660-rpmpd", .data = &sdm660_desc },
 	{ .compatible = "qcom,sm6115-rpmpd", .data = &sm6115_desc },
 	{ .compatible = "qcom,sm6125-rpmpd", .data = &sm6125_desc },
+	{ .compatible = "qcom,sm6375-rpmpd", .data = &sm6375_desc },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, rpmpd_match_table);
-- 
2.37.0


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

* Re: [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains
  2022-07-16 19:32 [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains Konrad Dybcio
  2022-07-16 19:32 ` [PATCH 2/2] soc: qcom: rpmpd: Add SM6375 support Konrad Dybcio
@ 2022-07-20 22:28 ` Rob Herring
  2022-07-21  9:59 ` Marijn Suijten
  2022-09-15  3:36 ` (subset) " Bjorn Andersson
  3 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2022-07-20 22:28 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Krzysztof Kozlowski, linux-arm-msm, Bjorn Andersson,
	Rajendra Nayak, martin.botka, Rob Herring, jamipkettunen,
	devicetree, marijn.suijten, Andy Gross, linux-kernel,
	angelogioacchino.delregno, ~postmarketos/upstreaming

On Sat, 16 Jul 2022 21:32:00 +0200, Konrad Dybcio wrote:
> Add the bindings for SM6375 RPMPDs.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> ---
>  .../devicetree/bindings/power/qcom,rpmpd.yaml        |  1 +
>  include/dt-bindings/power/qcom-rpmpd.h               | 12 ++++++++++++
>  2 files changed, 13 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains
  2022-07-16 19:32 [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains Konrad Dybcio
  2022-07-16 19:32 ` [PATCH 2/2] soc: qcom: rpmpd: Add SM6375 support Konrad Dybcio
  2022-07-20 22:28 ` [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains Rob Herring
@ 2022-07-21  9:59 ` Marijn Suijten
  2022-09-15  3:36 ` (subset) " Bjorn Andersson
  3 siblings, 0 replies; 6+ messages in thread
From: Marijn Suijten @ 2022-07-21  9:59 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: ~postmarketos/upstreaming, martin.botka,
	angelogioacchino.delregno, jamipkettunen, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Rajendra Nayak, linux-arm-msm, devicetree, linux-kernel

On 2022-07-16 21:32:00, Konrad Dybcio wrote:
> Add the bindings for SM6375 RPMPDs.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> ---
>  .../devicetree/bindings/power/qcom,rpmpd.yaml        |  1 +
>  include/dt-bindings/power/qcom-rpmpd.h               | 12 ++++++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> index ad77a6380f38..8b58cbc298a1 100644
> --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> @@ -39,6 +39,7 @@ properties:
>        - qcom,sm6115-rpmpd
>        - qcom,sm6125-rpmpd
>        - qcom,sm6350-rpmhpd
> +      - qcom,sm6375-rpmpd
>        - qcom,sm8150-rpmhpd
>        - qcom,sm8250-rpmhpd
>        - qcom,sm8350-rpmhpd
> diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
> index 6cce5b7aa940..8b770bfcf46b 100644
> --- a/include/dt-bindings/power/qcom-rpmpd.h
> +++ b/include/dt-bindings/power/qcom-rpmpd.h
> @@ -36,6 +36,18 @@
>  #define SM6350_MSS	4
>  #define SM6350_MX	5
>  
> +/* SM6350 Power Domain Indexes */
> +#define SM6375_VDDCX		0
> +#define SM6375_VDDCX_AO	1
> +#define SM6375_VDDCX_VFL	2
> +#define SM6375_VDDMX		3
> +#define SM6375_VDDMX_AO	4
> +#define SM6375_VDDMX_VFL	5
> +#define SM6375_VDDGX		6
> +#define SM6375_VDDGX_AO	7
> +#define SM6375_VDD_LPI_CX	8
> +#define SM6375_VDD_LPI_MX	9

Looking at the naming/pattern of these constants I think they should
reside near the bottom of this file with SM6125 and friends, rather than
here with SM8150 and friends' MX/CX (and no _VFL).

- Marijn

>  /* SM8150 Power Domain Indexes */
>  #define SM8150_MSS	0
>  #define SM8150_EBI	1
> -- 
> 2.37.0
> 

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

* Re: (subset) [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains
  2022-07-16 19:32 [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains Konrad Dybcio
                   ` (2 preceding siblings ...)
  2022-07-21  9:59 ` Marijn Suijten
@ 2022-09-15  3:36 ` Bjorn Andersson
  2022-09-16 22:04   ` Marijn Suijten
  3 siblings, 1 reply; 6+ messages in thread
From: Bjorn Andersson @ 2022-09-15  3:36 UTC (permalink / raw)
  To: ~postmarketos/upstreaming, konrad.dybcio
  Cc: agross, angelogioacchino.delregno, marijn.suijten, rnayak,
	jamipkettunen, krzysztof.kozlowski+dt, martin.botka, robh+dt,
	devicetree, linux-kernel, linux-arm-msm

On Sat, 16 Jul 2022 21:32:00 +0200, Konrad Dybcio wrote:
> Add the bindings for SM6375 RPMPDs.
> 
> 

Applied, thanks!

[1/2] dt-bindings: power: rpmpd: Add SM6375 power domains
      commit: 2d48e6ea3080ef7b2424dabfb500e29b030129d6
[2/2] soc: qcom: rpmpd: Add SM6375 support
      commit: df646a17f103c6f18ab85c5e3773763d18dc528b

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

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

* Re: (subset) [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains
  2022-09-15  3:36 ` (subset) " Bjorn Andersson
@ 2022-09-16 22:04   ` Marijn Suijten
  0 siblings, 0 replies; 6+ messages in thread
From: Marijn Suijten @ 2022-09-16 22:04 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: ~postmarketos/upstreaming, konrad.dybcio, agross,
	angelogioacchino.delregno, rnayak, jamipkettunen,
	krzysztof.kozlowski+dt, martin.botka, robh+dt, devicetree,
	linux-kernel, linux-arm-msm

On 2022-09-14 22:36:54, Bjorn Andersson wrote:
> On Sat, 16 Jul 2022 21:32:00 +0200, Konrad Dybcio wrote:
> > Add the bindings for SM6375 RPMPDs.
> > 
> > 
> 
> Applied, thanks!
> 
> [1/2] dt-bindings: power: rpmpd: Add SM6375 power domains
>       commit: 2d48e6ea3080ef7b2424dabfb500e29b030129d6

It looks like my request [1] to move these rpmpd definitions from the
rpm*H*pd section of this file down to sit with the rest of the rpmpd
definitions hasn't made its way through?

> [2/2] soc: qcom: rpmpd: Add SM6375 support
>       commit: df646a17f103c6f18ab85c5e3773763d18dc528b

[1]: https://lore.kernel.org/linux-arm-msm/20220721095946.wy3wbeib4ycwghzl@SoMainline.org/

- Marijn

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-16 19:32 [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains Konrad Dybcio
2022-07-16 19:32 ` [PATCH 2/2] soc: qcom: rpmpd: Add SM6375 support Konrad Dybcio
2022-07-20 22:28 ` [PATCH 1/2] dt-bindings: power: rpmpd: Add SM6375 power domains Rob Herring
2022-07-21  9:59 ` Marijn Suijten
2022-09-15  3:36 ` (subset) " Bjorn Andersson
2022-09-16 22:04   ` Marijn Suijten

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