devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] RPMh Support for PM660 and PM660L
@ 2022-09-20 22:33 Richard Acayan
  2022-09-20 22:33 ` [PATCH v2 1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics Richard Acayan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Richard Acayan @ 2022-09-20 22:33 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, devicetree,
	Richard Acayan

Changes since v1:
 - properly label

This patch series introduces support for the PM660 and PM660L on the RPMh
mailbox. My initial Pixel 3a dts is not very minimal but I think that this
series is trivial enough that it can be activated in a single commit.

 .../bindings/regulator/qcom,rpmh-regulator.yaml    | 36 +++++++++++++++
 drivers/regulator/qcom-rpmh-regulator.c            | 54 ++++++++++++++++++++++
 2 files changed, 90 insertions(+)



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

* [PATCH v2 1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics
  2022-09-20 22:33 [PATCH v2 0/2] RPMh Support for PM660 and PM660L Richard Acayan
@ 2022-09-20 22:33 ` Richard Acayan
  2022-09-21  7:38   ` Krzysztof Kozlowski
  2022-09-23 13:14   ` Mark Brown
  2022-09-20 22:33 ` [PATCH v2 2/2] regulator: qcom-rpmh: " Richard Acayan
  2022-09-23 17:21 ` [PATCH v2 0/2] RPMh Support for PM660 and PM660L Mark Brown
  2 siblings, 2 replies; 7+ messages in thread
From: Richard Acayan @ 2022-09-20 22:33 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, devicetree,
	Richard Acayan

The SDM670 uses RPMh for managing the PM660 and PM660L. Document RPMh
support for the PMIC.

Link: https://android.googlesource.com/kernel/msm/+/58064f13c0a436a82c35f2e3b5a122d874ae5846%5E%21/#F0
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
---
 .../regulator/qcom,rpmh-regulator.yaml        | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
index 92ff4d59ba20..90c3bda31c23 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
@@ -37,6 +37,8 @@ description: |
       For PM6150, smps1 - smps5, ldo1 - ldo19
       For PM6150L, smps1 - smps8, ldo1 - ldo11, bob
       For PM6350, smps1 - smps5, ldo1 - ldo22
+      For PM660, smps1 - smps6, ldo1 - ldo3, ldo5 - ldo19
+      For PM660L, smps1 - smps3, smps5, ldo1 - ldo8, bob
       For PM7325, smps1 - smps8, ldo1 - ldo19
       For PM8005, smps1 - smps4
       For PM8009, smps1 - smps2, ldo1 - ldo7
@@ -57,6 +59,8 @@ properties:
       - qcom,pm6150-rpmh-regulators
       - qcom,pm6150l-rpmh-regulators
       - qcom,pm6350-rpmh-regulators
+      - qcom,pm660-rpmh-regulators
+      - qcom,pm660l-rpmh-regulators
       - qcom,pm7325-rpmh-regulators
       - qcom,pm8005-rpmh-regulators
       - qcom,pm8009-rpmh-regulators
@@ -148,6 +152,38 @@ allOf:
       patternProperties:
         "^vdd-s[1-8]-supply$": true
 
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,pm660-rpmh-regulators
+    then:
+      properties:
+        vdd-l1-l6-l7-supply: true
+        vdd-l2-l3-supply: true
+        vdd-l5-supply: true
+        vdd-l8-l9-l10-l11-l12-l13-l14-supply: true
+        vdd-l15-l16-l17-l18-l19-supply: true
+      patternProperties:
+        "^vdd-s[1-6]-supply$": true
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,pm660l-rpmh-regulators
+    then:
+      properties:
+        vdd-bob-supply:
+          description: BOB regulator parent supply phandle.
+        vdd-l1-l9-l10-supply: true
+        vdd-l2-supply: true
+        vdd-l3-l5-l7-l8-supply: true
+        vdd-l4-l6-supply: true
+        vdd-s3-s4-supply: true
+      patternProperties:
+        "^vdd-s[125]-supply$": true
+
   - if:
       properties:
         compatible:
