linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: rpmpd: Add rpm power domains for msm8976
@ 2019-10-05 11:07 kholk11
  2019-10-07  5:53 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: kholk11 @ 2019-10-05 11:07 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: marijns95, agross, robh+dt, mark.rutland, devicetree,
	linus.walleij, bjorn.andersson, AngeloGioacchino Del Regno

From: "AngeloGioacchino Del Regno" <kholk11@gmail.com>

The MSM8956/76 SoCs have two main voltage-level power domains, VDD_CX
and VDD_MX, which also have their own voltage-floor-level (VFL)
corner.

Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
---
 .../devicetree/bindings/power/qcom,rpmpd.txt  |  1 +
 drivers/soc/qcom/rpmpd.c                      | 23 +++++++++++++++++++
 include/dt-bindings/power/qcom-rpmpd.h        |  8 +++++++
 3 files changed, 32 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
index eb35b22f9e23..bc75bf49cdae 100644
--- a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
+++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
@@ -5,6 +5,7 @@ which then translates it into a corresponding voltage on a rail
 
 Required Properties:
  - compatible: Should be one of the following
+	* qcom,msm8976-rpmpd: RPM Power domain for the msm8976 family of SoC
 	* qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC
 	* qcom,msm8998-rpmpd: RPM Power domain for the msm8998 family of SoC
 	* qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoC
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index 3c1a55cf25d6..2b1834c5609a 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -115,6 +115,28 @@ struct rpmpd_desc {
 
 static DEFINE_MUTEX(rpmpd_lock);
 
+/* msm8976 RPM Power Domains */
+DEFINE_RPMPD_PAIR(msm8976, vddcx, vddcx_ao, SMPA, LEVEL, 2);
+DEFINE_RPMPD_PAIR(msm8976, vddmx, vddmx_ao, SMPA, LEVEL, 6);
+
+DEFINE_RPMPD_VFL(msm8976, vddcx_vfl, RWSC, 2);
+DEFINE_RPMPD_VFL(msm8976, vddmx_vfl, RWSM, 6);
+
+static struct rpmpd *msm8976_rpmpds[] = {
+	[MSM8976_VDDCX] =	&msm8976_vddcx,
+	[MSM8976_VDDCX_AO] =	&msm8976_vddcx_ao,
+	[MSM8976_VDDCX_VFL] =	&msm8976_vddcx_vfl,
+	[MSM8976_VDDMX] =	&msm8976_vddmx,
+	[MSM8976_VDDMX_AO] =	&msm8976_vddmx_ao,
+	[MSM8976_VDDMX_VFL] =	&msm8976_vddmx_vfl,
+};
+
+static const struct rpmpd_desc msm8976_desc = {
+	.rpmpds = msm8976_rpmpds,
+	.num_pds = ARRAY_SIZE(msm8976_rpmpds),
+	.max_state = RPM_SMD_LEVEL_TURBO_HIGH,
+};
+
 /* msm8996 RPM Power domains */
 DEFINE_RPMPD_PAIR(msm8996, vddcx, vddcx_ao, SMPA, CORNER, 1);
 DEFINE_RPMPD_PAIR(msm8996, vddmx, vddmx_ao, SMPA, CORNER, 2);
@@ -198,6 +220,7 @@ static const struct rpmpd_desc qcs404_desc = {
 };
 
 static const struct of_device_id rpmpd_match_table[] = {
+	{ .compatible = "qcom,msm8976-rpmpd", .data = &msm8976_desc },
 	{ .compatible = "qcom,msm8996-rpmpd", .data = &msm8996_desc },
 	{ .compatible = "qcom,msm8998-rpmpd", .data = &msm8998_desc },
 	{ .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc },
diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
index 93e36d011527..83f8f5a8773b 100644
--- a/include/dt-bindings/power/qcom-rpmpd.h
+++ b/include/dt-bindings/power/qcom-rpmpd.h
@@ -27,6 +27,14 @@
 #define RPMH_REGULATOR_LEVEL_TURBO	384
 #define RPMH_REGULATOR_LEVEL_TURBO_L1	416
 
+/* MSM8976 Power Domain Indexes */
+#define MSM8976_VDDCX		0
+#define MSM8976_VDDCX_AO	1
+#define MSM8976_VDDCX_VFL	2
+#define MSM8976_VDDMX		3
+#define MSM8976_VDDMX_AO	4
+#define MSM8976_VDDMX_VFL	5
+
 /* MSM8996 Power Domain Indexes */
 #define MSM8996_VDDCX		0
 #define MSM8996_VDDCX_AO	1
-- 
2.21.0


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

* Re: [PATCH] soc: qcom: rpmpd: Add rpm power domains for msm8976
  2019-10-05 11:07 [PATCH] soc: qcom: rpmpd: Add rpm power domains for msm8976 kholk11
@ 2019-10-07  5:53 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2019-10-07  5:53 UTC (permalink / raw)
  To: kholk11
  Cc: linux-arm-msm, marijns95, agross, robh+dt, mark.rutland,
	devicetree, linus.walleij

On Sat 05 Oct 04:07 PDT 2019, kholk11@gmail.com wrote:

> From: "AngeloGioacchino Del Regno" <kholk11@gmail.com>
> 
> The MSM8956/76 SoCs have two main voltage-level power domains, VDD_CX
> and VDD_MX, which also have their own voltage-floor-level (VFL)
> corner.
> 
> Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
> ---

Thanks for respinning the patch. Please don't forget the "v2" in the
subject and list your changes here.

Applied.

Thanks,
Bjorn

>  .../devicetree/bindings/power/qcom,rpmpd.txt  |  1 +
>  drivers/soc/qcom/rpmpd.c                      | 23 +++++++++++++++++++
>  include/dt-bindings/power/qcom-rpmpd.h        |  8 +++++++
>  3 files changed, 32 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
> index eb35b22f9e23..bc75bf49cdae 100644
> --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
> @@ -5,6 +5,7 @@ which then translates it into a corresponding voltage on a rail
>  
>  Required Properties:
>   - compatible: Should be one of the following
> +	* qcom,msm8976-rpmpd: RPM Power domain for the msm8976 family of SoC
>  	* qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC
>  	* qcom,msm8998-rpmpd: RPM Power domain for the msm8998 family of SoC
>  	* qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoC
> diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
> index 3c1a55cf25d6..2b1834c5609a 100644
> --- a/drivers/soc/qcom/rpmpd.c
> +++ b/drivers/soc/qcom/rpmpd.c
> @@ -115,6 +115,28 @@ struct rpmpd_desc {
>  
>  static DEFINE_MUTEX(rpmpd_lock);
>  
> +/* msm8976 RPM Power Domains */
> +DEFINE_RPMPD_PAIR(msm8976, vddcx, vddcx_ao, SMPA, LEVEL, 2);
> +DEFINE_RPMPD_PAIR(msm8976, vddmx, vddmx_ao, SMPA, LEVEL, 6);
> +
> +DEFINE_RPMPD_VFL(msm8976, vddcx_vfl, RWSC, 2);
> +DEFINE_RPMPD_VFL(msm8976, vddmx_vfl, RWSM, 6);
> +
> +static struct rpmpd *msm8976_rpmpds[] = {
> +	[MSM8976_VDDCX] =	&msm8976_vddcx,
> +	[MSM8976_VDDCX_AO] =	&msm8976_vddcx_ao,
> +	[MSM8976_VDDCX_VFL] =	&msm8976_vddcx_vfl,
> +	[MSM8976_VDDMX] =	&msm8976_vddmx,
> +	[MSM8976_VDDMX_AO] =	&msm8976_vddmx_ao,
> +	[MSM8976_VDDMX_VFL] =	&msm8976_vddmx_vfl,
> +};
> +
> +static const struct rpmpd_desc msm8976_desc = {
> +	.rpmpds = msm8976_rpmpds,
> +	.num_pds = ARRAY_SIZE(msm8976_rpmpds),
> +	.max_state = RPM_SMD_LEVEL_TURBO_HIGH,
> +};
> +
>  /* msm8996 RPM Power domains */
>  DEFINE_RPMPD_PAIR(msm8996, vddcx, vddcx_ao, SMPA, CORNER, 1);
>  DEFINE_RPMPD_PAIR(msm8996, vddmx, vddmx_ao, SMPA, CORNER, 2);
> @@ -198,6 +220,7 @@ static const struct rpmpd_desc qcs404_desc = {
>  };
>  
>  static const struct of_device_id rpmpd_match_table[] = {
> +	{ .compatible = "qcom,msm8976-rpmpd", .data = &msm8976_desc },
>  	{ .compatible = "qcom,msm8996-rpmpd", .data = &msm8996_desc },
>  	{ .compatible = "qcom,msm8998-rpmpd", .data = &msm8998_desc },
>  	{ .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc },
> diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
> index 93e36d011527..83f8f5a8773b 100644
> --- a/include/dt-bindings/power/qcom-rpmpd.h
> +++ b/include/dt-bindings/power/qcom-rpmpd.h
> @@ -27,6 +27,14 @@
>  #define RPMH_REGULATOR_LEVEL_TURBO	384
>  #define RPMH_REGULATOR_LEVEL_TURBO_L1	416
>  
> +/* MSM8976 Power Domain Indexes */
> +#define MSM8976_VDDCX		0
> +#define MSM8976_VDDCX_AO	1
> +#define MSM8976_VDDCX_VFL	2
> +#define MSM8976_VDDMX		3
> +#define MSM8976_VDDMX_AO	4
> +#define MSM8976_VDDMX_VFL	5
> +
>  /* MSM8996 Power Domain Indexes */
>  #define MSM8996_VDDCX		0
>  #define MSM8996_VDDCX_AO	1
> -- 
> 2.21.0
> 

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

end of thread, other threads:[~2019-10-07  5:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-05 11:07 [PATCH] soc: qcom: rpmpd: Add rpm power domains for msm8976 kholk11
2019-10-07  5:53 ` 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).