Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: dt-bindings: Convert active-semi PMIC docs to YAML schemas

Create YAML bindings for the Active-semi PMICs and remove the old text
files.

The bindings aren't perfect, for instance I couldn't find good
descriptions for the vendor properties in the "charger" node of the
ACT8945A because I am not familiar with the hardware and these
properties were not documented anywhere.

The YAML schemas are a bit different than what is described in the old
text files, because these were sometimes wrong or had missing
information. This is the case for the ACT8600 documentation, which
specified the valid node names for the regulators, while the driver was
expecting different names. This led to the current situation where we
have two different boards using different names for the regulators:
- arch/mips/boot/dts/ingenic/ci20.dts uses the names documented in the
text file,
- arch/mips/boot/dts/ingenic/gcw0.dts uses the names that the driver
expects.
In theory, the driver should be fixed to follow the documentation, and
accept both naming schemes. In practice though, when the PMIC node was
added to the ci20.dts board file, the names were already wrong in
regards to what the driver expected, so it never really worked
correctly and wasn't tested properly. Furthermore, in that board the
consumers of the regulators aren't working for various other reasons
(invalid GPIOs, etc.).

For that reason, for the ACT8600 bindings I decided to only use the node
names that the driver expects (and that gcw0.dts uses), instead of
accepting both old and new names. A follow-up patch will update the CI20
board to use the new regulator names.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221214155152.14349-1-paul@crapouillou.net
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Paul Cercueil and committed by
Mark Brown
413ec729 1b929c02