-- 
2.37.3


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

* [PATCH v2 2/2] regulator: qcom-rpmh: add pm660 and pm660l pmics
  2022-09-20 22:33 [PATCH v2 0/2] RPMh Support for PM660 and PM660L Richard Acayan
  2022-09-20 22:33 ` [PATCH v2 1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics Richard Acayan
@ 2022-09-20 22:33 ` Richard Acayan
  2022-09-21  7:38   ` Krzysztof Kozlowski
  2022-09-23 17:21 ` [PATCH v2 0/2] RPMh Support for PM660 and PM660L Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Richard Acayan @ 2022-09-20 22:33 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, devicetree,
	Richard Acayan

The SDM630 and SDM660 both use RPM (not RPMh) for managing the PM660 and
PM660L. The SDM670 uses RPMh to manage them as PMIC 4s. To support the
SDM670, add the PM660 and PM660L to the RPMh regulator driver.

Link: https://android.googlesource.com/kernel/msm/+/58064f13c0a436a82c35f2e3b5a122d874ae5846%5E%21/#F0
Link: https://android.googlesource.com/kernel/msm/+/f676d3d24f9d802bfe63369167c4a8cc162b8950%5E%21/#F3
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
---
 drivers/regulator/qcom-rpmh-regulator.c | 54 +++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index b2debde79361..4158ff126a67 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -1198,6 +1198,52 @@ static const struct rpmh_vreg_init_data pmr735a_vreg_data[] = {
 	{}
 };
 
