1# SPDX-License-Identifier: GPL-2.0-only 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mfd/samsung,s2mps11.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Samsung S2MPS11/13/14/15 and S2MPU02 Power Management IC 8 9maintainers: 10 - Krzysztof Kozlowski <krzk@kernel.org> 11 12description: | 13 This is a part of device tree bindings for S2M and S5M family of Power 14 Management IC (PMIC). 15 16 The Samsung S2MPS11/13/14/15 and S2MPU02 is a family of Power Management IC 17 which include voltage and current regulators, RTC, clock outputs and other 18 sub-blocks. 19 20properties: 21 compatible: 22 enum: 23 - samsung,s2mpg10-pmic 24 - samsung,s2mps11-pmic 25 - samsung,s2mps13-pmic 26 - samsung,s2mps14-pmic 27 - samsung,s2mps15-pmic 28 - samsung,s2mpu02-pmic 29 - samsung,s2mpu05-pmic 30 31 clocks: 32 $ref: /schemas/clock/samsung,s2mps11.yaml 33 description: 34 Child node describing clock provider. 35 36 interrupts: 37 maxItems: 1 38 39 reg: 40 maxItems: 1 41 42 regulators: 43 type: object 44 description: 45 List of child nodes that specify the regulators. 46 47 samsung,s2mps11-acokb-ground: 48 description: | 49 Indicates that ACOKB pin of S2MPS11 PMIC is connected to the ground so 50 the PMIC must manually set PWRHOLD bit in CTRL1 register to turn off the 51 power. Usually the ACOKB is pulled up to VBATT so when PWRHOLD pin goes 52 low, the rising ACOKB will trigger power off. 53 type: boolean 54 55 samsung,s2mps11-wrstbi-ground: 56 description: | 57 Indicates that WRSTBI pin of PMIC is pulled down. When the system is 58 suspended it will always go down thus triggering unwanted buck warm 59 reset (setting buck voltages to default values). 60 type: boolean 61 62 system-power-controller: true 63 64 wakeup-source: true 65 66required: 67 - compatible 68 - regulators 69 70additionalProperties: false 71 72allOf: 73 - if: 74 properties: 75 compatible: 76 contains: 77 const: samsung,s2mpg10-pmic 78 then: 79 properties: 80 reg: false 81 samsung,s2mps11-acokb-ground: false 82 samsung,s2mps11-wrstbi-ground: false 83 84 # oneOf is required, because dtschema's fixups.py doesn't handle this 85 # nesting here. Its special treatment to allow either interrupt property 86 # when only one is specified in the binding works at the top level only. 87 oneOf: 88 - required: [interrupts] 89 - required: [interrupts-extended] 90 91 else: 92 properties: 93 system-power-controller: false 94 95 required: 96 - reg 97 98 - if: 99 properties: 100 compatible: 101 contains: 102 const: samsung,s2mps11-pmic 103 then: 104 properties: 105 regulators: 106 $ref: /schemas/regulator/samsung,s2mps11.yaml 107 samsung,s2mps11-wrstbi-ground: false 108 109 - if: 110 properties: 111 compatible: 112 contains: 113 const: samsung,s2mps13-pmic 114 then: 115 properties: 116 regulators: 117 $ref: /schemas/regulator/samsung,s2mps13.yaml 118 samsung,s2mps11-acokb-ground: false 119 120 - if: 121 properties: 122 compatible: 123 contains: 124 const: samsung,s2mps14-pmic 125 then: 126 properties: 127 regulators: 128 $ref: /schemas/regulator/samsung,s2mps14.yaml 129 samsung,s2mps11-acokb-ground: false 130 samsung,s2mps11-wrstbi-ground: false 131 132 - if: 133 properties: 134 compatible: 135 contains: 136 const: samsung,s2mps15-pmic 137 then: 138 properties: 139 regulators: 140 $ref: /schemas/regulator/samsung,s2mps15.yaml 141 samsung,s2mps11-acokb-ground: false 142 samsung,s2mps11-wrstbi-ground: false 143 144 - if: 145 properties: 146 compatible: 147 contains: 148 const: samsung,s2mpu02-pmic 149 then: 150 properties: 151 regulators: 152 $ref: /schemas/regulator/samsung,s2mpu02.yaml 153 samsung,s2mps11-acokb-ground: false 154 samsung,s2mps11-wrstbi-ground: false 155 156 - if: 157 properties: 158 compatible: 159 contains: 160 const: samsung,s2mpu05-pmic 161 then: 162 properties: 163 regulators: 164 $ref: /schemas/regulator/samsung,s2mpu05.yaml 165 samsung,s2mps11-acokb-ground: false 166 samsung,s2mps11-wrstbi-ground: false 167 168examples: 169 - | 170 #include <dt-bindings/interrupt-controller/irq.h> 171 172 i2c { 173 #address-cells = <1>; 174 #size-cells = <0>; 175 176 pmic@66 { 177 compatible = "samsung,s2mps11-pmic"; 178 reg = <0x66>; 179 180 interrupt-parent = <&gpx0>; 181 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 182 pinctrl-names = "default"; 183 pinctrl-0 = <&s2mps11_irq>; 184 samsung,s2mps11-acokb-ground; 185 wakeup-source; 186 187 clocks { 188 compatible = "samsung,s2mps11-clk"; 189 #clock-cells = <1>; 190 clock-output-names = "s2mps11_ap", "s2mps11_cp", "s2mps11_bt"; 191 }; 192 193 regulators { 194 LDO1 { 195 regulator-name = "vdd_ldo1"; 196 regulator-min-microvolt = <1000000>; 197 regulator-max-microvolt = <1000000>; 198 regulator-always-on; 199 }; 200 201 LDO4 { 202 regulator-name = "vdd_adc"; 203 regulator-min-microvolt = <1800000>; 204 regulator-max-microvolt = <1800000>; 205 206 regulator-state-mem { 207 regulator-off-in-suspend; 208 }; 209 }; 210 211 // .... 212 213 BUCK1 { 214 regulator-name = "vdd_mif"; 215 regulator-min-microvolt = <800000>; 216 regulator-max-microvolt = <1300000>; 217 regulator-always-on; 218 regulator-boot-on; 219 220 regulator-state-mem { 221 regulator-off-in-suspend; 222 }; 223 }; 224 225 BUCK2 { 226 regulator-name = "vdd_arm"; 227 regulator-min-microvolt = <800000>; 228 regulator-max-microvolt = <1500000>; 229 regulator-always-on; 230 regulator-boot-on; 231 regulator-coupled-with = <&buck3_reg>; 232 regulator-coupled-max-spread = <300000>; 233 234 regulator-state-mem { 235 regulator-off-in-suspend; 236 }; 237 }; 238 239 BUCK3 { 240 regulator-name = "vdd_int"; 241 regulator-min-microvolt = <800000>; 242 regulator-max-microvolt = <1400000>; 243 regulator-always-on; 244 regulator-boot-on; 245 regulator-coupled-with = <&buck2_reg>; 246 regulator-coupled-max-spread = <300000>; 247 248 regulator-state-mem { 249 regulator-off-in-suspend; 250 }; 251 }; 252 253 // ... 254 }; 255 }; 256 }; 257 258 - | 259 #include <dt-bindings/interrupt-controller/irq.h> 260 261 i2c { 262 #address-cells = <1>; 263 #size-cells = <0>; 264 265 pmic@66 { 266 compatible = "samsung,s2mps14-pmic"; 267 reg = <0x66>; 268 269 interrupt-parent = <&gpx0>; 270 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 271 wakeup-source; 272 273 clocks { 274 compatible = "samsung,s2mps14-clk"; 275 #clock-cells = <1>; 276 clock-output-names = "s2mps14_ap", "unused", "s2mps14_bt"; 277 }; 278 279 regulators { 280 LDO1 { 281 regulator-name = "VLDO1_1.0V"; 282 regulator-min-microvolt = <1000000>; 283 regulator-max-microvolt = <1000000>; 284 regulator-always-on; 285 286 regulator-state-mem { 287 regulator-on-in-suspend; 288 }; 289 }; 290 291 // ... 292 293 BUCK1 { 294 regulator-name = "VBUCK1_1.0V"; 295 regulator-min-microvolt = <800000>; 296 regulator-max-microvolt = <1000000>; 297 regulator-always-on; 298 299 regulator-state-mem { 300 regulator-off-in-suspend; 301 }; 302 }; 303 304 // ... 305 }; 306 }; 307 }; 308