+760 -230
-117
Documentation/devicetree/bindings/regulator/act8865-regulator.txt
··· 1 - ACT88xx regulators 2 - ------------------- 3 - 4 - Required properties: 5 - - compatible: "active-semi,act8846" or "active-semi,act8865" or "active-semi,act8600" 6 - - reg: I2C slave address 7 - 8 - Optional properties: 9 - - system-power-controller: Telling whether or not this pmic is controlling 10 - the system power. See Documentation/devicetree/bindings/power/power-controller.txt . 11 - - active-semi,vsel-high: Indicates the VSEL pin is high. 12 - If this property is missing, assume the VSEL pin is low(0). 13 - 14 - Optional input supply properties: 15 - - for act8600: 16 - - vp1-supply: The input supply for DCDC_REG1 17 - - vp2-supply: The input supply for DCDC_REG2 18 - - vp3-supply: The input supply for DCDC_REG3 19 - - inl-supply: The input supply for LDO_REG5, LDO_REG6, LDO_REG7 and LDO_REG8 20 - SUDCDC_REG4, LDO_REG9 and LDO_REG10 do not have separate supplies. 21 - - for act8846: 22 - - vp1-supply: The input supply for REG1 23 - - vp2-supply: The input supply for REG2 24 - - vp3-supply: The input supply for REG3 25 - - vp4-supply: The input supply for REG4 26 - - inl1-supply: The input supply for REG5, REG6 and REG7 27 - - inl2-supply: The input supply for REG8 and LDO_REG9 28 - - inl3-supply: The input supply for REG10, REG11 and REG12 29 - - for act8865: 30 - - vp1-supply: The input supply for DCDC_REG1 31 - - vp2-supply: The input supply for DCDC_REG2 32 - - vp3-supply: The input supply for DCDC_REG3 33 - - inl45-supply: The input supply for LDO_REG1 and LDO_REG2 34 - - inl67-supply: The input supply for LDO_REG3 and LDO_REG4 35 - 36 - Any standard regulator properties can be used to configure the single regulator. 37 - regulator-initial-mode, regulator-allowed-modes and regulator-mode could be specified 38 - for act8865 using mode values from dt-bindings/regulator/active-semi,8865-regulator.h 39 - file. 40 - 41 - The valid names for regulators are: 42 - - for act8846: 43 - REG1, REG2, REG3, REG4, REG5, REG6, REG7, REG8, REG9, REG10, REG11, REG12 44 - - for act8865: 45 - DCDC_REG1, DCDC_REG2, DCDC_REG3, LDO_REG1, LDO_REG2, LDO_REG3, LDO_REG4. 46 - - for act8600: 47 - DCDC_REG1, DCDC_REG2, DCDC_REG3, SUDCDC_REG4, LDO_REG5, LDO_REG6, LDO_REG7, 48 - LDO_REG8, LDO_REG9, LDO_REG10, 49 - 50 - Example: 51 - -------- 52 - 53 - #include <dt-bindings/regulator/active-semi,8865-regulator.h> 54 - 55 - i2c1: i2c@f0018000 { 56 - pmic: act8865@5b { 57 - compatible = "active-semi,act8865"; 58 - reg = <0x5b>; 59 - active-semi,vsel-high; 60 - 61 - regulators { 62 - vcc_1v8_reg: DCDC_REG1 { 63 - regulator-name = "VCC_1V8"; 64 - regulator-min-microvolt = <1800000>; 65 - regulator-max-microvolt = <1800000>; 66 - regulator-always-on; 67 - }; 68 - 69 - vcc_1v2_reg: DCDC_REG2 { 70 - regulator-name = "VCC_1V2"; 71 - regulator-min-microvolt = <1100000>; 72 - regulator-max-microvolt = <1300000>; 73 - regulator-always-on; 74 - 75 - regulator-allowed-modes = <ACT8865_REGULATOR_MODE_FIXED>, 76 - <ACT8865_REGULATOR_MODE_LOWPOWER>; 77 - regulator-initial-mode = <ACT8865_REGULATOR_MODE_FIXED>; 78 - 79 - regulator-state-mem { 80 - regulator-on-in-suspend; 81 - regulator-suspend-min-microvolt = <1150000>; 82 - regulator-suspend-max-microvolt = <1150000>; 83 - regulator-changeable-in-suspend; 84 - regulator-mode = <ACT8865_REGULATOR_MODE_LOWPOWER>; 85 - }; 86 - }; 87 - 88 - vcc_3v3_reg: DCDC_REG3 { 89 - regulator-name = "VCC_3V3"; 90 - regulator-min-microvolt = <3300000>; 91 - regulator-max-microvolt = <3300000>; 92 - regulator-always-on; 93 - }; 94 - 95 - vddana_reg: LDO_REG1 { 96 - regulator-name = "VDDANA"; 97 - regulator-min-microvolt = <3300000>; 98 - regulator-max-microvolt = <3300000>; 99 - regulator-always-on; 100 - 101 - regulator-allowed-modes = <ACT8865_REGULATOR_MODE_NORMAL>, 102 - <ACT8865_REGULATOR_MODE_LOWPOWER>; 103 - regulator-initial-mode = <ACT8865_REGULATOR_MODE_NORMAL>; 104 - 105 - regulator-state-mem { 106 - regulator-off-in-suspend; 107 - }; 108 - }; 109 - 110 - vddfuse_reg: LDO_REG2 { 111 - regulator-name = "FUSE_2V5"; 112 - regulator-min-microvolt = <2500000>; 113 - regulator-max-microvolt = <2500000>; 114 - }; 115 - }; 116 - }; 117 - };
-113
Documentation/devicetree/bindings/regulator/act8945a-regulator.txt
··· 1 - Device-Tree bindings for regulators of Active-semi ACT8945A Multi-Function Device 2 - 3 - Required properties: 4 - - compatible: "active-semi,act8945a", please refer to ../mfd/act8945a.txt. 5 - 6 - Optional properties: 7 - - active-semi,vsel-high: Indicates if the VSEL pin is set to logic-high. 8 - If this property is missing, assume the VSEL pin is set to logic-low. 9 - 10 - Optional input supply properties: 11 - - vp1-supply: The input supply for REG_DCDC1 12 - - vp2-supply: The input supply for REG_DCDC2 13 - - vp3-supply: The input supply for REG_DCDC3 14 - - inl45-supply: The input supply for REG_LDO1 and REG_LDO2 15 - - inl67-supply: The input supply for REG_LDO3 and REG_LDO4 16 - 17 - Any standard regulator properties can be used to configure the single regulator. 18 - regulator-initial-mode, regulator-allowed-modes and regulator-mode could be 19 - specified using mode values from dt-bindings/regulator/active-semi,8945a-regulator.h 20 - file. 21 - 22 - The valid names for regulators are: 23 - REG_DCDC1, REG_DCDC2, REG_DCDC3, REG_LDO1, REG_LDO2, REG_LDO3, REG_LDO4. 24 - 25 - Example: 26 - 27 - #include <dt-bindings/regulator/active-semi,8945a-regulator.h> 28 - 29 - pmic@5b { 30 - compatible = "active-semi,act8945a"; 31 - reg = <0x5b>; 32 - 33 - active-semi,vsel-high; 34 - 35 - regulators { 36 - vdd_1v35_reg: REG_DCDC1 { 37 - regulator-name = "VDD_1V35"; 38 - regulator-min-microvolt = <1350000>; 39 - regulator-max-microvolt = <1350000>; 40 - regulator-always-on; 41 - 42 - regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>, 43 - <ACT8945A_REGULATOR_MODE_LOWPOWER>; 44 - regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>; 45 - 46 - regulator-state-mem { 47 - regulator-on-in-suspend; 48 - regulator-suspend-min-microvolt=<1400000>; 49 - regulator-suspend-max-microvolt=<1400000>; 50 - regulator-changeable-in-suspend; 51 - regulator-mode=<ACT8945A_REGULATOR_MODE_LOWPOWER>; 52 - }; 53 - }; 54 - 55 - vdd_1v2_reg: REG_DCDC2 { 56 - regulator-name = "VDD_1V2"; 57 - regulator-min-microvolt = <1100000>; 58 - regulator-max-microvolt = <1300000>; 59 - regulator-always-on; 60 - 61 - regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>, 62 - <ACT8945A_REGULATOR_MODE_LOWPOWER>; 63 - regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>; 64 - 65 - regulator-state-mem { 66 - regulator-off-in-suspend; 67 - }; 68 - }; 69 - 70 - vdd_3v3_reg: REG_DCDC3 { 71 - regulator-name = "VDD_3V3"; 72 - regulator-min-microvolt = <3300000>; 73 - regulator-max-microvolt = <3300000>; 74 - regulator-always-on; 75 - }; 76 - 77 - vdd_fuse_reg: REG_LDO1 { 78 - regulator-name = "VDD_FUSE"; 79 - regulator-min-microvolt = <2500000>; 80 - regulator-max-microvolt = <2500000>; 81 - regulator-always-on; 82 - 83 - regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>, 84 - <ACT8945A_REGULATOR_MODE_LOWPOWER>; 85 - regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>; 86 - 87 - regulator-state-mem { 88 - regulator-off-in-suspend; 89 - }; 90 - }; 91 - 92 - vdd_3v3_lp_reg: REG_LDO2 { 93 - regulator-name = "VDD_3V3_LP"; 94 - regulator-min-microvolt = <3300000>; 95 - regulator-max-microvolt = <3300000>; 96 - regulator-always-on; 97 - }; 98 - 99 - vdd_led_reg: REG_LDO3 { 100 - regulator-name = "VDD_LED"; 101 - regulator-min-microvolt = <3300000>; 102 - regulator-max-microvolt = <3300000>; 103 - regulator-always-on; 104 - }; 105 - 106 - vdd_sdhc_1v8_reg: REG_LDO4 { 107 - regulator-name = "VDD_SDHC_1V8"; 108 - regulator-min-microvolt = <1800000>; 109 - regulator-max-microvolt = <1800000>; 110 - regulator-always-on; 111 - }; 112 - }; 113 - };
+139
Documentation/devicetree/bindings/regulator/active-semi,act8600.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/active-semi,act8600.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Active-semi ACT8600 regulator 8 + 9 + maintainers: 10 + - Paul Cercueil <paul@crapouillou.net> 11 + 12 + properties: 13 + compatible: 14 + const: active-semi,act8600 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + system-power-controller: 20 + description: 21 + Indicates that the ACT8600 is responsible for powering OFF 22 + the system. 23 + type: boolean 24 + 25 + active-semi,vsel-high: 26 + description: 27 + Indicates the VSEL pin is high. If this property is missing, 28 + the VSEL pin is assumed to be low. 29 + type: boolean 30 + 31 + regulators: 32 + type: object 33 + additionalProperties: false 34 + 35 + properties: 36 + DCDC1: 37 + type: object 38 + $ref: /schemas/regulator/regulator.yaml# 39 + unevaluatedProperties: false 40 + 41 + properties: 42 + vp1-supply: 43 + description: Handle to the VP1 input supply 44 + 45 + DCDC2: 46 + type: object 47 + $ref: /schemas/regulator/regulator.yaml# 48 + unevaluatedProperties: false 49 + 50 + properties: 51 + vp2-supply: 52 + description: Handle to the VP2 input supply 53 + 54 + DCDC3: 55 + type: object 56 + $ref: /schemas/regulator/regulator.yaml# 57 + unevaluatedProperties: false 58 + 59 + properties: 60 + vp3-supply: 61 + description: Handle to the VP3 input supply 62 + 63 + patternProperties: 64 + "^(SUDCDC_REG4|LDO_REG9|LDO_REG10)$": 65 + type: object 66 + $ref: /schemas/regulator/regulator.yaml# 67 + unevaluatedProperties: false 68 + 69 + "^LDO[5-8]$": 70 + type: object 71 + $ref: /schemas/regulator/regulator.yaml# 72 + unevaluatedProperties: false 73 + 74 + properties: 75 + inl-supply: 76 + description: Handle to the INL input supply 77 + 78 + additionalProperties: false 79 + 80 + required: 81 + - reg 82 + - compatible 83 + - regulators 84 + 85 + examples: 86 + - | 87 + i2c { 88 + #address-cells = <1>; 89 + #size-cells = <0>; 90 + 91 + pmic@5a { 92 + compatible = "active-semi,act8600"; 93 + reg = <0x5a>; 94 + 95 + regulators { 96 + SUDCDC_REG4 { 97 + regulator-min-microvolt = <5300000>; 98 + regulator-max-microvolt = <5300000>; 99 + inl-supply = <&vcc>; 100 + }; 101 + 102 + LDO5 { 103 + regulator-min-microvolt = <2500000>; 104 + regulator-max-microvolt = <2500000>; 105 + inl-supply = <&vcc>; 106 + }; 107 + 108 + LDO6 { 109 + regulator-min-microvolt = <3300000>; 110 + regulator-max-microvolt = <3300000>; 111 + inl-supply = <&vcc>; 112 + }; 113 + 114 + LDO7 { 115 + regulator-min-microvolt = <3300000>; 116 + regulator-max-microvolt = <3300000>; 117 + inl-supply = <&vcc>; 118 + }; 119 + 120 + LDO8 { 121 + regulator-min-microvolt = <1800000>; 122 + regulator-max-microvolt = <1800000>; 123 + regulator-always-on; 124 + inl-supply = <&vcc>; 125 + }; 126 + 127 + LDO_REG9 { 128 + regulator-min-microvolt = <3300000>; 129 + regulator-max-microvolt = <3300000>; 130 + regulator-always-on; 131 + inl-supply = <&vcc>; 132 + }; 133 + 134 + LDO_REG10 { 135 + inl-supply = <&vcc>; 136 + }; 137 + }; 138 + }; 139 + };
+205
Documentation/devicetree/bindings/regulator/active-semi,act8846.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/active-semi,act8846.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Active-semi ACT8846 regulator 8 + 9 + maintainers: 10 + - Paul Cercueil <paul@crapouillou.net> 11 + 12 + properties: 13 + compatible: 14 + const: active-semi,act8846 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + system-power-controller: 20 + description: 21 + Indicates that the ACT8846 is responsible for powering OFF 22 + the system. 23 + type: boolean 24 + 25 + active-semi,vsel-high: 26 + description: 27 + Indicates the VSEL pin is high. If this property is missing, 28 + the VSEL pin is assumed to be low. 29 + type: boolean 30 + 31 + regulators: 32 + type: object 33 + additionalProperties: false 34 + 35 + properties: 36 + REG1: 37 + type: object 38 + $ref: /schemas/regulator/regulator.yaml# 39 + unevaluatedProperties: false 40 + 41 + properties: 42 + vp1-supply: 43 + description: Handle to the VP1 input supply 44 + 45 + REG2: 46 + type: object 47 + $ref: /schemas/regulator/regulator.yaml# 48 + unevaluatedProperties: false 49 + 50 + properties: 51 + vp2-supply: 52 + description: Handle to the VP2 input supply 53 + 54 + REG3: 55 + type: object 56 + $ref: /schemas/regulator/regulator.yaml# 57 + unevaluatedProperties: false 58 + 59 + properties: 60 + vp3-supply: 61 + description: Handle to the VP3 input supply 62 + 63 + REG4: 64 + type: object 65 + $ref: /schemas/regulator/regulator.yaml# 66 + unevaluatedProperties: false 67 + 68 + properties: 69 + vp4-supply: 70 + description: Handle to the VP4 input supply 71 + 72 + patternProperties: 73 + "^REG[5-7]$": 74 + type: object 75 + $ref: /schemas/regulator/regulator.yaml# 76 + unevaluatedProperties: false 77 + 78 + properties: 79 + inl1-supply: 80 + description: Handle to the INL1 input supply 81 + 82 + "^REG[8-9]$": 83 + type: object 84 + $ref: /schemas/regulator/regulator.yaml# 85 + unevaluatedProperties: false 86 + 87 + properties: 88 + inl2-supply: 89 + description: Handle to the INL2 input supply 90 + 91 + "^REG1[0-2]$": 92 + type: object 93 + $ref: /schemas/regulator/regulator.yaml# 94 + unevaluatedProperties: false 95 + 96 + properties: 97 + inl3-supply: 98 + description: Handle to the INL3 input supply 99 + 100 + additionalProperties: false 101 + 102 + required: 103 + - reg 104 + - compatible 105 + - regulators 106 + 107 + examples: 108 + - | 109 + i2c { 110 + #address-cells = <1>; 111 + #size-cells = <0>; 112 + 113 + pmic@5a { 114 + compatible = "active-semi,act8846"; 115 + reg = <0x5a>; 116 + 117 + system-power-controller; 118 + 119 + regulators { 120 + REG1 { 121 + regulator-name = "VCC_DDR"; 122 + regulator-min-microvolt = <1200000>; 123 + regulator-max-microvolt = <1200000>; 124 + regulator-always-on; 125 + }; 126 + 127 + REG2 { 128 + regulator-name = "VCC_IO"; 129 + regulator-min-microvolt = <3300000>; 130 + regulator-max-microvolt = <3300000>; 131 + regulator-always-on; 132 + }; 133 + 134 + REG3 { 135 + regulator-name = "VDD_LOG"; 136 + regulator-min-microvolt = <1000000>; 137 + regulator-max-microvolt = <1000000>; 138 + regulator-always-on; 139 + }; 140 + 141 + REG4 { 142 + regulator-name = "VCC_20"; 143 + regulator-min-microvolt = <2000000>; 144 + regulator-max-microvolt = <2000000>; 145 + regulator-always-on; 146 + }; 147 + 148 + REG5 { 149 + regulator-name = "VCCIO_SD"; 150 + regulator-min-microvolt = <3300000>; 151 + regulator-max-microvolt = <3300000>; 152 + regulator-always-on; 153 + }; 154 + 155 + REG6 { 156 + regulator-name = "VDD10_LCD"; 157 + regulator-min-microvolt = <1000000>; 158 + regulator-max-microvolt = <1000000>; 159 + regulator-always-on; 160 + }; 161 + 162 + REG7 { 163 + regulator-name = "VCC_WL"; 164 + regulator-min-microvolt = <3300000>; 165 + regulator-max-microvolt = <3300000>; 166 + regulator-always-on; 167 + }; 168 + 169 + REG8 { 170 + regulator-name = "VCCA_33"; 171 + regulator-min-microvolt = <3300000>; 172 + regulator-max-microvolt = <3300000>; 173 + regulator-always-on; 174 + }; 175 + 176 + REG9 { 177 + regulator-name = "VCC_LAN"; 178 + regulator-min-microvolt = <3300000>; 179 + regulator-max-microvolt = <3300000>; 180 + regulator-always-on; 181 + }; 182 + 183 + REG10 { 184 + regulator-name = "VDD_10"; 185 + regulator-min-microvolt = <1000000>; 186 + regulator-max-microvolt = <1000000>; 187 + regulator-always-on; 188 + }; 189 + 190 + REG11 { 191 + regulator-name = "VCC_18"; 192 + regulator-min-microvolt = <1800000>; 193 + regulator-max-microvolt = <1800000>; 194 + regulator-always-on; 195 + }; 196 + 197 + REG12 { 198 + regulator-name = "VCC18_LCD"; 199 + regulator-min-microvolt = <1800000>; 200 + regulator-max-microvolt = <1800000>; 201 + regulator-always-on; 202 + }; 203 + }; 204 + }; 205 + };
+158
Documentation/devicetree/bindings/regulator/active-semi,act8865.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/active-semi,act8865.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Active-semi ACT8865 regulator 8 + 9 + maintainers: 10 + - Paul Cercueil <paul@crapouillou.net> 11 + 12 + properties: 13 + compatible: 14 + const: active-semi,act8865 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + system-power-controller: 20 + description: 21 + Indicates that the ACT8865 is responsible for powering OFF 22 + the system. 23 + type: boolean 24 + 25 + active-semi,vsel-high: 26 + description: 27 + Indicates the VSEL pin is high. If this property is missing, 28 + the VSEL pin is assumed to be low. 29 + type: boolean 30 + 31 + regulators: 32 + type: object 33 + additionalProperties: false 34 + 35 + properties: 36 + DCDC_REG1: 37 + type: object 38 + $ref: /schemas/regulator/regulator.yaml# 39 + unevaluatedProperties: false 40 + 41 + properties: 42 + vp1-supply: 43 + description: Handle to the VP1 input supply 44 + 45 + DCDC_REG2: 46 + type: object 47 + $ref: /schemas/regulator/regulator.yaml# 48 + unevaluatedProperties: false 49 + 50 + properties: 51 + vp2-supply: 52 + description: Handle to the VP2 input supply 53 + 54 + DCDC_REG3: 55 + type: object 56 + $ref: /schemas/regulator/regulator.yaml# 57 + unevaluatedProperties: false 58 + 59 + properties: 60 + vp3-supply: 61 + description: Handle to the VP3 input supply 62 + 63 + patternProperties: 64 + "^LDO_REG[1-2]$": 65 + type: object 66 + $ref: /schemas/regulator/regulator.yaml# 67 + unevaluatedProperties: false 68 + 69 + properties: 70 + inl45-supply: 71 + description: Handle to the INL45 input supply 72 + 73 + "^LDO_REG[3-4]$": 74 + type: object 75 + $ref: /schemas/regulator/regulator.yaml# 76 + unevaluatedProperties: false 77 + 78 + properties: 79 + inl67-supply: 80 + description: Handle to the INL67 input supply 81 + 82 + additionalProperties: false 83 + 84 + required: 85 + - reg 86 + - compatible 87 + - regulators 88 + 89 + examples: 90 + - | 91 + #include <dt-bindings/regulator/active-semi,8865-regulator.h> 92 + 93 + i2c1 { 94 + #address-cells = <1>; 95 + #size-cells = <0>; 96 + 97 + pmic@5b { 98 + compatible = "active-semi,act8865"; 99 + reg = <0x5b>; 100 + active-semi,vsel-high; 101 + 102 + regulators { 103 + DCDC_REG1 { 104 + regulator-name = "VCC_1V8"; 105 + regulator-min-microvolt = <1800000>; 106 + regulator-max-microvolt = <1800000>; 107 + regulator-always-on; 108 + }; 109 + 110 + DCDC_REG2 { 111 + regulator-name = "VCC_1V2"; 112 + regulator-min-microvolt = <1100000>; 113 + regulator-max-microvolt = <1300000>; 114 + regulator-always-on; 115 + 116 + regulator-allowed-modes = <ACT8865_REGULATOR_MODE_FIXED>, 117 + <ACT8865_REGULATOR_MODE_LOWPOWER>; 118 + regulator-initial-mode = <ACT8865_REGULATOR_MODE_FIXED>; 119 + 120 + regulator-state-mem { 121 + regulator-on-in-suspend; 122 + regulator-suspend-min-microvolt = <1150000>; 123 + regulator-suspend-max-microvolt = <1150000>; 124 + regulator-changeable-in-suspend; 125 + regulator-mode = <ACT8865_REGULATOR_MODE_LOWPOWER>; 126 + }; 127 + }; 128 + 129 + DCDC_REG3 { 130 + regulator-name = "VCC_3V3"; 131 + regulator-min-microvolt = <3300000>; 132 + regulator-max-microvolt = <3300000>; 133 + regulator-always-on; 134 + }; 135 + 136 + LDO_REG1 { 137 + regulator-name = "VDDANA"; 138 + regulator-min-microvolt = <3300000>; 139 + regulator-max-microvolt = <3300000>; 140 + regulator-always-on; 141 + 142 + regulator-allowed-modes = <ACT8865_REGULATOR_MODE_NORMAL>, 143 + <ACT8865_REGULATOR_MODE_LOWPOWER>; 144 + regulator-initial-mode = <ACT8865_REGULATOR_MODE_NORMAL>; 145 + 146 + regulator-state-mem { 147 + regulator-off-in-suspend; 148 + }; 149 + }; 150 + 151 + LDO_REG2 { 152 + regulator-name = "FUSE_2V5"; 153 + regulator-min-microvolt = <2500000>; 154 + regulator-max-microvolt = <2500000>; 155 + }; 156 + }; 157 + }; 158 + };
+258
Documentation/devicetree/bindings/regulator/active-semi,act8945a.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/active-semi,act8945a.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Active-semi ACT8945a regulator 8 + 9 + maintainers: 10 + - Paul Cercueil <paul@crapouillou.net> 11 + 12 + properties: 13 + compatible: 14 + const: active-semi,act8945a 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + system-power-controller: 20 + description: 21 + Indicates that the ACT8945a is responsible for powering OFF 22 + the system. 23 + type: boolean 24 + 25 + active-semi,vsel-high: 26 + description: 27 + Indicates the VSEL pin is high. If this property is missing, 28 + the VSEL pin is assumed to be low. 29 + type: boolean 30 + 31 + regulators: 32 + type: object 33 + additionalProperties: false 34 + 35 + properties: 36 + REG_DCDC1: 37 + type: object 38 + $ref: /schemas/regulator/regulator.yaml# 39 + unevaluatedProperties: false 40 + 41 + properties: 42 + vp1-supply: 43 + description: Handle to the VP1 input supply 44 + 45 + REG_DCDC2: 46 + type: object 47 + $ref: /schemas/regulator/regulator.yaml# 48 + unevaluatedProperties: false 49 + 50 + properties: 51 + vp2-supply: 52 + description: Handle to the VP2 input supply 53 + 54 + REG_DCDC3: 55 + type: object 56 + $ref: /schemas/regulator/regulator.yaml# 57 + unevaluatedProperties: false 58 + 59 + properties: 60 + vp3-supply: 61 + description: Handle to the VP3 input supply 62 + 63 + patternProperties: 64 + "^REG_LDO[1-2]$": 65 + type: object 66 + $ref: /schemas/regulator/regulator.yaml# 67 + unevaluatedProperties: false 68 + 69 + properties: 70 + inl45-supply: 71 + description: Handle to the INL45 input supply 72 + 73 + "^REG_LDO[3-4]$": 74 + type: object 75 + $ref: /schemas/regulator/regulator.yaml# 76 + unevaluatedProperties: false 77 + 78 + properties: 79 + inl67-supply: 80 + description: Handle to the INL67 input supply 81 + 82 + charger: 83 + type: object 84 + additionalProperties: false 85 + 86 + properties: 87 + compatible: 88 + const: active-semi,act8945a-charger 89 + 90 + interrupts: 91 + maxItems: 1 92 + 93 + active-semi,chglev-gpios: 94 + description: CGHLEV GPIO 95 + maxItems: 1 96 + 97 + active-semi,lbo-gpios: 98 + description: LBO GPIO 99 + maxItems: 1 100 + 101 + active-semi,input-voltage-threshold-microvolt: 102 + description: Input voltage threshold 103 + maxItems: 1 104 + 105 + active-semi,precondition-timeout: 106 + description: Precondition timeout 107 + $ref: /schemas/types.yaml#/definitions/uint32 108 + 109 + active-semi,total-timeout: 110 + description: Total timeout 111 + $ref: /schemas/types.yaml#/definitions/uint32 112 + 113 + required: 114 + - compatible 115 + - interrupts 116 + 117 + additionalProperties: false 118 + 119 + required: 120 + - reg 121 + - compatible 122 + - regulators 123 + 124 + examples: 125 + - | 126 + #include <dt-bindings/gpio/gpio.h> 127 + #include <dt-bindings/interrupt-controller/irq.h> 128 + #include <dt-bindings/mfd/atmel-flexcom.h> 129 + #include <dt-bindings/regulator/active-semi,8945a-regulator.h> 130 + 131 + i2c { 132 + #address-cells = <1>; 133 + #size-cells = <0>; 134 + 135 + pmic@5b { 136 + compatible = "active-semi,act8945a"; 137 + reg = <0x5b>; 138 + active-semi,vsel-high; 139 + 140 + regulators { 141 + REG_DCDC1 { 142 + regulator-name = "VDD_1V35"; 143 + regulator-min-microvolt = <1350000>; 144 + regulator-max-microvolt = <1350000>; 145 + regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>, 146 + <ACT8945A_REGULATOR_MODE_LOWPOWER>; 147 + regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>; 148 + regulator-always-on; 149 + 150 + regulator-state-mem { 151 + regulator-on-in-suspend; 152 + regulator-suspend-min-microvolt = <1400000>; 153 + regulator-suspend-max-microvolt = <1400000>; 154 + regulator-changeable-in-suspend; 155 + regulator-mode = <ACT8945A_REGULATOR_MODE_LOWPOWER>; 156 + }; 157 + }; 158 + 159 + REG_DCDC2 { 160 + regulator-name = "VDD_1V2"; 161 + regulator-min-microvolt = <1100000>; 162 + regulator-max-microvolt = <1300000>; 163 + regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>, 164 + <ACT8945A_REGULATOR_MODE_LOWPOWER>; 165 + regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>; 166 + regulator-always-on; 167 + 168 + regulator-state-mem { 169 + regulator-off-in-suspend; 170 + }; 171 + }; 172 + 173 + REG_DCDC3 { 174 + regulator-name = "VDD_3V3"; 175 + regulator-min-microvolt = <3300000>; 176 + regulator-max-microvolt = <3300000>; 177 + regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>, 178 + <ACT8945A_REGULATOR_MODE_LOWPOWER>; 179 + regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>; 180 + regulator-always-on; 181 + 182 + regulator-state-mem { 183 + regulator-off-in-suspend; 184 + }; 185 + }; 186 + 187 + REG_LDO1 { 188 + regulator-name = "VDD_FUSE"; 189 + regulator-min-microvolt = <2500000>; 190 + regulator-max-microvolt = <2500000>; 191 + regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>, 192 + <ACT8945A_REGULATOR_MODE_LOWPOWER>; 193 + regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>; 194 + regulator-always-on; 195 + 196 + regulator-state-mem { 197 + regulator-off-in-suspend; 198 + }; 199 + }; 200 + 201 + REG_LDO2 { 202 + regulator-name = "VDD_3V3_LP"; 203 + regulator-min-microvolt = <3300000>; 204 + regulator-max-microvolt = <3300000>; 205 + regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>, 206 + <ACT8945A_REGULATOR_MODE_LOWPOWER>; 207 + regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>; 208 + regulator-always-on; 209 + 210 + regulator-state-mem { 211 + regulator-off-in-suspend; 212 + }; 213 + }; 214 + 215 + REG_LDO3 { 216 + regulator-name = "VDD_LED"; 217 + regulator-min-microvolt = <3300000>; 218 + regulator-max-microvolt = <3300000>; 219 + regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>, 220 + <ACT8945A_REGULATOR_MODE_LOWPOWER>; 221 + regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>; 222 + regulator-always-on; 223 + 224 + regulator-state-mem { 225 + regulator-off-in-suspend; 226 + }; 227 + }; 228 + 229 + REG_LDO4 { 230 + regulator-name = "VDD_SDHC_1V8"; 231 + regulator-min-microvolt = <1800000>; 232 + regulator-max-microvolt = <1800000>; 233 + regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>, 234 + <ACT8945A_REGULATOR_MODE_LOWPOWER>; 235 + regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>; 236 + regulator-always-on; 237 + 238 + regulator-state-mem { 239 + regulator-off-in-suspend; 240 + }; 241 + }; 242 + }; 243 + 244 + charger { 245 + compatible = "active-semi,act8945a-charger"; 246 + pinctrl-names = "default"; 247 + pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>; 248 + interrupt-parent = <&pioA>; 249 + interrupts = <45 IRQ_TYPE_EDGE_RISING>; 250 + 251 + active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>; 252 + active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>; 253 + active-semi,input-voltage-threshold-microvolt = <6600>; 254 + active-semi,precondition-timeout = <40>; 255 + active-semi,total-timeout = <3>; 256 + }; 257 + }; 258 + };