xref: /openbmc/linux/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
10b3bbd76SRobert Marko# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
20b3bbd76SRobert Marko%YAML 1.2
30b3bbd76SRobert Marko---
40b3bbd76SRobert Marko$id: http://devicetree.org/schemas/regulator/qcom,spmi-regulator.yaml#
50b3bbd76SRobert Marko$schema: http://devicetree.org/meta-schemas/core.yaml#
60b3bbd76SRobert Marko
70b3bbd76SRobert Markotitle: Qualcomm SPMI Regulators
80b3bbd76SRobert Marko
90b3bbd76SRobert Markomaintainers:
100b3bbd76SRobert Marko  - Robert Marko <robimarko@gmail.com>
110b3bbd76SRobert Marko
120b3bbd76SRobert Markoproperties:
130b3bbd76SRobert Marko  compatible:
140b3bbd76SRobert Marko    enum:
155b2a085bSIskren Chernev      - qcom,pm6125-regulators
160b3bbd76SRobert Marko      - qcom,pm660-regulators
170b3bbd76SRobert Marko      - qcom,pm660l-regulators
180b3bbd76SRobert Marko      - qcom,pm8004-regulators
190b3bbd76SRobert Marko      - qcom,pm8005-regulators
200b3bbd76SRobert Marko      - qcom,pm8226-regulators
210b3bbd76SRobert Marko      - qcom,pm8841-regulators
220b3bbd76SRobert Marko      - qcom,pm8916-regulators
230b3bbd76SRobert Marko      - qcom,pm8941-regulators
240b3bbd76SRobert Marko      - qcom,pm8950-regulators
250b3bbd76SRobert Marko      - qcom,pm8994-regulators
260b3bbd76SRobert Marko      - qcom,pmi8994-regulators
2704475057SRobert Marko      - qcom,pmp8074-regulators
280b3bbd76SRobert Marko      - qcom,pms405-regulators
290b3bbd76SRobert Marko
300b3bbd76SRobert Marko  qcom,saw-reg:
310b3bbd76SRobert Marko    description: Reference to syscon node defining the SAW registers
320b3bbd76SRobert Marko    $ref: /schemas/types.yaml#/definitions/phandle
330b3bbd76SRobert Marko
340b3bbd76SRobert MarkopatternProperties:
350b3bbd76SRobert Marko  "^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-3])$":
360b3bbd76SRobert Marko    description: List of regulators and its properties
370b3bbd76SRobert Marko    type: object
380b3bbd76SRobert Marko    $ref: regulator.yaml#
39*475043faSJean-Philippe Brucker    unevaluatedProperties: false
400b3bbd76SRobert Marko
410b3bbd76SRobert Marko    properties:
420b3bbd76SRobert Marko      qcom,ocp-max-retries:
430b3bbd76SRobert Marko        description:
440b3bbd76SRobert Marko          Maximum number of times to try toggling a voltage switch off and
450b3bbd76SRobert Marko          back on as a result of consecutive over current events
460b3bbd76SRobert Marko        $ref: /schemas/types.yaml#/definitions/uint32
470b3bbd76SRobert Marko
480b3bbd76SRobert Marko      qcom,ocp-retry-delay:
490b3bbd76SRobert Marko        description:
500b3bbd76SRobert Marko          Time to delay in milliseconds between each voltage switch toggle
510b3bbd76SRobert Marko          after an over current event takes place
520b3bbd76SRobert Marko        $ref: /schemas/types.yaml#/definitions/uint32
530b3bbd76SRobert Marko
540b3bbd76SRobert Marko      qcom,pin-ctrl-enable:
550b3bbd76SRobert Marko        description:
560b3bbd76SRobert Marko          Bit mask specifying which hardware pins should be used to enable the
570b3bbd76SRobert Marko          regulator, if any.
580b3bbd76SRobert Marko          Supported bits are
590b3bbd76SRobert Marko          0 = ignore all hardware enable signals
600b3bbd76SRobert Marko          BIT(0) = follow HW0_EN signal
610b3bbd76SRobert Marko          BIT(1) = follow HW1_EN signal
620b3bbd76SRobert Marko          BIT(2) = follow HW2_EN signal
630b3bbd76SRobert Marko          BIT(3) = follow HW3_EN signal
640b3bbd76SRobert Marko        $ref: /schemas/types.yaml#/definitions/uint32
650b3bbd76SRobert Marko        minimum: 0
660b3bbd76SRobert Marko        maximum: 15
670b3bbd76SRobert Marko
680b3bbd76SRobert Marko      qcom,pin-ctrl-hpm:
690b3bbd76SRobert Marko        description:
700b3bbd76SRobert Marko          Bit mask specifying which hardware pins should be used to force the
710b3bbd76SRobert Marko          regulator into high power mode, if any.
720b3bbd76SRobert Marko          Supported bits are
730b3bbd76SRobert Marko          0 = ignore all hardware enable signals
740b3bbd76SRobert Marko          BIT(0) = follow HW0_EN signal
750b3bbd76SRobert Marko          BIT(1) = follow HW1_EN signal
760b3bbd76SRobert Marko          BIT(2) = follow HW2_EN signal
770b3bbd76SRobert Marko          BIT(3) = follow HW3_EN signal
780b3bbd76SRobert Marko          BIT(4) = follow PMIC awake state
790b3bbd76SRobert Marko        $ref: /schemas/types.yaml#/definitions/uint32
800b3bbd76SRobert Marko        minimum: 0
810b3bbd76SRobert Marko        maximum: 31
820b3bbd76SRobert Marko
830b3bbd76SRobert Marko      qcom,vs-soft-start-strength:
840b3bbd76SRobert Marko        description:
850b3bbd76SRobert Marko          This property sets the soft start strength for voltage switch type
860b3bbd76SRobert Marko          regulators.
870b3bbd76SRobert Marko          Supported values are
880b3bbd76SRobert Marko          0 = 0.05 uA
890b3bbd76SRobert Marko          1 = 0.25 uA
900b3bbd76SRobert Marko          2 = 0.55 uA
910b3bbd76SRobert Marko          3 = 0.75 uA
920b3bbd76SRobert Marko        $ref: /schemas/types.yaml#/definitions/uint32
930b3bbd76SRobert Marko        minimum: 0
940b3bbd76SRobert Marko        maximum: 3
950b3bbd76SRobert Marko
960b3bbd76SRobert Marko      qcom,saw-slave:
970b3bbd76SRobert Marko        description: SAW controlled gang slave. Will not be configured.
980b3bbd76SRobert Marko        type: boolean
990b3bbd76SRobert Marko
1000b3bbd76SRobert Marko      qcom,saw-leader:
1010b3bbd76SRobert Marko        description:
1020b3bbd76SRobert Marko          SAW controlled gang leader. Will be configured as SAW regulator.
1030b3bbd76SRobert Marko        type: boolean
1040b3bbd76SRobert Marko
1050b3bbd76SRobert Markorequired:
1060b3bbd76SRobert Marko  - compatible
1070b3bbd76SRobert Marko
1080b3bbd76SRobert MarkoallOf:
1090b3bbd76SRobert Marko  - if:
1100b3bbd76SRobert Marko      properties:
1110b3bbd76SRobert Marko        compatible:
1120b3bbd76SRobert Marko          contains:
1130b3bbd76SRobert Marko            enum:
1145b2a085bSIskren Chernev              - qcom,pm6125-regulators
1155b2a085bSIskren Chernev    then:
1165b2a085bSIskren Chernev      properties:
1175b2a085bSIskren Chernev        vdd_l1_l7_l17_l18-supply: true
1185b2a085bSIskren Chernev        vdd_l2_l3_l4-supply: true
1195b2a085bSIskren Chernev        vdd_l5_l15_l19_l20_l21_l22-supply: true
1205b2a085bSIskren Chernev        vdd_l6_l8-supply: true
1215b2a085bSIskren Chernev        vdd_l9_l11-supply: true
1225b2a085bSIskren Chernev        vdd_l10_l13_l14-supply: true
1235b2a085bSIskren Chernev        vdd_l12_l16-supply: true
1245b2a085bSIskren Chernev        vdd_l23_l24-supply: true
1255b2a085bSIskren Chernev      patternProperties:
1265b2a085bSIskren Chernev        "^vdd_s[1-8]-supply$": true
1275b2a085bSIskren Chernev
1285b2a085bSIskren Chernev  - if:
1295b2a085bSIskren Chernev      properties:
1305b2a085bSIskren Chernev        compatible:
1315b2a085bSIskren Chernev          contains:
1325b2a085bSIskren Chernev            enum:
1330b3bbd76SRobert Marko              - qcom,pm660-regulators
1340b3bbd76SRobert Marko    then:
1350b3bbd76SRobert Marko      properties:
1360b3bbd76SRobert Marko        vdd_l15_l16_l17_l18_l19-supply: true
1370b3bbd76SRobert Marko        vdd_l1_l6_l7-supply: true
1380b3bbd76SRobert Marko        vdd_l2_l3-supply: true
1390b3bbd76SRobert Marko        vdd_l5-supply: true
1400b3bbd76SRobert Marko        vdd_l8_l9_l10_l11_l12_l13_l14-supply: true
1410b3bbd76SRobert Marko      patternProperties:
1420b3bbd76SRobert Marko        "^vdd_s[1-6]-supply$": true
143ac717927SIskren Chernev
1440b3bbd76SRobert Marko  - if:
1450b3bbd76SRobert Marko      properties:
1460b3bbd76SRobert Marko        compatible:
1470b3bbd76SRobert Marko          contains:
1480b3bbd76SRobert Marko            enum:
1490b3bbd76SRobert Marko              - qcom,pm660l-regulators
1500b3bbd76SRobert Marko    then:
1510b3bbd76SRobert Marko      properties:
1520b3bbd76SRobert Marko        vdd_l1_l9_l10-supply: true
1530b3bbd76SRobert Marko        vdd_l2-supply: true
1540b3bbd76SRobert Marko        vdd_l3_l5_l7_l8-supply: true
1550b3bbd76SRobert Marko        vdd_l4_l6-supply: true
1560b3bbd76SRobert Marko      patternProperties:
1570b3bbd76SRobert Marko        "^vdd_s[1-5]-supply$": true
158ac717927SIskren Chernev
1590b3bbd76SRobert Marko  - if:
1600b3bbd76SRobert Marko      properties:
1610b3bbd76SRobert Marko        compatible:
1620b3bbd76SRobert Marko          contains:
1630b3bbd76SRobert Marko            enum:
1640b3bbd76SRobert Marko              - qcom,pm8004-regulators
1650b3bbd76SRobert Marko    then:
1660b3bbd76SRobert Marko      patternProperties:
1670b3bbd76SRobert Marko        "^vdd_s[25]-supply$": true
168ac717927SIskren Chernev
1690b3bbd76SRobert Marko  - if:
1700b3bbd76SRobert Marko      properties:
1710b3bbd76SRobert Marko        compatible:
1720b3bbd76SRobert Marko          contains:
1730b3bbd76SRobert Marko            enum:
1740b3bbd76SRobert Marko              - qcom,pm8005-regulators
1750b3bbd76SRobert Marko    then:
1760b3bbd76SRobert Marko      patternProperties:
1770b3bbd76SRobert Marko        "^vdd_s[1-4]-supply$": true
178ac717927SIskren Chernev
1790b3bbd76SRobert Marko  - if:
1800b3bbd76SRobert Marko      properties:
1810b3bbd76SRobert Marko        compatible:
1820b3bbd76SRobert Marko          contains:
1830b3bbd76SRobert Marko            enum:
1840b3bbd76SRobert Marko              - qcom,pm8226-regulators
1850b3bbd76SRobert Marko    then:
1860b3bbd76SRobert Marko      properties:
1870b3bbd76SRobert Marko        vdd_l10_l11_l13-supply: true
1880b3bbd76SRobert Marko        vdd_l12_l14-supply: true
1890b3bbd76SRobert Marko        vdd_l15_l16_l17_l18-supply: true
1900b3bbd76SRobert Marko        vdd_l19_l20_l21_l22_l23_l28-supply: true
1910b3bbd76SRobert Marko        vdd_l1_l2_l4_l5-supply: true
1920b3bbd76SRobert Marko        vdd_l25-supply: true
1930b3bbd76SRobert Marko        vdd_l3_l24_l26-supply: true
1940b3bbd76SRobert Marko        vdd_l6_l7_l8_l9_l27-supply: true
1950b3bbd76SRobert Marko        vdd_lvs1-supply: true
1960b3bbd76SRobert Marko      patternProperties:
1970b3bbd76SRobert Marko        "^vdd_s[1-5]-supply$": true
198ac717927SIskren Chernev
1990b3bbd76SRobert Marko  - if:
2000b3bbd76SRobert Marko      properties:
2010b3bbd76SRobert Marko        compatible:
2020b3bbd76SRobert Marko          contains:
2030b3bbd76SRobert Marko            enum:
2040b3bbd76SRobert Marko              - qcom,pm8841-regulators
2050b3bbd76SRobert Marko    then:
2060b3bbd76SRobert Marko      patternProperties:
2070b3bbd76SRobert Marko        "^vdd_s[1-8]-supply$": true
208ac717927SIskren Chernev
2090b3bbd76SRobert Marko  - if:
2100b3bbd76SRobert Marko      properties:
2110b3bbd76SRobert Marko        compatible:
2120b3bbd76SRobert Marko          contains:
2130b3bbd76SRobert Marko            enum:
2140b3bbd76SRobert Marko              - qcom,pm8916-regulators
2150b3bbd76SRobert Marko    then:
2160b3bbd76SRobert Marko      properties:
2170b3bbd76SRobert Marko        vdd_l1_l3-supply: true
2180b3bbd76SRobert Marko        vdd_l4_l5_l6-supply: true
2190b3bbd76SRobert Marko        vdd_l8_l11_l14_l15_l16-supply: true
2200b3bbd76SRobert Marko        vdd_l9_l10_l12_l13_l17_l18-supply: true
2210b3bbd76SRobert Marko      patternProperties:
2220b3bbd76SRobert Marko        "^vdd_l[27]-supply$": true
2230b3bbd76SRobert Marko        "^vdd_s[1-4]-supply$": true
224ac717927SIskren Chernev
2250b3bbd76SRobert Marko  - if:
2260b3bbd76SRobert Marko      properties:
2270b3bbd76SRobert Marko        compatible:
2280b3bbd76SRobert Marko          contains:
2290b3bbd76SRobert Marko            enum:
2300b3bbd76SRobert Marko              - qcom,pm8941-regulators
2310b3bbd76SRobert Marko    then:
2320b3bbd76SRobert Marko      properties:
2330b3bbd76SRobert Marko        interrupts:
2340b3bbd76SRobert Marko          items:
2350b3bbd76SRobert Marko            - description: Over-current protection interrupt for 5V S1
2360b3bbd76SRobert Marko            - description: Over-current protection interrupt for 5V S2
2370b3bbd76SRobert Marko        interrupt-names:
2380b3bbd76SRobert Marko          items:
2390b3bbd76SRobert Marko            - const: ocp-5vs1
2400b3bbd76SRobert Marko            - const: ocp-5vs2
2410b3bbd76SRobert Marko        vdd_l13_l20_l23_l24-supply: true
2420b3bbd76SRobert Marko        vdd_l1_l3-supply: true
2430b3bbd76SRobert Marko        vdd_l21-supply: true
2440b3bbd76SRobert Marko        vdd_l2_lvs_1_2_3-supply: true
2450b3bbd76SRobert Marko        vdd_l4_l11-supply: true
2460b3bbd76SRobert Marko        vdd_l5_l7-supply: true
2470b3bbd76SRobert Marko        vdd_l6_l12_l14_l15-supply: true
2480b3bbd76SRobert Marko        vdd_l8_l16_l18_19-supply: true
2490b3bbd76SRobert Marko        vdd_l9_l10_l17_l22-supply: true
2500b3bbd76SRobert Marko        vin_5vs-supply: true
2510b3bbd76SRobert Marko      patternProperties:
2520b3bbd76SRobert Marko        "^vdd_s[1-3]-supply$": true
253ac717927SIskren Chernev
2540b3bbd76SRobert Marko  - if:
2550b3bbd76SRobert Marko      properties:
2560b3bbd76SRobert Marko        compatible:
2570b3bbd76SRobert Marko          contains:
2580b3bbd76SRobert Marko            enum:
2590b3bbd76SRobert Marko              - qcom,pm8950-regulators
2600b3bbd76SRobert Marko    then:
2610b3bbd76SRobert Marko      properties:
2620b3bbd76SRobert Marko        vdd_l1_l19-supply: true
2630b3bbd76SRobert Marko        vdd_l20-supply: true
2640b3bbd76SRobert Marko        vdd_l21-supply: true
2650b3bbd76SRobert Marko        vdd_l2_l23-supply: true
2660b3bbd76SRobert Marko        vdd_l3-supply: true
2670b3bbd76SRobert Marko        vdd_l4_l5_l6_l7_l16-supply: true
2680b3bbd76SRobert Marko        vdd_l8_l11_l12_l17_l22-supply: true
2690b3bbd76SRobert Marko        vdd_l9_l10_l13_l14_l15_l18-supply: true
2700b3bbd76SRobert Marko      patternProperties:
2710b3bbd76SRobert Marko        "^vdd_s[1-6]-supply$": true
272ac717927SIskren Chernev
2730b3bbd76SRobert Marko  - if:
2740b3bbd76SRobert Marko      properties:
2750b3bbd76SRobert Marko        compatible:
2760b3bbd76SRobert Marko          contains:
2770b3bbd76SRobert Marko            enum:
2780b3bbd76SRobert Marko              - qcom,pm8994-regulators
2790b3bbd76SRobert Marko    then:
2800b3bbd76SRobert Marko      properties:
2810b3bbd76SRobert Marko        vdd_l1-supply: true
2820b3bbd76SRobert Marko        vdd_l13_l19_l23_l24-supply: true
2830b3bbd76SRobert Marko        vdd_l14_l15-supply: true
2840b3bbd76SRobert Marko        vdd_l17_l29-supply: true
2850b3bbd76SRobert Marko        vdd_l20_l21-supply: true
2860b3bbd76SRobert Marko        vdd_l25-supply: true
2870b3bbd76SRobert Marko        vdd_l2_l26_l28-supply: true
2880b3bbd76SRobert Marko        vdd_l3_l11-supply: true
2890b3bbd76SRobert Marko        vdd_l4_l27_l31-supply: true
2900b3bbd76SRobert Marko        vdd_l5_l7-supply: true
2910b3bbd76SRobert Marko        vdd_l6_l12_l32-supply: true
2920b3bbd76SRobert Marko        vdd_l8_l16_l30-supply: true
2930b3bbd76SRobert Marko        vdd_l9_l10_l18_l22-supply: true
2940b3bbd76SRobert Marko        vdd_lvs_1_2-supply: true
2950b3bbd76SRobert Marko      patternProperties:
2960b3bbd76SRobert Marko        "^vdd_s[1-9][0-2]?-supply$": true
297ac717927SIskren Chernev
2980b3bbd76SRobert Marko  - if:
2990b3bbd76SRobert Marko      properties:
3000b3bbd76SRobert Marko        compatible:
3010b3bbd76SRobert Marko          contains:
3020b3bbd76SRobert Marko            enum:
3030b3bbd76SRobert Marko              - qcom,pmi8994-regulators
3040b3bbd76SRobert Marko    then:
3050b3bbd76SRobert Marko      properties:
3060b3bbd76SRobert Marko        vdd_l1-supply: true
3070b3bbd76SRobert Marko      patternProperties:
3080b3bbd76SRobert Marko        "^vdd_s[1-3]-supply$": true
309ac717927SIskren Chernev
3100b3bbd76SRobert Marko  - if:
3110b3bbd76SRobert Marko      properties:
3120b3bbd76SRobert Marko        compatible:
3130b3bbd76SRobert Marko          contains:
3140b3bbd76SRobert Marko            enum:
31504475057SRobert Marko              - qcom,pmp8074-regulators
31604475057SRobert Marko    then:
31704475057SRobert Marko      properties:
31804475057SRobert Marko        vdd_l10_l11_l12_l13-supply: true
31904475057SRobert Marko        vdd_l1_l2-supply: true
32004475057SRobert Marko        vdd_l3_l8-supply: true
32104475057SRobert Marko        vdd_l5_l6_l15-supply: true
32204475057SRobert Marko      patternProperties:
32304475057SRobert Marko        "^vdd_l[479]-supply$": true
32404475057SRobert Marko        "^vdd_s[1-5]-supply$": true
325ac717927SIskren Chernev
32604475057SRobert Marko  - if:
32704475057SRobert Marko      properties:
32804475057SRobert Marko        compatible:
32904475057SRobert Marko          contains:
33004475057SRobert Marko            enum:
3310b3bbd76SRobert Marko              - qcom,pms405-regulators
3320b3bbd76SRobert Marko    then:
3330b3bbd76SRobert Marko      properties:
3340b3bbd76SRobert Marko        vdd_s3-supply: true
3350b3bbd76SRobert Marko
3360b3bbd76SRobert MarkounevaluatedProperties: false
3370b3bbd76SRobert Marko
3380b3bbd76SRobert Markoexamples:
3390b3bbd76SRobert Marko  - |
3400b3bbd76SRobert Marko    regulators {
3410b3bbd76SRobert Marko      compatible = "qcom,pm8941-regulators";
3420b3bbd76SRobert Marko      vdd_l1_l3-supply = <&s1>;
3430b3bbd76SRobert Marko
3440b3bbd76SRobert Marko      s1: s1 {
3450b3bbd76SRobert Marko        regulator-min-microvolt = <1300000>;
3460b3bbd76SRobert Marko        regulator-max-microvolt = <1400000>;
3470b3bbd76SRobert Marko      };
3480b3bbd76SRobert Marko
3490b3bbd76SRobert Marko      l1: l1 {
3500b3bbd76SRobert Marko        regulator-min-microvolt = <1225000>;
3510b3bbd76SRobert Marko        regulator-max-microvolt = <1300000>;
3520b3bbd76SRobert Marko      };
3530b3bbd76SRobert Marko    };
3540b3bbd76SRobert Marko...
355