341 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/mfd/st,stpmic1.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: STMicroelectonics STPMIC1 Power Management IC8 9description: STMicroelectronics STPMIC1 Power Management IC10 11maintainers:12 - pascal Paillet <p.paillet@foss.st.com>13 14properties:15 compatible:16 const: st,stpmic117 18 reg:19 const: 0x3320 21 interrupts:22 maxItems: 123 24 "#interrupt-cells":25 const: 226 27 interrupt-controller: true28 29 onkey:30 type: object31 32 $ref: /schemas/input/input.yaml33 34 properties:35 compatible:36 const: st,stpmic1-onkey37 38 interrupts:39 items:40 - description: onkey-falling, happens when onkey is pressed. IT_PONKEY_F of pmic41 - description: onkey-rising, happens when onkey is released. IT_PONKEY_R of pmic42 43 interrupt-names:44 items:45 - const: onkey-falling46 - const: onkey-rising47 48 st,onkey-clear-cc-flag:49 description: onkey is able power on after an over-current shutdown event.50 $ref: /schemas/types.yaml#/definitions/flag51 52 st,onkey-pu-inactive:53 description: onkey pull up is not active54 $ref: /schemas/types.yaml#/definitions/flag55 56 power-off-time-sec:57 minimum: 158 maximum: 1659 60 required:61 - compatible62 - interrupts63 - interrupt-names64 65 additionalProperties: false66 67 watchdog:68 type: object69 70 $ref: /schemas/watchdog/watchdog.yaml71 72 properties:73 compatible:74 const: st,stpmic1-wdt75 76 timeout-sec: true77 78 required:79 - compatible80 81 additionalProperties: false82 83 regulators:84 type: object85 86 description: |87 Available Regulators in STPMIC1 device are:88 - buck1 for Buck BUCK189 - buck2 for Buck BUCK290 - buck3 for Buck BUCK391 - buck4 for Buck BUCK492 - ldo1 for LDO LDO193 - ldo2 for LDO LDO294 - ldo3 for LDO LDO395 - ldo4 for LDO LDO496 - ldo5 for LDO LDO597 - ldo6 for LDO LDO698 - vref_ddr for LDO Vref DDR99 - boost for Buck BOOST100 - pwr_sw1 for VBUS_OTG switch101 - pwr_sw2 for SW_OUT switch102 Switches are fixed voltage regulators with only enable/disable capability.103 104 properties:105 compatible:106 const: st,stpmic1-regulators107 108 ldo3:109 $ref: /schemas/regulator/regulator.yaml110 type: object111 112 properties:113 interrupts:114 maxItems: 1115 116 st,mask-reset:117 description: mask reset for this regulator, the regulator configuration118 is maintained during pmic reset.119 $ref: /schemas/types.yaml#/definitions/flag120 121 regulator-name: true122 regulator-boot-on: true123 regulator-always-on: true124 regulator-min-microvolt: true125 regulator-max-microvolt: true126 regulator-allow-bypass: true127 regulator-over-current-protection: true128 129 additionalProperties: false130 131 ldo4:132 $ref: /schemas/regulator/regulator.yaml133 type: object134 135 properties:136 interrupts:137 maxItems: 1138 139 st,mask-reset:140 description: mask reset for this regulator, the regulator configuration141 is maintained during pmic reset.142 $ref: /schemas/types.yaml#/definitions/flag143 144 regulator-name: true145 regulator-boot-on: true146 regulator-always-on: true147 regulator-min-microvolt: true148 regulator-max-microvolt: true149 regulator-over-current-protection: true150 151 additionalProperties: false152 153 vref_ddr:154 $ref: /schemas/regulator/regulator.yaml155 type: object156 157 properties:158 interrupts:159 maxItems: 1160 161 st,mask-reset:162 description: mask reset for this regulator, the regulator configuration163 is maintained during pmic reset.164 $ref: /schemas/types.yaml#/definitions/flag165 166 regulator-name: true167 regulator-boot-on: true168 regulator-always-on: true169 170 additionalProperties: false171 172 boost:173 $ref: /schemas/regulator/regulator.yaml174 type: object175 176 properties:177 interrupts:178 maxItems: 1179 180 st,mask-reset:181 description: mask reset for this regulator, the regulator configuration182 is maintained during pmic reset.183 $ref: /schemas/types.yaml#/definitions/flag184 185 regulator-name: true186 regulator-boot-on: true187 regulator-always-on: true188 regulator-over-current-protection: true189 190 additionalProperties: false191 192 patternProperties:193 "^(buck[1-4]|ldo[1-6]|vref_ddr|boost|pwr_sw[1-2])-supply$":194 description: STPMIC1 voltage regulators supplies195 196 "^ldo[1-2,5-6]$":197 $ref: /schemas/regulator/regulator.yaml198 type: object199 200 properties:201 interrupts:202 maxItems: 1203 204 st,mask-reset:205 description: mask reset for this regulator, the regulator configuration206 is maintained during pmic reset.207 $ref: /schemas/types.yaml#/definitions/flag208 209 regulator-name: true210 regulator-boot-on: true211 regulator-always-on: true212 regulator-min-microvolt: true213 regulator-max-microvolt: true214 regulator-over-current-protection: true215 regulator-enable-ramp-delay: true216 217 additionalProperties: false218 219 "^buck[1-4]$":220 $ref: /schemas/regulator/regulator.yaml221 type: object222 223 properties:224 interrupts:225 maxItems: 1226 227 st,mask-reset:228 description: mask reset for this regulator, the regulator configuration229 is maintained during pmic reset.230 $ref: /schemas/types.yaml#/definitions/flag231 232 regulator-name: true233 regulator-boot-on: true234 regulator-always-on: true235 regulator-min-microvolt: true236 regulator-max-microvolt: true237 regulator-initial-mode: true238 regulator-pull-down: true239 regulator-over-current-protection: true240 regulator-enable-ramp-delay: true241 242 additionalProperties: false243 244 "^pwr_sw[1-2]$":245 $ref: /schemas/regulator/regulator.yaml246 type: object247 248 properties:249 interrupts:250 maxItems: 1251 252 regulator-name: true253 regulator-boot-on: true254 regulator-always-on: true255 regulator-over-current-protection: true256 regulator-active-discharge: true257 258 additionalProperties: false259 260 required:261 - compatible262 263 additionalProperties: false264 265additionalProperties: false266 267required:268 - compatible269 - reg270 - interrupts271 - "#interrupt-cells"272 - interrupt-controller273 274examples:275 - |276 #include <dt-bindings/mfd/st,stpmic1.h>277 #include <dt-bindings/interrupt-controller/arm-gic.h>278 i2c {279 #address-cells = <1>;280 #size-cells = <0>;281 pmic@33 {282 compatible = "st,stpmic1";283 reg = <0x33>;284 interrupt-parent = <&gpioa>;285 interrupts = <0 2>;286 287 interrupt-controller;288 #interrupt-cells = <2>;289 290 onkey {291 compatible = "st,stpmic1-onkey";292 interrupts = <IT_PONKEY_F 0>,<IT_PONKEY_R 1>;293 interrupt-names = "onkey-falling", "onkey-rising";294 power-off-time-sec = <10>;295 };296 297 watchdog {298 compatible = "st,stpmic1-wdt";299 };300 301 regulators {302 compatible = "st,stpmic1-regulators";303 304 ldo6-supply = <&v3v3>;305 306 buck1 {307 regulator-name = "vdd_core";308 interrupts = <IT_CURLIM_BUCK1 0>;309 st,mask-reset;310 regulator-boot-on;311 regulator-min-microvolt = <700000>;312 regulator-max-microvolt = <1200000>;313 };314 315 buck3 {316 regulator-name = "vdd";317 regulator-min-microvolt = <3300000>;318 regulator-max-microvolt = <3300000>;319 regulator-boot-on;320 regulator-pull-down;321 };322 323 buck4 {324 regulator-name = "v3v3";325 interrupts = <IT_CURLIM_BUCK4 0>;326 regulator-min-microvolt = <3300000>;327 regulator-max-microvolt = <3300000>;328 };329 330 ldo6 {331 regulator-name = "v1v8";332 regulator-min-microvolt = <1800000>;333 regulator-max-microvolt = <1800000>;334 regulator-over-current-protection;335 };336 };337 };338 };339 340...341