Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/regulator/qcom,rpm-regulator.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Qualcomm RPM regulator |
| 8 | |
| 9 | description: |
| 10 | The Qualcomm RPM regulator is modelled as a subdevice of the RPM. |
| 11 | |
| 12 | Please refer to Documentation/devicetree/bindings/soc/qcom/qcom,rpm.yaml |
| 13 | for information regarding the RPM node. |
| 14 | |
| 15 | The regulator node houses sub-nodes for each regulator within the device. |
| 16 | Each sub-node is identified using the node's name, with valid values listed |
| 17 | for each of the pmics below. |
| 18 | |
| 19 | For pm8058 l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, |
| 20 | l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, s0, s1, s2, s3, s4, |
| 21 | lvs0, lvs1, ncp |
| 22 | |
| 23 | For pm8901 l0, l1, l2, l3, l4, l5, l6, s0, s1, s2, s3, s4, lvs0, lvs1, lvs2, lvs3, |
| 24 | mvs |
| 25 | |
| 26 | For pm8921 s1, s2, s3, s4, s7, s8, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, |
| 27 | l12, l14, l15, l16, l17, l18, l21, l22, l23, l24, l25, l26, l27, l28, |
| 28 | l29, lvs1, lvs2, lvs3, lvs4, lvs5, lvs6, lvs7, usb-switch, hdmi-switch, |
| 29 | ncp |
| 30 | |
| 31 | For pm8018 s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, |
| 32 | l12, l14, lvs1 |
| 33 | |
| 34 | For smb208 s1a, s1b, s2a, s2b |
| 35 | |
| 36 | maintainers: |
| 37 | - Bjorn Andersson <andersson@kernel.org> |
| 38 | |
| 39 | properties: |
| 40 | compatible: |
| 41 | enum: |
| 42 | - qcom,rpm-pm8058-regulators |
| 43 | - qcom,rpm-pm8901-regulators |
| 44 | - qcom,rpm-pm8921-regulators |
| 45 | - qcom,rpm-pm8018-regulators |
| 46 | - qcom,rpm-smb208-regulators |
| 47 | |
| 48 | patternProperties: |
| 49 | ".*-supply$": |
| 50 | description: Input supply phandle(s) for this node |
| 51 | |
| 52 | "^((s|l|lvs)[0-9]*|s[1-2][a-b]|ncp|mvs|usb-switch|hdmi-switch)$": |
| 53 | description: List of regulators and its properties |
| 54 | $ref: regulator.yaml# |
| 55 | unevaluatedProperties: false |
| 56 | properties: |
| 57 | bias-pull-down: |
| 58 | description: enable pull down of the regulator when inactive |
| 59 | type: boolean |
| 60 | |
| 61 | qcom,switch-mode-frequency: |
| 62 | description: Frequency (Hz) of the switch-mode power supply |
| 63 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 64 | enum: |
| 65 | - 19200000 |
| 66 | - 9600000 |
| 67 | - 6400000 |
| 68 | - 4800000 |
| 69 | - 3840000 |
| 70 | - 3200000 |
| 71 | - 2740000 |
| 72 | - 2400000 |
| 73 | - 2130000 |
| 74 | - 1920000 |
| 75 | - 1750000 |
| 76 | - 1600000 |
| 77 | - 1480000 |
| 78 | - 1370000 |
| 79 | - 1280000 |
| 80 | - 1200000 |
| 81 | |
| 82 | qcom,force-mode: |
| 83 | description: Indicates that the regulator should be forced to a particular mode |
| 84 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 85 | enum: |
| 86 | - 0 # QCOM_RPM_FORCE_MODE_NONE do not force any mode |
| 87 | - 1 # QCOM_RPM_FORCE_MODE_LPM force into low power mode |
| 88 | - 2 # QCOM_RPM_FORCE_MODE_HPM force into high power mode |
| 89 | - 3 # QCOM_RPM_FORCE_MODE_AUTO allow regulator to automatically select its own mode |
| 90 | # based on realtime current draw, only for pm8921 smps and ftsmps |
| 91 | |
| 92 | qcom,power-mode-hysteretic: |
| 93 | description: select that the power supply should operate in hysteretic mode, |
| 94 | instead of the default pwm mode |
| 95 | type: boolean |
| 96 | |
| 97 | additionalProperties: false |
| 98 | |
| 99 | required: |
| 100 | - compatible |
| 101 | |
| 102 | examples: |
| 103 | - | |
| 104 | #include <dt-bindings/mfd/qcom-rpm.h> |
| 105 | regulators { |
| 106 | compatible = "qcom,rpm-pm8921-regulators"; |
| 107 | vdd_l1_l2_l12_l18-supply = <&pm8921_s4>; |
| 108 | |
| 109 | s1 { |
| 110 | regulator-min-microvolt = <1225000>; |
| 111 | regulator-max-microvolt = <1225000>; |
| 112 | |
| 113 | bias-pull-down; |
| 114 | |
| 115 | qcom,switch-mode-frequency = <3200000>; |
| 116 | }; |
| 117 | |
| 118 | pm8921_s4: s4 { |
| 119 | regulator-min-microvolt = <1800000>; |
| 120 | regulator-max-microvolt = <1800000>; |
| 121 | |
| 122 | qcom,switch-mode-frequency = <1600000>; |
| 123 | bias-pull-down; |
| 124 | |
| 125 | qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>; |
| 126 | }; |
| 127 | }; |
| 128 | ... |