linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a
@ 2022-11-09 11:08 Konrad Dybcio
  2022-11-09 11:08 ` [PATCH 2/2] regulator: qcom_smd: Add PMR735a regulators Konrad Dybcio
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Konrad Dybcio @ 2022-11-09 11:08 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: patches, Konrad Dybcio, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, linux-kernel, devicetree

PMR735a also appears to be bundled with some SMD RPM SoCs.
Document it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
index 961eed51912c..8c45f53212b1 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
@@ -71,6 +71,8 @@ description:
 
   For pmi8998, bob
 
+  For pmr735a, s1, s2, s3, l1, l2, l3, l4, l5, l6, l7
+
   For pms405, s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
   l12, l13
 
@@ -98,6 +100,7 @@ properties:
       - qcom,rpm-pma8084-regulators
       - qcom,rpm-pmi8994-regulators
       - qcom,rpm-pmi8998-regulators
+      - qcom,rpm-pmr735a-regulators
       - qcom,rpm-pms405-regulators
 
 patternProperties:
-- 
2.38.1


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

* [PATCH 2/2] regulator: qcom_smd: Add PMR735a regulators
  2022-11-09 11:08 [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a Konrad Dybcio
@ 2022-11-09 11:08 ` Konrad Dybcio
  2022-11-10  3:48   ` Bjorn Andersson
  2022-11-09 13:50 ` [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a Krzysztof Kozlowski
  2022-11-10 11:03 ` Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2022-11-09 11:08 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: patches, Konrad Dybcio, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, linux-kernel, devicetree

PMR735a is already supported in the RPMH regulator driver, but
there are cases where it's bundled with SMD RPM SoCs. Port it over
to qcom_smd-regulator to enable usage in such cases.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/regulator/qcom_smd-regulator.c | 24 ++++++++++++++++++++++++
 include/linux/soc/qcom/smd-rpm.h       |  2 ++
 2 files changed, 26 insertions(+)

diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
index f98168d58dce..9eaae13fd385 100644
--- a/drivers/regulator/qcom_smd-regulator.c
+++ b/drivers/regulator/qcom_smd-regulator.c
@@ -677,6 +677,15 @@ static const struct regulator_desc pm6125_ftsmps = {
 	.ops = &rpm_smps_ldo_ops,
 };
 
+static const struct regulator_desc pmic5_ftsmps520 = {
+	.linear_ranges = (struct linear_range[]) {
+		REGULATOR_LINEAR_RANGE(300000, 0, 263, 4000),
+	},
+	.n_linear_ranges = 1,
+	.n_voltages = 264,
+	.ops = &rpm_smps_ldo_ops,
+};
+
 static const struct regulator_desc pms405_hfsmps3 = {
 	.linear_ranges = (struct linear_range[]) {
 		REGULATOR_LINEAR_RANGE(320000, 0, 215, 8000),
@@ -1265,6 +1274,20 @@ static const struct rpm_regulator_data rpm_pmi8998_regulators[] = {
 	{}
 };
 
+static const struct rpm_regulator_data rpm_pmr735a_regulators[] = {
+	{ "s1", QCOM_SMD_RPM_SMPE, 1, &pmic5_ftsmps520, "vdd_s1"},
+	{ "s2", QCOM_SMD_RPM_SMPE, 2, &pmic5_ftsmps520, "vdd_s2"},
+	{ "s3", QCOM_SMD_RPM_SMPE, 3, &pms405_hfsmps3, "vdd_s3"},
+	{ "l1", QCOM_SMD_RPM_LDOE, 1, &pm660_nldo660, "vdd_l1_l2"},
+	{ "l2", QCOM_SMD_RPM_LDOE, 2, &pm660_nldo660, "vdd_l1_l2"},
+	{ "l3", QCOM_SMD_RPM_LDOE, 3, &pm660_nldo660, "vdd_l3"},
+	{ "l4", QCOM_SMD_RPM_LDOE, 4, &pm660_ht_lvpldo, "vdd_l4"},
+	{ "l5", QCOM_SMD_RPM_LDOE, 5, &pm660_nldo660, "vdd_l5_l6"},
+	{ "l6", QCOM_SMD_RPM_LDOE, 6, &pm660_nldo660, "vdd_l5_l6"},
+	{ "l7", QCOM_SMD_RPM_LDOE, 7, &pm660_pldo660, "vdd_l7_bob"},
+	{}
+};
+
 static const struct rpm_regulator_data rpm_pms405_regulators[] = {
 	{ "s1", QCOM_SMD_RPM_SMPA, 1, &pms405_hfsmps3, "vdd_s1" },
 	{ "s2", QCOM_SMD_RPM_SMPA, 2, &pms405_hfsmps3, "vdd_s2" },
@@ -1305,6 +1328,7 @@ static const struct of_device_id rpm_of_match[] = {
 	{ .compatible = "qcom,rpm-pma8084-regulators", .data = &rpm_pma8084_regulators },
 	{ .compatible = "qcom,rpm-pmi8994-regulators", .data = &rpm_pmi8994_regulators },
 	{ .compatible = "qcom,rpm-pmi8998-regulators", .data = &rpm_pmi8998_regulators },
+	{ .compatible = "qcom,rpm-pmr735a-regulators", .data = &rpm_pmr735a_regulators },
 	{ .compatible = "qcom,rpm-pms405-regulators", .data = &rpm_pms405_regulators },
 	{}
 };
diff --git a/include/linux/soc/qcom/smd-rpm.h b/include/linux/soc/qcom/smd-rpm.h
index 3ab8c07f71c0..62de54992e49 100644
--- a/include/linux/soc/qcom/smd-rpm.h
+++ b/include/linux/soc/qcom/smd-rpm.h
@@ -19,6 +19,7 @@ struct qcom_smd_rpm;
 #define QCOM_SMD_RPM_CLK_BUF_A	0x616B6C63
 #define QCOM_SMD_RPM_LDOA	0x616f646c
 #define QCOM_SMD_RPM_LDOB	0x626F646C
+#define QCOM_SMD_RPM_LDOE	0x656f646c
 #define QCOM_SMD_RPM_RWCX	0x78637772
 #define QCOM_SMD_RPM_RWMX	0x786d7772
 #define QCOM_SMD_RPM_RWLC	0x636c7772
@@ -32,6 +33,7 @@ struct qcom_smd_rpm;
 #define QCOM_SMD_RPM_QUP_CLK	0x707571
 #define QCOM_SMD_RPM_SMPA	0x61706d73
 #define QCOM_SMD_RPM_SMPB	0x62706d73
+#define QCOM_SMD_RPM_SMPE	0x65706d73
 #define QCOM_SMD_RPM_SPDM	0x63707362
 #define QCOM_SMD_RPM_VSA	0x00617376
 #define QCOM_SMD_RPM_MMAXI_CLK	0x69786d6d
-- 
2.38.1


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

* Re: [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a
  2022-11-09 11:08 [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a Konrad Dybcio
  2022-11-09 11:08 ` [PATCH 2/2] regulator: qcom_smd: Add PMR735a regulators Konrad Dybcio
@ 2022-11-09 13:50 ` Krzysztof Kozlowski
  2022-11-10 11:03 ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-09 13:50 UTC (permalink / raw)
  To: Konrad Dybcio, linux-arm-msm, andersson, agross
  Cc: patches, Konrad Dybcio, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, linux-kernel, devicetree

On 09/11/2022 12:08, Konrad Dybcio wrote:
> PMR735a also appears to be bundled with some SMD RPM SoCs.
> Document it.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH 2/2] regulator: qcom_smd: Add PMR735a regulators
  2022-11-09 11:08 ` [PATCH 2/2] regulator: qcom_smd: Add PMR735a regulators Konrad Dybcio
@ 2022-11-10  3:48   ` Bjorn Andersson
  0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2022-11-10  3:48 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: linux-arm-msm, agross, krzysztof.kozlowski, patches,
	Konrad Dybcio, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, linux-kernel, devicetree

On Wed, Nov 09, 2022 at 12:08:46PM +0100, Konrad Dybcio wrote:
> PMR735a is already supported in the RPMH regulator driver, but
> there are cases where it's bundled with SMD RPM SoCs. Port it over
> to qcom_smd-regulator to enable usage in such cases.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  drivers/regulator/qcom_smd-regulator.c | 24 ++++++++++++++++++++++++
>  include/linux/soc/qcom/smd-rpm.h       |  2 ++
>  2 files changed, 26 insertions(+)
> 
> diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
> index f98168d58dce..9eaae13fd385 100644
> --- a/drivers/regulator/qcom_smd-regulator.c
> +++ b/drivers/regulator/qcom_smd-regulator.c
> @@ -677,6 +677,15 @@ static const struct regulator_desc pm6125_ftsmps = {
>  	.ops = &rpm_smps_ldo_ops,
>  };
>  
> +static const struct regulator_desc pmic5_ftsmps520 = {
> +	.linear_ranges = (struct linear_range[]) {
> +		REGULATOR_LINEAR_RANGE(300000, 0, 263, 4000),
> +	},
> +	.n_linear_ranges = 1,
> +	.n_voltages = 264,
> +	.ops = &rpm_smps_ldo_ops,
> +};
> +
>  static const struct regulator_desc pms405_hfsmps3 = {
>  	.linear_ranges = (struct linear_range[]) {
>  		REGULATOR_LINEAR_RANGE(320000, 0, 215, 8000),
> @@ -1265,6 +1274,20 @@ static const struct rpm_regulator_data rpm_pmi8998_regulators[] = {
>  	{}
>  };
>  
> +static const struct rpm_regulator_data rpm_pmr735a_regulators[] = {
> +	{ "s1", QCOM_SMD_RPM_SMPE, 1, &pmic5_ftsmps520, "vdd_s1"},
> +	{ "s2", QCOM_SMD_RPM_SMPE, 2, &pmic5_ftsmps520, "vdd_s2"},
> +	{ "s3", QCOM_SMD_RPM_SMPE, 3, &pms405_hfsmps3, "vdd_s3"},

This should be a hfsmps515 instead, which has a wider voltage range.
Please pick the range from the rpmh regulator driver and add that as
well.

Regards,
Bjorn

> +	{ "l1", QCOM_SMD_RPM_LDOE, 1, &pm660_nldo660, "vdd_l1_l2"},
> +	{ "l2", QCOM_SMD_RPM_LDOE, 2, &pm660_nldo660, "vdd_l1_l2"},
> +	{ "l3", QCOM_SMD_RPM_LDOE, 3, &pm660_nldo660, "vdd_l3"},
> +	{ "l4", QCOM_SMD_RPM_LDOE, 4, &pm660_ht_lvpldo, "vdd_l4"},
> +	{ "l5", QCOM_SMD_RPM_LDOE, 5, &pm660_nldo660, "vdd_l5_l6"},
> +	{ "l6", QCOM_SMD_RPM_LDOE, 6, &pm660_nldo660, "vdd_l5_l6"},
> +	{ "l7", QCOM_SMD_RPM_LDOE, 7, &pm660_pldo660, "vdd_l7_bob"},
> +	{}
> +};
> +
>  static const struct rpm_regulator_data rpm_pms405_regulators[] = {
>  	{ "s1", QCOM_SMD_RPM_SMPA, 1, &pms405_hfsmps3, "vdd_s1" },
>  	{ "s2", QCOM_SMD_RPM_SMPA, 2, &pms405_hfsmps3, "vdd_s2" },
> @@ -1305,6 +1328,7 @@ static const struct of_device_id rpm_of_match[] = {
>  	{ .compatible = "qcom,rpm-pma8084-regulators", .data = &rpm_pma8084_regulators },
>  	{ .compatible = "qcom,rpm-pmi8994-regulators", .data = &rpm_pmi8994_regulators },
>  	{ .compatible = "qcom,rpm-pmi8998-regulators", .data = &rpm_pmi8998_regulators },
> +	{ .compatible = "qcom,rpm-pmr735a-regulators", .data = &rpm_pmr735a_regulators },
>  	{ .compatible = "qcom,rpm-pms405-regulators", .data = &rpm_pms405_regulators },
>  	{}
>  };
> diff --git a/include/linux/soc/qcom/smd-rpm.h b/include/linux/soc/qcom/smd-rpm.h
> index 3ab8c07f71c0..62de54992e49 100644
> --- a/include/linux/soc/qcom/smd-rpm.h
> +++ b/include/linux/soc/qcom/smd-rpm.h
> @@ -19,6 +19,7 @@ struct qcom_smd_rpm;
>  #define QCOM_SMD_RPM_CLK_BUF_A	0x616B6C63
>  #define QCOM_SMD_RPM_LDOA	0x616f646c
>  #define QCOM_SMD_RPM_LDOB	0x626F646C
> +#define QCOM_SMD_RPM_LDOE	0x656f646c
>  #define QCOM_SMD_RPM_RWCX	0x78637772
>  #define QCOM_SMD_RPM_RWMX	0x786d7772
>  #define QCOM_SMD_RPM_RWLC	0x636c7772
> @@ -32,6 +33,7 @@ struct qcom_smd_rpm;
>  #define QCOM_SMD_RPM_QUP_CLK	0x707571
>  #define QCOM_SMD_RPM_SMPA	0x61706d73
>  #define QCOM_SMD_RPM_SMPB	0x62706d73
> +#define QCOM_SMD_RPM_SMPE	0x65706d73
>  #define QCOM_SMD_RPM_SPDM	0x63707362
>  #define QCOM_SMD_RPM_VSA	0x00617376
>  #define QCOM_SMD_RPM_MMAXI_CLK	0x69786d6d
> -- 
> 2.38.1
> 

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

* Re: [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a
  2022-11-09 11:08 [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a Konrad Dybcio
  2022-11-09 11:08 ` [PATCH 2/2] regulator: qcom_smd: Add PMR735a regulators Konrad Dybcio
  2022-11-09 13:50 ` [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a Krzysztof Kozlowski
@ 2022-11-10 11:03 ` Mark Brown
  2022-11-10 11:09   ` Konrad Dybcio
  2 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2022-11-10 11:03 UTC (permalink / raw)
  To: Konrad Dybcio, andersson, linux-arm-msm, krzysztof.kozlowski, agross
  Cc: Liam Girdwood, devicetree, Krzysztof Kozlowski, linux-kernel,
	patches, Rob Herring, Konrad Dybcio

On Wed, 9 Nov 2022 12:08:45 +0100, Konrad Dybcio wrote:
> PMR735a also appears to be bundled with some SMD RPM SoCs.
> Document it.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/2] dt-bindings: regulator: qcom,smd: Document PMR735a
      commit: 9263c69696c8c75ef97ebf57cb4f308c4c2420ea
[2/2] regulator: qcom_smd: Add PMR735a regulators
      commit: 0cda8c43aa2477b7a9f9bed0adff2f34d3afc143

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

* Re: [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a
  2022-11-10 11:03 ` Mark Brown
@ 2022-11-10 11:09   ` Konrad Dybcio
  2022-11-10 12:00     ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2022-11-10 11:09 UTC (permalink / raw)
  To: Mark Brown, Konrad Dybcio, andersson, linux-arm-msm,
	krzysztof.kozlowski, agross
  Cc: Liam Girdwood, devicetree, Krzysztof Kozlowski, linux-kernel,
	patches, Rob Herring



On 10/11/2022 12:03, Mark Brown wrote:
> On Wed, 9 Nov 2022 12:08:45 +0100, Konrad Dybcio wrote:
>> PMR735a also appears to be bundled with some SMD RPM SoCs.
>> Document it.
>>
>>
> 
> Applied to
> 
>     https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
> 
> Thanks!
Please apply v2 instead:

https://lore.kernel.org/linux-arm-msm/20221110091736.3344-2-konrad.dybcio@linaro.org/T/#u

Konrad
> 
> [1/2] dt-bindings: regulator: qcom,smd: Document PMR735a
>        commit: 9263c69696c8c75ef97ebf57cb4f308c4c2420ea
> [2/2] regulator: qcom_smd: Add PMR735a regulators
>        commit: 0cda8c43aa2477b7a9f9bed0adff2f34d3afc143
> 
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
> 
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
> 
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
> 
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
> 
> Thanks,
> Mark

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

* Re: [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a
  2022-11-10 11:09   ` Konrad Dybcio
@ 2022-11-10 12:00     ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2022-11-10 12:00 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: andersson, linux-arm-msm, krzysztof.kozlowski, agross,
	Liam Girdwood, devicetree, Krzysztof Kozlowski, linux-kernel,
	patches, Rob Herring

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

On Thu, Nov 10, 2022 at 12:09:10PM +0100, Konrad Dybcio wrote:
> On 10/11/2022 12:03, Mark Brown wrote:

> >     https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

> Please apply v2 instead:

> https://lore.kernel.org/linux-arm-msm/20221110091736.3344-2-konrad.dybcio@linaro.org/T/#u

As the mail you are replying to says:

> > If any updates are required or you are submitting further changes they
> > should be sent as incremental updates against current git, existing
> > patches will not be replaced.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09 11:08 [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a Konrad Dybcio
2022-11-09 11:08 ` [PATCH 2/2] regulator: qcom_smd: Add PMR735a regulators Konrad Dybcio
2022-11-10  3:48   ` Bjorn Andersson
2022-11-09 13:50 ` [PATCH 1/2] dt-bindings: regulator: qcom,smd: Document PMR735a Krzysztof Kozlowski
2022-11-10 11:03 ` Mark Brown
2022-11-10 11:09   ` Konrad Dybcio
2022-11-10 12:00     ` Mark Brown

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