+static const struct rpmh_vreg_init_data pm660_vreg_data[] = {
+	RPMH_VREG("smps1",  "smp%s1",  &pmic4_ftsmps426, "vdd-s1"),
+	RPMH_VREG("smps2",  "smp%s2",  &pmic4_ftsmps426, "vdd-s2"),
+	RPMH_VREG("smps3",  "smp%s3",  &pmic4_ftsmps426, "vdd-s3"),
+	RPMH_VREG("smps4",  "smp%s4",  &pmic4_hfsmps3,   "vdd-s4"),
+	RPMH_VREG("smps5",  "smp%s5",  &pmic4_hfsmps3,   "vdd-s5"),
+	RPMH_VREG("smps6",  "smp%s6",  &pmic4_hfsmps3,   "vdd-s6"),
+	RPMH_VREG("ldo1",   "ldo%s1",  &pmic4_nldo,      "vdd-l1-l6-l7"),
+	RPMH_VREG("ldo2",   "ldo%s2",  &pmic4_nldo,      "vdd-l2-l3"),
+	RPMH_VREG("ldo3",   "ldo%s3",  &pmic4_nldo,      "vdd-l2-l3"),
+	/* ldo4 is inaccessible on PM660 */
+	RPMH_VREG("ldo5",   "ldo%s5",  &pmic4_nldo,      "vdd-l5"),
+	RPMH_VREG("ldo6",   "ldo%s6",  &pmic4_nldo,      "vdd-l1-l6-l7"),
+	RPMH_VREG("ldo7",   "ldo%s7",  &pmic4_nldo,      "vdd-l1-l6-l7"),
+	RPMH_VREG("ldo8",   "ldo%s8",  &pmic4_pldo_lv,   "vdd-l8-l9-l10-l11-l12-l13-l14"),
+	RPMH_VREG("ldo9",   "ldo%s9",  &pmic4_pldo_lv,   "vdd-l8-l9-l10-l11-l12-l13-l14"),
+	RPMH_VREG("ldo10",  "ldo%s10", &pmic4_pldo_lv,   "vdd-l8-l9-l10-l11-l12-l13-l14"),
+	RPMH_VREG("ldo11",  "ldo%s11", &pmic4_pldo_lv,   "vdd-l8-l9-l10-l11-l12-l13-l14"),
+	RPMH_VREG("ldo12",  "ldo%s12", &pmic4_pldo_lv,   "vdd-l8-l9-l10-l11-l12-l13-l14"),
+	RPMH_VREG("ldo13",  "ldo%s13", &pmic4_pldo_lv,   "vdd-l8-l9-l10-l11-l12-l13-l14"),
+	RPMH_VREG("ldo14",  "ldo%s14", &pmic4_pldo_lv,   "vdd-l8-l9-l10-l11-l12-l13-l14"),
+	RPMH_VREG("ldo15",  "ldo%s15", &pmic4_pldo,      "vdd-l15-l16-l17-l18-l19"),
+	RPMH_VREG("ldo16",  "ldo%s16", &pmic4_pldo,      "vdd-l15-l16-l17-l18-l19"),
+	RPMH_VREG("ldo17",  "ldo%s17", &pmic4_pldo,      "vdd-l15-l16-l17-l18-l19"),
+	RPMH_VREG("ldo18",  "ldo%s18", &pmic4_pldo,      "vdd-l15-l16-l17-l18-l19"),
+	RPMH_VREG("ldo19",  "ldo%s19", &pmic4_pldo,      "vdd-l15-l16-l17-l18-l19"),
+	{}
+};
+
+static const struct rpmh_vreg_init_data pm660l_vreg_data[] = {
+	RPMH_VREG("smps1",  "smp%s1",  &pmic4_ftsmps426, "vdd-s1"),
+	RPMH_VREG("smps2",  "smp%s2",  &pmic4_ftsmps426, "vdd-s2"),
+	RPMH_VREG("smps3",  "smp%s3",  &pmic4_ftsmps426, "vdd-s3-s4"),
+	RPMH_VREG("smps5",  "smp%s5",  &pmic4_ftsmps426, "vdd-s5"),
+	RPMH_VREG("ldo1",   "ldo%s1",  &pmic4_nldo,      "vdd-l1-l9-l10"),
+	RPMH_VREG("ldo2",   "ldo%s2",  &pmic4_pldo,      "vdd-l2"),
+	RPMH_VREG("ldo3",   "ldo%s3",  &pmic4_pldo,      "vdd-l3-l5-l7-l8"),
+	RPMH_VREG("ldo4",   "ldo%s4",  &pmic4_pldo,      "vdd-l4-l6"),
+	RPMH_VREG("ldo5",   "ldo%s5",  &pmic4_pldo,      "vdd-l3-l5-l7-l8"),
+	RPMH_VREG("ldo6",   "ldo%s6",  &pmic4_pldo,      "vdd-l4-l6"),
+	RPMH_VREG("ldo7",   "ldo%s7",  &pmic4_pldo,      "vdd-l3-l5-l7-l8"),
+	RPMH_VREG("ldo8",   "ldo%s8",  &pmic4_pldo,      "vdd-l3-l5-l7-l8"),
+	RPMH_VREG("bob",    "bob%s1",  &pmic4_bob,       "vdd-bob"),
+	{}
+};
+
 static int rpmh_regulator_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -1320,6 +1366,14 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = {
 		.compatible = "qcom,pmr735a-rpmh-regulators",
 		.data = pmr735a_vreg_data,
 	},
+	{
+		.compatible = "qcom,pm660-rpmh-regulators",
+		.data = pm660_vreg_data,
+	},
+	{
+		.compatible = "qcom,pm660l-rpmh-regulators",
+		.data = pm660l_vreg_data,
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table);
-- 
2.37.3


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

