Commit d9270292 authored by Mark Brown's avatar Mark Brown

PM6125 regulator support

Merge series from Iskren Chernev <iskren.chernev@gmail.com>:

This patch series adds SPMI and SMD regulator support for the PM6125 found on
SM4250/SM6115 SoCs from QCom.

This code has been tested on:
* OnePlus Nord N100 (oneplus,billie2, SoC sm4250)
* Redmi 9T (redmi,lemon, SoC sm6115)

The main source used for this change is qpnp pm6125 support patch from caf [1]:

[1]: https://source.codeaurora.org/quic/la/kernel/msm-5.4/commit/?h=kernel.lnx.5.4.r1-rel&id=d1220daeffaa440ffff0a8c47322eb0033bf54f5

v3: https://lkml.org/lkml/2022/7/31/303
v2: https://lkml.org/lkml/2022/7/26/885
v1: https://lkml.org/lkml/2021/8/28/144

Changes from v3:
- fix compilation issue reported by kernel test robot
- reorder HFSMPS/LDO+FTSMPS patches
- add new slew-rate computation for HFSMPS
- add proper pull-down support for new regs
- name new regs/vals after HFSMPS instead of FTSMPS
- address indentation/newline issues reported by Krzysztof
- improve commit messages on SPMI/RPM related patches
Changes from v2:
- split spmi new regulator support in 2 patches
- FTS and LDOs now have set_load and set_pull_down ops
- add better commit messages on spmi patches
- fix sob header order
- fix tested device info (Redmi 9T, NOT Xiaomi 9T)
- improve formatting in spmi binding docs
- sort alphabetically in smd binding docs
- sort alphabetically spmi pmics
- sort alphabetically smd pmics
Changes from v1:
- add dt-bindings
- split SPMI patch into new reg types and the new PMIC
- add correct supply mapping

Iskren Chernev (13):
  dt-bindings: regulator: qcom_spmi: Improve formatting of if-then
    blocks
  dt-bindings: regulator: qcom_spmi: Document PM6125 PMIC
  dt-bindings: regulator: qcom_smd: Sort compatibles alphabetically
  dt-bindings: regulator: qcom_smd: Document PM6125 PMIC
  regulator: qcom_spmi: Add support for HFSMPS regulator type
  regulator: qcom_spmi: Add support for LDO_510 and FTSMPS
  regulator: qcom_spmi: Sort pmics alphabetically (part 1)
  regulator: qcom_spmi: Sort pmics alphabetically (part 2)
  regulator: qcom_spmi: Add PM6125 PMIC support
  regulator: qcom_smd: Sort pmics alphabetically (part 1)
  regulator: qcom_smd: Sort pmics alphabetically (part 2)
  regulator: qcom_smd: Sort pmics alphabetically (part 3)
  regulator: qcom_smd: Add PM6125 RPM regulators

 .../regulator/qcom,smd-rpm-regulator.yaml     |  26 +-
 .../regulator/qcom,spmi-regulator.yaml        |  32 ++
 drivers/regulator/qcom_smd-regulator.c        | 400 ++++++++++--------
 drivers/regulator/qcom_spmi-regulator.c       | 378 ++++++++++++-----
 4 files changed, 551 insertions(+), 285 deletions(-)

