1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mfd/rockchip,rk817.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: RK817 Power Management Integrated Circuit 8 9maintainers: 10 - Chris Zhong <zyw@rock-chips.com> 11 - Zhang Qing <zhangqing@rock-chips.com> 12 13description: | 14 Rockchip RK817 series PMIC. This device consists of an i2c controlled MFD 15 that includes regulators, an RTC, a power button, an audio codec, and a 16 battery charger manager. 17 18properties: 19 compatible: 20 enum: 21 - rockchip,rk817 22 23 reg: 24 maxItems: 1 25 26 interrupts: 27 maxItems: 1 28 29 '#clock-cells': 30 description: 31 See <dt-bindings/clock/rockchip,rk808.h> for clock IDs. 32 minimum: 0 33 maximum: 1 34 35 clock-output-names: 36 description: 37 From common clock binding to override the default output clock name. 38 39 rockchip,system-power-controller: 40 type: boolean 41 deprecated: true 42 description: 43 Telling whether or not this PMIC is controlling the system power. 44 45 system-power-controller: true 46 47 wakeup-source: 48 type: boolean 49 description: 50 Device can be used as a wakeup source. 51 52 vcc1-supply: 53 description: 54 The input supply for DCDC_REG1. 55 56 vcc2-supply: 57 description: 58 The input supply for DCDC_REG2. 59 60 vcc3-supply: 61 description: 62 The input supply for DCDC_REG3. 63 64 vcc4-supply: 65 description: 66 The input supply for DCDC_REG4. 67 68 vcc5-supply: 69 description: 70 The input supply for LDO_REG1, LDO_REG2, and LDO_REG3. 71 72 vcc6-supply: 73 description: 74 The input supply for LDO_REG4, LDO_REG5, and LDO_REG6. 75 76 vcc7-supply: 77 description: 78 The input supply for LDO_REG7, LDO_REG8, and LDO_REG9. 79 80 vcc8-supply: 81 description: 82 The input supply for BOOST. 83 84 vcc9-supply: 85 description: 86 The input supply for OTG_SWITCH. 87 88 regulators: 89 type: object 90 patternProperties: 91 "^(LDO_REG[1-9]|DCDC_REG[1-4]|BOOST|OTG_SWITCH)$": 92 type: object 93 unevaluatedProperties: false 94 $ref: ../regulator/regulator.yaml# 95 unevaluatedProperties: false 96 97 clocks: 98 description: 99 The input clock for the audio codec. 100 101 clock-names: 102 description: 103 The clock name for the codec clock. 104 items: 105 - const: mclk 106 107 '#sound-dai-cells': 108 description: 109 Needed for the interpretation of sound dais. 110 const: 0 111 112 codec: 113 description: | 114 The child node for the codec to hold additional properties. If no 115 additional properties are required for the codec, this node can be 116 omitted. 117 type: object 118 additionalProperties: false 119 properties: 120 rockchip,mic-in-differential: 121 type: boolean 122 description: 123 Describes if the microphone uses differential mode. 124 125 charger: 126 description: | 127 The child node for the charger to hold additional properties. If a 128 battery is not in use, this node can be omitted. 129 type: object 130 $ref: /schemas/power/supply/power-supply.yaml 131 132 properties: 133 monitored-battery: 134 description: | 135 A phandle to a monitored battery node that contains a valid 136 value for: 137 charge-full-design-microamp-hours, 138 charge-term-current-microamp, 139 constant-charge-current-max-microamp, 140 constant-charge-voltage-max-microvolt, 141 voltage-max-design-microvolt, 142 voltage-min-design-microvolt, 143 and a valid ocv-capacity table. 144 145 rockchip,resistor-sense-micro-ohms: 146 description: | 147 Value in microohms of the battery sense resistor. This value is 148 used by the driver to set the correct divisor value to translate 149 ADC readings into the proper units of measure. 150 enum: [10000, 20000] 151 152 rockchip,sleep-enter-current-microamp: 153 description: | 154 Value in microamps of the sleep enter current for the charger. 155 Value is used by the driver to calibrate the relax threshold. 156 157 rockchip,sleep-filter-current-microamp: 158 description: 159 Value in microamps of the sleep filter current for the charger. 160 Value is used by the driver to derive the sleep sample current. 161 162 required: 163 - monitored-battery 164 - rockchip,resistor-sense-micro-ohms 165 - rockchip,sleep-enter-current-microamp 166 - rockchip,sleep-filter-current-microamp 167 168 additionalProperties: false 169 170allOf: 171 - if: 172 properties: 173 '#clock-cells': 174 const: 0 175 176 then: 177 properties: 178 clock-output-names: 179 maxItems: 1 180 181 else: 182 properties: 183 clock-output-names: 184 maxItems: 2 185 186required: 187 - compatible 188 - reg 189 - interrupts 190 - "#clock-cells" 191 192additionalProperties: false 193 194examples: 195 - | 196 #include <dt-bindings/clock/px30-cru.h> 197 #include <dt-bindings/pinctrl/rockchip.h> 198 #include <dt-bindings/interrupt-controller/irq.h> 199 #include <dt-bindings/gpio/gpio.h> 200 i2c { 201 #address-cells = <1>; 202 #size-cells = <0>; 203 204 rk817: pmic@20 { 205 compatible = "rockchip,rk817"; 206 reg = <0x20>; 207 interrupt-parent = <&gpio0>; 208 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>; 209 clock-output-names = "rk808-clkout1", "xin32k"; 210 clock-names = "mclk"; 211 clocks = <&cru SCLK_I2S1_OUT>; 212 pinctrl-names = "default"; 213 pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; 214 wakeup-source; 215 #clock-cells = <1>; 216 #sound-dai-cells = <0>; 217 218 vcc1-supply = <&vccsys>; 219 vcc2-supply = <&vccsys>; 220 vcc3-supply = <&vccsys>; 221 vcc4-supply = <&vccsys>; 222 vcc5-supply = <&vccsys>; 223 vcc6-supply = <&vccsys>; 224 vcc7-supply = <&vccsys>; 225 226 regulators { 227 vdd_logic: DCDC_REG1 { 228 regulator-name = "vdd_logic"; 229 regulator-min-microvolt = <950000>; 230 regulator-max-microvolt = <1150000>; 231 regulator-ramp-delay = <6001>; 232 regulator-always-on; 233 regulator-boot-on; 234 235 regulator-state-mem { 236 regulator-on-in-suspend; 237 regulator-suspend-microvolt = <950000>; 238 }; 239 }; 240 241 vdd_arm: DCDC_REG2 { 242 regulator-name = "vdd_arm"; 243 regulator-min-microvolt = <950000>; 244 regulator-max-microvolt = <1350000>; 245 regulator-ramp-delay = <6001>; 246 regulator-always-on; 247 regulator-boot-on; 248 249 regulator-state-mem { 250 regulator-off-in-suspend; 251 regulator-suspend-microvolt = <950000>; 252 }; 253 }; 254 255 vcc_ddr: DCDC_REG3 { 256 regulator-name = "vcc_ddr"; 257 regulator-always-on; 258 regulator-boot-on; 259 260 regulator-state-mem { 261 regulator-on-in-suspend; 262 }; 263 }; 264 265 vcc_3v3: DCDC_REG4 { 266 regulator-name = "vcc_3v3"; 267 regulator-min-microvolt = <3300000>; 268 regulator-max-microvolt = <3300000>; 269 regulator-always-on; 270 regulator-boot-on; 271 272 regulator-state-mem { 273 regulator-off-in-suspend; 274 regulator-suspend-microvolt = <3300000>; 275 }; 276 }; 277 278 vcc_1v8: LDO_REG2 { 279 regulator-name = "vcc_1v8"; 280 regulator-min-microvolt = <1800000>; 281 regulator-max-microvolt = <1800000>; 282 regulator-always-on; 283 regulator-boot-on; 284 285 regulator-state-mem { 286 regulator-on-in-suspend; 287 regulator-suspend-microvolt = <1800000>; 288 }; 289 }; 290 291 vdd_1v0: LDO_REG3 { 292 regulator-name = "vdd_1v0"; 293 regulator-min-microvolt = <1000000>; 294 regulator-max-microvolt = <1000000>; 295 regulator-always-on; 296 regulator-boot-on; 297 298 regulator-state-mem { 299 regulator-on-in-suspend; 300 regulator-suspend-microvolt = <1000000>; 301 }; 302 }; 303 304 vcc3v3_pmu: LDO_REG4 { 305 regulator-name = "vcc3v3_pmu"; 306 regulator-min-microvolt = <3300000>; 307 regulator-max-microvolt = <3300000>; 308 regulator-always-on; 309 regulator-boot-on; 310 311 regulator-state-mem { 312 regulator-on-in-suspend; 313 regulator-suspend-microvolt = <3300000>; 314 }; 315 }; 316 317 vccio_sd: LDO_REG5 { 318 regulator-name = "vccio_sd"; 319 regulator-min-microvolt = <1800000>; 320 regulator-max-microvolt = <3300000>; 321 regulator-always-on; 322 regulator-boot-on; 323 324 regulator-state-mem { 325 regulator-on-in-suspend; 326 regulator-suspend-microvolt = <3300000>; 327 }; 328 }; 329 330 vcc_sd: LDO_REG6 { 331 regulator-name = "vcc_sd"; 332 regulator-min-microvolt = <3300000>; 333 regulator-max-microvolt = <3300000>; 334 regulator-boot-on; 335 336 regulator-state-mem { 337 regulator-on-in-suspend; 338 regulator-suspend-microvolt = <3300000>; 339 }; 340 }; 341 342 vcc_bl: LDO_REG7 { 343 regulator-name = "vcc_bl"; 344 regulator-min-microvolt = <3300000>; 345 regulator-max-microvolt = <3300000>; 346 347 regulator-state-mem { 348 regulator-off-in-suspend; 349 regulator-suspend-microvolt = <3300000>; 350 }; 351 }; 352 353 vcc_lcd: LDO_REG8 { 354 regulator-name = "vcc_lcd"; 355 regulator-min-microvolt = <2800000>; 356 regulator-max-microvolt = <2800000>; 357 358 regulator-state-mem { 359 regulator-off-in-suspend; 360 regulator-suspend-microvolt = <2800000>; 361 }; 362 }; 363 364 vcc_cam: LDO_REG9 { 365 regulator-name = "vcc_cam"; 366 regulator-min-microvolt = <3000000>; 367 regulator-max-microvolt = <3000000>; 368 369 regulator-state-mem { 370 regulator-off-in-suspend; 371 regulator-suspend-microvolt = <3000000>; 372 }; 373 }; 374 }; 375 376 rk817_charger: charger { 377 monitored-battery = <&battery>; 378 rockchip,resistor-sense-micro-ohms = <10000>; 379 rockchip,sleep-enter-current-microamp = <300000>; 380 rockchip,sleep-filter-current-microamp = <100000>; 381 }; 382 383 rk817_codec: codec { 384 rockchip,mic-in-differential; 385 }; 386 }; 387 }; 388