* Re: [PATCH v2 1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics
  2022-09-20 22:33 ` [PATCH v2 1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics Richard Acayan
@ 2022-09-21  7:38   ` Krzysztof Kozlowski
  2022-09-23 13:14   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-21  7:38 UTC (permalink / raw)
  To: Richard Acayan, linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, devicetree

On 21/09/2022 00:33, Richard Acayan wrote:
> The SDM670 uses RPMh for managing the PM660 and PM660L. Document RPMh
> support for the PMIC.
> 
> Link: https://android.googlesource.com/kernel/msm/+/58064f13c0a436a82c35f2e3b5a122d874ae5846%5E%21/#F0
> Signed-off-by: Richard Acayan <mailingradian@gmail.com>
> ---


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


Best regards,
Krzysztof

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

* Re: [PATCH v2 2/2] regulator: qcom-rpmh: add pm660 and pm660l pmics
  2022-09-20 22:33 ` [PATCH v2 2/2] regulator: qcom-rpmh: " Richard Acayan
@ 2022-09-21  7:38   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-21  7:38 UTC (permalink / raw)
  To: Richard Acayan, linux-arm-msm
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, devicetree

On 21/09/2022 00:33, Richard Acayan wrote:
> The SDM630 and SDM660 both use RPM (not RPMh) for managing the PM660 and
> PM660L. The SDM670 uses RPMh to manage them as PMIC 4s. To support the
> SDM670, add the PM660 and PM660L to the RPMh regulator driver.
> 
> Link: https://android.googlesource.com/kernel/msm/+/58064f13c0a436a82c35f2e3b5a122d874ae5846%5E%21/#F0
> Link: https://android.googlesource.com/kernel/msm/+/f676d3d24f9d802bfe63369167c4a8cc162b8950%5E%21/#F3
> Signed-off-by: Richard Acayan <mailingradian@gmail.com>
> ---


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


Best regards,
Krzysztof

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

* Re: [PATCH v2 1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics
  2022-09-20 22:33 ` [PATCH v2 1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics Richard Acayan
  2022-09-21  7:38   ` Krzysztof Kozlowski
@ 2022-09-23 13:14   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2022-09-23 13:14 UTC (permalink / raw)
  To: Richard Acayan
  Cc: linux-arm-msm, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Liam Girdwood, Rob Herring, Krzysztof Kozlowski, devicetree

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

On Tue, Sep 20, 2022 at 06:33:30PM -0400, Richard Acayan wrote:
> The SDM670 uses RPMh for managing the PM660 and PM660L. Document RPMh
> support for the PMIC.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

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

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

* Re: [PATCH v2 0/2] RPMh Support for PM660 and PM660L
  2022-09-20 22:33 [PATCH v2 0/2] RPMh Support for PM660 and PM660L Richard Acayan
  2022-09-20 22:33 ` [PATCH v2 1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics Richard Acayan
  2022-09-20 22:33 ` [PATCH v2 2/2] regulator: qcom-rpmh: " Richard Acayan
@ 2022-09-23 17:21 ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2022-09-23 17:21 UTC (permalink / raw)
  To: linux-arm-msm, Richard Acayan
  Cc: Konrad Dybcio, Krzysztof Kozlowski, Andy Gross, devicetree,
	Bjorn Andersson, Liam Girdwood, Rob Herring

On Tue, 20 Sep 2022 18:33:29 -0400, Richard Acayan wrote:
> Changes since v1:
>  - properly label
> 
> This patch series introduces support for the PM660 and PM660L on the RPMh
> mailbox. My initial Pixel 3a dts is not very minimal but I think that this
> series is trivial enough that it can be activated in a single commit.
> 
> [...]

Applied to

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

Thanks!

[1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics
      commit: 21c93a95553d0a07091ff9894f09f5bffbfd8c8a
[2/2] regulator: qcom-rpmh: add pm660 and pm660l pmics
      commit: 911ce7cf72d9c1066a52928bffedaa103290db9e

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

end of thread, other threads:[~2022-09-23 17:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-20 22:33 [PATCH v2 0/2] RPMh Support for PM660 and PM660L Richard Acayan
2022-09-20 22:33 ` [PATCH v2 1/2] dt-bindings: regulator: qcom,rpmh: add pm660 and pm660l pmics Richard Acayan
2022-09-21  7:38   ` Krzysztof Kozlowski
2022-09-23 13:14   ` Mark Brown
2022-09-20 22:33 ` [PATCH v2 2/2] regulator: qcom-rpmh: " Richard Acayan
2022-09-21  7:38   ` Krzysztof Kozlowski
2022-09-23 17:21 ` [PATCH v2 0/2] RPMh Support for PM660 and PM660L 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).