diff options
| -rw-r--r-- | Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt | 160 | ||||
| -rw-r--r-- | include/dt-bindings/regulator/qcom,rpmh-regulator.h | 36 |
2 files changed, 196 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt new file mode 100644 index 000000000000..7ef2dbe48e8a --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt | |||
| @@ -0,0 +1,160 @@ | |||
| 1 | Qualcomm Technologies, Inc. RPMh Regulators | ||
| 2 | |||
| 3 | rpmh-regulator devices support PMIC regulator management via the Voltage | ||
| 4 | Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators. The APPS | ||
| 5 | processor communicates with these hardware blocks via a Resource State | ||
| 6 | Coordinator (RSC) using command packets. The VRM allows changing three | ||
| 7 | parameters for a given regulator: enable state, output voltage, and operating | ||
| 8 | mode. The XOB allows changing only a single parameter for a given regulator: | ||
| 9 | its enable state. Despite its name, the XOB is capable of controlling the | ||
| 10 | enable state of any PMIC peripheral. It is used for clock buffers, low-voltage | ||
| 11 | switches, and LDO/SMPS regulators which have a fixed voltage and mode. | ||
| 12 | |||
| 13 | ======================= | ||
| 14 | Required Node Structure | ||
| 15 | ======================= | ||
| 16 | |||
| 17 | RPMh regulators must be described in two levels of device nodes. The first | ||
| 18 | level describes the PMIC containing the regulators and must reside within an | ||
| 19 | RPMh device node. The second level describes each regulator within the PMIC | ||
| 20 | which is to be used on the board. Each of these regulators maps to a single | ||
| 21 | RPMh resource. | ||
| 22 | |||
| 23 | The names used for regulator nodes must match those supported by a given PMIC. | ||
| 24 | Supported regulator node names: | ||
| 25 | PM8998: smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2 | ||
| 26 | PMI8998: bob | ||
| 27 | PM8005: smps1 - smps4 | ||
| 28 | |||
| 29 | ======================== | ||
| 30 | First Level Nodes - PMIC | ||
| 31 | ======================== | ||
| 32 | |||
| 33 | - compatible | ||
| 34 | Usage: required | ||
| 35 | Value type: <string> | ||
| 36 | Definition: Must be one of: "qcom,pm8998-rpmh-regulators", | ||
| 37 | "qcom,pmi8998-rpmh-regulators" or | ||
| 38 | "qcom,pm8005-rpmh-regulators". | ||
| 39 | |||
| 40 | - qcom,pmic-id | ||
| 41 | Usage: required | ||
| 42 | Value type: <string> | ||
| 43 | Definition: RPMh resource name suffix used for the regulators found on | ||
| 44 | this PMIC. Typical values: "a", "b", "c", "d", "e", "f". | ||
| 45 | |||
| 46 | - vdd-s1-supply | ||
| 47 | - vdd-s2-supply | ||
| 48 | - vdd-s3-supply | ||
| 49 | - vdd-s4-supply | ||
| 50 | Usage: optional (PM8998 and PM8005 only) | ||
| 51 | Value type: <phandle> | ||
| 52 | Definition: phandle of the parent supply regulator of one or more of the | ||
| 53 | regulators for this PMIC. | ||
| 54 | |||
| 55 | - vdd-s5-supply | ||
| 56 | - vdd-s6-supply | ||
| 57 | - vdd-s7-supply | ||
| 58 | - vdd-s8-supply | ||
| 59 | - vdd-s9-supply | ||
| 60 | - vdd-s10-supply | ||
| 61 | - vdd-s11-supply | ||
| 62 | - vdd-s12-supply | ||
| 63 | - vdd-s13-supply | ||
| 64 | - vdd-l1-l27-supply | ||
| 65 | - vdd-l2-l8-l17-supply | ||
| 66 | - vdd-l3-l11-supply | ||
| 67 | - vdd-l4-l5-supply | ||
| 68 | - vdd-l6-supply | ||
| 69 | - vdd-l7-l12-l14-l15-supply | ||
| 70 | - vdd-l9-supply | ||
| 71 | - vdd-l10-l23-l25-supply | ||
| 72 | - vdd-l13-l19-l21-supply | ||
| 73 | - vdd-l16-l28-supply | ||
| 74 | - vdd-l18-l22-supply | ||
| 75 | - vdd-l20-l24-supply | ||
| 76 | - vdd-l26-supply | ||
| 77 | - vin-lvs-1-2-supply | ||
| 78 | Usage: optional (PM8998 only) | ||
| 79 | Value type: <phandle> | ||
| 80 | Definition: phandle of the parent supply regulator of one or more of the | ||
| 81 | regulators for this PMIC. | ||
| 82 | |||
| 83 | - vdd-bob-supply | ||
| 84 | Usage: optional (PMI8998 only) | ||
| 85 | Value type: <phandle> | ||
| 86 | Definition: BOB regulator parent supply phandle | ||
| 87 | |||
| 88 | =============================== | ||
| 89 | Second Level Nodes - Regulators | ||
| 90 | =============================== | ||
| 91 | |||
| 92 | - qcom,always-wait-for-ack | ||
| 93 | Usage: optional | ||
| 94 | Value type: <empty> | ||
| 95 | Definition: Boolean flag which indicates that the application processor | ||
| 96 | must wait for an ACK or a NACK from RPMh for every request | ||
| 97 | sent for this regulator including those which are for a | ||
| 98 | strictly lower power state. | ||
| 99 | |||
| 100 | Other properties defined in Documentation/devicetree/bindings/regulator.txt | ||
| 101 | may also be used. regulator-initial-mode and regulator-allowed-modes may be | ||
| 102 | specified for VRM regulators using mode values from | ||
| 103 | include/dt-bindings/regulator/qcom,rpmh-regulator.h. regulator-allow-bypass | ||
| 104 | may be specified for BOB type regulators managed via VRM. | ||
| 105 | regulator-allow-set-load may be specified for LDO type regulators managed via | ||
| 106 | VRM. | ||
| 107 | |||
| 108 | ======== | ||
| 109 | Examples | ||
| 110 | ======== | ||
| 111 | |||
| 112 | #include <dt-bindings/regulator/qcom,rpmh-regulator.h> | ||
| 113 | |||
| 114 | &apps_rsc { | ||
| 115 | pm8998-rpmh-regulators { | ||
| 116 | compatible = "qcom,pm8998-rpmh-regulators"; | ||
| 117 | qcom,pmic-id = "a"; | ||
| 118 | |||
| 119 | vdd-l7-l12-l14-l15-supply = <&pm8998_s5>; | ||
| 120 | |||
| 121 | smps2 { | ||
| 122 | regulator-min-microvolt = <1100000>; | ||
| 123 | regulator-max-microvolt = <1100000>; | ||
| 124 | }; | ||
| 125 | |||
| 126 | pm8998_s5: smps5 { | ||
| 127 | regulator-min-microvolt = <1904000>; | ||
| 128 | regulator-max-microvolt = <2040000>; | ||
| 129 | }; | ||
| 130 | |||
| 131 | ldo7 { | ||
| 132 | regulator-min-microvolt = <1800000>; | ||
| 133 | regulator-max-microvolt = <1800000>; | ||
| 134 | regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; | ||
| 135 | regulator-allowed-modes = | ||
| 136 | <RPMH_REGULATOR_MODE_LPM | ||
| 137 | RPMH_REGULATOR_MODE_HPM>; | ||
| 138 | regulator-allow-set-load; | ||
| 139 | }; | ||
| 140 | |||
| 141 | lvs1 { | ||
| 142 | regulator-min-microvolt = <1800000>; | ||
| 143 | regulator-max-microvolt = <1800000>; | ||
| 144 | }; | ||
| 145 | }; | ||
| 146 | |||
| 147 | pmi8998-rpmh-regulators { | ||
| 148 | compatible = "qcom,pmi8998-rpmh-regulators"; | ||
| 149 | qcom,pmic-id = "b"; | ||
| 150 | |||
| 151 | bob { | ||
| 152 | regulator-min-microvolt = <3312000>; | ||
| 153 | regulator-max-microvolt = <3600000>; | ||
| 154 | regulator-allowed-modes = | ||
| 155 | <RPMH_REGULATOR_MODE_AUTO | ||
| 156 | RPMH_REGULATOR_MODE_HPM>; | ||
| 157 | regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; | ||
| 158 | }; | ||
| 159 | }; | ||
| 160 | }; | ||
diff --git a/include/dt-bindings/regulator/qcom,rpmh-regulator.h b/include/dt-bindings/regulator/qcom,rpmh-regulator.h new file mode 100644 index 000000000000..86713dcf9e02 --- /dev/null +++ b/include/dt-bindings/regulator/qcom,rpmh-regulator.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* Copyright (c) 2018, The Linux Foundation. All rights reserved. */ | ||
| 3 | |||
| 4 | #ifndef __QCOM_RPMH_REGULATOR_H | ||
| 5 | #define __QCOM_RPMH_REGULATOR_H | ||
| 6 | |||
| 7 | /* | ||
| 8 | * These mode constants may be used to specify modes for various RPMh regulator | ||
| 9 | * device tree properties (e.g. regulator-initial-mode). Each type of regulator | ||
| 10 | * supports a subset of the possible modes. | ||
| 11 | * | ||
| 12 | * %RPMH_REGULATOR_MODE_RET: Retention mode in which only an extremely small | ||
| 13 | * load current is allowed. This mode is supported | ||
| 14 | * by LDO and SMPS type regulators. | ||
| 15 | * %RPMH_REGULATOR_MODE_LPM: Low power mode in which a small load current is | ||
| 16 | * allowed. This mode corresponds to PFM for SMPS | ||
| 17 | * and BOB type regulators. This mode is supported | ||
| 18 | * by LDO, HFSMPS, BOB, and PMIC4 FTSMPS type | ||
| 19 | * regulators. | ||
| 20 | * %RPMH_REGULATOR_MODE_AUTO: Auto mode in which the regulator hardware | ||
| 21 | * automatically switches between LPM and HPM based | ||
| 22 | * upon the real-time load current. This mode is | ||
| 23 | * supported by HFSMPS, BOB, and PMIC4 FTSMPS type | ||
| 24 | * regulators. | ||