--
2.37.1
parents 8622817c 95b5f3ef
...@@ -24,6 +24,17 @@ description: ...@@ -24,6 +24,17 @@ description:
For mp5496, s2 For mp5496, s2
For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22
For pm6125 s1, s2, s3, s4, s5, s6, s7, s8, l1, l2, l3, l5, l6, l7, l8, l9,
l10, l22, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24
For pm660, s1, s2, s3, s4, s5, s6, l1, l2, l3, l5, l6, l7, l8, l9, l10, l22,
l12, l13, l14, l15, l16, l17, l18, l19
For pm660l s1, s2, s3, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, bob
For pm8226, s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, For pm8226, s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10,
l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, l25,
l26, l27, l28, lvs1 l26, l27, l28, lvs1
...@@ -52,11 +63,6 @@ description: ...@@ -52,11 +63,6 @@ description:
l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19,
l20, l21, l22, l23, l24, l25, l26, l27, l28, lvs1, lvs2 l20, l21, l22, l23, l24, l25, l26, l27, l28, lvs1, lvs2
For pm660, s1, s2, s3, s4, s5, s6, l1, l2, l3, l5, l6, l7, l8, l9, l10, l22,
l12, l13, l14, l15, l16, l17, l18, l19
For pm660l s1, s2, s3, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, bob
For pma8084, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, l1, l2, l3, For pma8084, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, l1, l2, l3,
l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19,
l20, l21, l22, l23, l24, l25, l26, l27, lvs1, lvs2, lvs3, lvs4, 5vs1 l20, l21, l22, l23, l24, l25, l26, l27, lvs1, lvs2, lvs3, lvs4, 5vs1
...@@ -68,9 +74,6 @@ description: ...@@ -68,9 +74,6 @@ description:
For pms405, s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, For pms405, s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
l12, l13 l12, l13
For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22
maintainers: maintainers:
- Andy Gross <agross@kernel.org> - Andy Gross <agross@kernel.org>
- Bjorn Andersson <bjorn.andersson@linaro.org> - Bjorn Andersson <bjorn.andersson@linaro.org>
...@@ -79,6 +82,10 @@ properties: ...@@ -79,6 +82,10 @@ properties:
compatible: compatible:
enum: enum:
- qcom,rpm-mp5496-regulators - qcom,rpm-mp5496-regulators
- qcom,rpm-pm2250-regulators
- qcom,rpm-pm6125-regulators
- qcom,rpm-pm660-regulators
- qcom,rpm-pm660l-regulators
- qcom,rpm-pm8226-regulators - qcom,rpm-pm8226-regulators
- qcom,rpm-pm8841-regulators - qcom,rpm-pm8841-regulators
- qcom,rpm-pm8909-regulators - qcom,rpm-pm8909-regulators
...@@ -88,13 +95,10 @@ properties: ...@@ -88,13 +95,10 @@ properties:
- qcom,rpm-pm8953-regulators - qcom,rpm-pm8953-regulators
- qcom,rpm-pm8994-regulators - qcom,rpm-pm8994-regulators
- qcom,rpm-pm8998-regulators - qcom,rpm-pm8998-regulators
- qcom,rpm-pm660-regulators
- qcom,rpm-pm660l-regulators
- qcom,rpm-pma8084-regulators - qcom,rpm-pma8084-regulators
- qcom,rpm-pmi8994-regulators - qcom,rpm-pmi8994-regulators
- qcom,rpm-pmi8998-regulators - qcom,rpm-pmi8998-regulators
- qcom,rpm-pms405-regulators - qcom,rpm-pms405-regulators
- qcom,rpm-pm2250-regulators
patternProperties: patternProperties:
".*-supply$": ".*-supply$":
......
...@@ -12,6 +12,7 @@ maintainers: ...@@ -12,6 +12,7 @@ maintainers:
properties: properties:
compatible: compatible:
enum: enum:
- qcom,pm6125-regulators
- qcom,pm660-regulators - qcom,pm660-regulators
- qcom,pm660l-regulators - qcom,pm660l-regulators
- qcom,pm8004-regulators - qcom,pm8004-regulators
...@@ -107,6 +108,25 @@ required: ...@@ -107,6 +108,25 @@ required:
- compatible - compatible
allOf: allOf:
- if:
properties:
compatible:
contains:
enum:
- qcom,pm6125-regulators
then:
properties:
vdd_l1_l7_l17_l18-supply: true
vdd_l2_l3_l4-supply: true
vdd_l5_l15_l19_l20_l21_l22-supply: true
vdd_l6_l8-supply: true
vdd_l9_l11-supply: true
vdd_l10_l13_l14-supply: true
vdd_l12_l16-supply: true
vdd_l23_l24-supply: true
patternProperties:
"^vdd_s[1-8]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -122,6 +142,7 @@ allOf: ...@@ -122,6 +142,7 @@ allOf:
vdd_l8_l9_l10_l11_l12_l13_l14-supply: true vdd_l8_l9_l10_l11_l12_l13_l14-supply: true
patternProperties: patternProperties:
"^vdd_s[1-6]-supply$": true "^vdd_s[1-6]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -136,6 +157,7 @@ allOf: ...@@ -136,6 +157,7 @@ allOf:
vdd_l4_l6-supply: true vdd_l4_l6-supply: true
patternProperties: patternProperties:
"^vdd_s[1-5]-supply$": true "^vdd_s[1-5]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -145,6 +167,7 @@ allOf: ...@@ -145,6 +167,7 @@ allOf:
then: then:
patternProperties: patternProperties:
"^vdd_s[25]-supply$": true "^vdd_s[25]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -154,6 +177,7 @@ allOf: ...@@ -154,6 +177,7 @@ allOf:
then: then:
patternProperties: patternProperties:
"^vdd_s[1-4]-supply$": true "^vdd_s[1-4]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -173,6 +197,7 @@ allOf: ...@@ -173,6 +197,7 @@ allOf:
vdd_lvs1-supply: true vdd_lvs1-supply: true
patternProperties: patternProperties:
"^vdd_s[1-5]-supply$": true "^vdd_s[1-5]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -182,6 +207,7 @@ allOf: ...@@ -182,6 +207,7 @@ allOf:
then: then:
patternProperties: patternProperties:
"^vdd_s[1-8]-supply$": true "^vdd_s[1-8]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -197,6 +223,7 @@ allOf: ...@@ -197,6 +223,7 @@ allOf:
patternProperties: patternProperties:
"^vdd_l[27]-supply$": true "^vdd_l[27]-supply$": true
"^vdd_s[1-4]-supply$": true "^vdd_s[1-4]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -225,6 +252,7 @@ allOf: ...@@ -225,6 +252,7 @@ allOf:
vin_5vs-supply: true vin_5vs-supply: true
patternProperties: patternProperties:
"^vdd_s[1-3]-supply$": true "^vdd_s[1-3]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -243,6 +271,7 @@ allOf: ...@@ -243,6 +271,7 @@ allOf:
vdd_l9_l10_l13_l14_l15_l18-supply: true vdd_l9_l10_l13_l14_l15_l18-supply: true
patternProperties: patternProperties:
"^vdd_s[1-6]-supply$": true "^vdd_s[1-6]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -267,6 +296,7 @@ allOf: ...@@ -267,6 +296,7 @@ allOf:
vdd_lvs_1_2-supply: true vdd_lvs_1_2-supply: true
patternProperties: patternProperties:
"^vdd_s[1-9][0-2]?-supply$": true "^vdd_s[1-9][0-2]?-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -278,6 +308,7 @@ allOf: ...@@ -278,6 +308,7 @@ allOf:
vdd_l1-supply: true vdd_l1-supply: true
patternProperties: patternProperties:
"^vdd_s[1-3]-supply$": true "^vdd_s[1-3]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
...@@ -293,6 +324,7 @@ allOf: ...@@ -293,6 +324,7 @@ allOf:
patternProperties: patternProperties:
"^vdd_l[479]-supply$": true "^vdd_l[479]-supply$": true
"^vdd_s[1-5]-supply$": true "^vdd_s[1-5]-supply$": true
- if: - if:
properties: properties:
compatible: compatible:
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment