1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/st,stpmic1.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: STMicroelectonics STPMIC1 Power Management IC 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotdescription: STMicroelectronics STPMIC1 Power Management IC 10c66ec88fSEmmanuel Vadot 11c66ec88fSEmmanuel Vadotmaintainers: 128cc087a1SEmmanuel Vadot - pascal Paillet <p.paillet@foss.st.com> 13c66ec88fSEmmanuel Vadot 14c66ec88fSEmmanuel Vadotproperties: 15c66ec88fSEmmanuel Vadot compatible: 16c66ec88fSEmmanuel Vadot const: st,stpmic1 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel Vadot reg: 19c66ec88fSEmmanuel Vadot const: 0x33 20c66ec88fSEmmanuel Vadot 21c66ec88fSEmmanuel Vadot interrupts: 22c66ec88fSEmmanuel Vadot maxItems: 1 23c66ec88fSEmmanuel Vadot 24c66ec88fSEmmanuel Vadot "#interrupt-cells": 25c66ec88fSEmmanuel Vadot const: 2 26c66ec88fSEmmanuel Vadot 27c66ec88fSEmmanuel Vadot interrupt-controller: true 28c66ec88fSEmmanuel Vadot 29c66ec88fSEmmanuel Vadot onkey: 30c66ec88fSEmmanuel Vadot type: object 31c66ec88fSEmmanuel Vadot 32c66ec88fSEmmanuel Vadot $ref: ../input/input.yaml 33c66ec88fSEmmanuel Vadot 34c66ec88fSEmmanuel Vadot properties: 35c66ec88fSEmmanuel Vadot compatible: 36c66ec88fSEmmanuel Vadot const: st,stpmic1-onkey 37c66ec88fSEmmanuel Vadot 38c66ec88fSEmmanuel Vadot interrupts: 39c66ec88fSEmmanuel Vadot items: 40c66ec88fSEmmanuel Vadot - description: onkey-falling, happens when onkey is pressed. IT_PONKEY_F of pmic 41c66ec88fSEmmanuel Vadot - description: onkey-rising, happens when onkey is released. IT_PONKEY_R of pmic 42c66ec88fSEmmanuel Vadot 43c66ec88fSEmmanuel Vadot interrupt-names: 44c66ec88fSEmmanuel Vadot items: 45c66ec88fSEmmanuel Vadot - const: onkey-falling 46c66ec88fSEmmanuel Vadot - const: onkey-rising 47c66ec88fSEmmanuel Vadot 48c66ec88fSEmmanuel Vadot st,onkey-clear-cc-flag: 49c66ec88fSEmmanuel Vadot description: onkey is able power on after an over-current shutdown event. 50c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel Vadot st,onkey-pu-inactive: 53c66ec88fSEmmanuel Vadot description: onkey pull up is not active 54c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel Vadot power-off-time-sec: 57c66ec88fSEmmanuel Vadot minimum: 1 58c66ec88fSEmmanuel Vadot maximum: 16 59c66ec88fSEmmanuel Vadot 60c66ec88fSEmmanuel Vadot required: 61c66ec88fSEmmanuel Vadot - compatible 62c66ec88fSEmmanuel Vadot - interrupts 63c66ec88fSEmmanuel Vadot - interrupt-names 64c66ec88fSEmmanuel Vadot 65c66ec88fSEmmanuel Vadot additionalProperties: false 66c66ec88fSEmmanuel Vadot 67c66ec88fSEmmanuel Vadot watchdog: 68c66ec88fSEmmanuel Vadot type: object 69c66ec88fSEmmanuel Vadot 70c66ec88fSEmmanuel Vadot $ref: ../watchdog/watchdog.yaml 71c66ec88fSEmmanuel Vadot 72c66ec88fSEmmanuel Vadot properties: 73c66ec88fSEmmanuel Vadot compatible: 74c66ec88fSEmmanuel Vadot const: st,stpmic1-wdt 75c66ec88fSEmmanuel Vadot 76c66ec88fSEmmanuel Vadot timeout-sec: true 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel Vadot required: 79c66ec88fSEmmanuel Vadot - compatible 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot additionalProperties: false 82c66ec88fSEmmanuel Vadot 83c66ec88fSEmmanuel Vadot regulators: 84c66ec88fSEmmanuel Vadot type: object 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadot description: | 87c66ec88fSEmmanuel Vadot Available Regulators in STPMIC1 device are: 88c66ec88fSEmmanuel Vadot - buck1 for Buck BUCK1 89c66ec88fSEmmanuel Vadot - buck2 for Buck BUCK2 90c66ec88fSEmmanuel Vadot - buck3 for Buck BUCK3 91c66ec88fSEmmanuel Vadot - buck4 for Buck BUCK4 92c66ec88fSEmmanuel Vadot - ldo1 for LDO LDO1 93c66ec88fSEmmanuel Vadot - ldo2 for LDO LDO2 94c66ec88fSEmmanuel Vadot - ldo3 for LDO LDO3 95c66ec88fSEmmanuel Vadot - ldo4 for LDO LDO4 96c66ec88fSEmmanuel Vadot - ldo5 for LDO LDO5 97c66ec88fSEmmanuel Vadot - ldo6 for LDO LDO6 98c66ec88fSEmmanuel Vadot - vref_ddr for LDO Vref DDR 99c66ec88fSEmmanuel Vadot - boost for Buck BOOST 100c66ec88fSEmmanuel Vadot - pwr_sw1 for VBUS_OTG switch 101c66ec88fSEmmanuel Vadot - pwr_sw2 for SW_OUT switch 102c66ec88fSEmmanuel Vadot Switches are fixed voltage regulators with only enable/disable capability. 103c66ec88fSEmmanuel Vadot 104c66ec88fSEmmanuel Vadot properties: 105c66ec88fSEmmanuel Vadot compatible: 106c66ec88fSEmmanuel Vadot const: st,stpmic1-regulators 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot ldo3: 109c66ec88fSEmmanuel Vadot type: object 110c66ec88fSEmmanuel Vadot 111c66ec88fSEmmanuel Vadot properties: 112c66ec88fSEmmanuel Vadot interrupts: 113c66ec88fSEmmanuel Vadot maxItems: 1 114c66ec88fSEmmanuel Vadot 115c66ec88fSEmmanuel Vadot st,mask-reset: 116c66ec88fSEmmanuel Vadot description: mask reset for this regulator, the regulator configuration 117c66ec88fSEmmanuel Vadot is maintained during pmic reset. 118c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 119c66ec88fSEmmanuel Vadot 120c66ec88fSEmmanuel Vadot regulator-name: true 121c66ec88fSEmmanuel Vadot regulator-boot-on: true 122c66ec88fSEmmanuel Vadot regulator-always-on: true 123c66ec88fSEmmanuel Vadot regulator-min-microvolt: true 124c66ec88fSEmmanuel Vadot regulator-max-microvolt: true 125c66ec88fSEmmanuel Vadot regulator-allow-bypass: true 126c66ec88fSEmmanuel Vadot regulator-over-current-protection: true 127c66ec88fSEmmanuel Vadot 128c66ec88fSEmmanuel Vadot additionalProperties: false 129c66ec88fSEmmanuel Vadot 130c66ec88fSEmmanuel Vadot ldo4: 131c66ec88fSEmmanuel Vadot type: object 132c66ec88fSEmmanuel Vadot 133c66ec88fSEmmanuel Vadot properties: 134c66ec88fSEmmanuel Vadot interrupts: 135c66ec88fSEmmanuel Vadot maxItems: 1 136c66ec88fSEmmanuel Vadot 137c66ec88fSEmmanuel Vadot st,mask-reset: 138c66ec88fSEmmanuel Vadot description: mask reset for this regulator, the regulator configuration 139c66ec88fSEmmanuel Vadot is maintained during pmic reset. 140c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 141c66ec88fSEmmanuel Vadot 142c66ec88fSEmmanuel Vadot regulator-name: true 143c66ec88fSEmmanuel Vadot regulator-boot-on: true 144c66ec88fSEmmanuel Vadot regulator-always-on: true 145c66ec88fSEmmanuel Vadot regulator-over-current-protection: true 146c66ec88fSEmmanuel Vadot 147c66ec88fSEmmanuel Vadot additionalProperties: false 148c66ec88fSEmmanuel Vadot 149c66ec88fSEmmanuel Vadot vref_ddr: 150c66ec88fSEmmanuel Vadot type: object 151c66ec88fSEmmanuel Vadot 152c66ec88fSEmmanuel Vadot properties: 153c66ec88fSEmmanuel Vadot interrupts: 154c66ec88fSEmmanuel Vadot maxItems: 1 155c66ec88fSEmmanuel Vadot 156c66ec88fSEmmanuel Vadot st,mask-reset: 157c66ec88fSEmmanuel Vadot description: mask reset for this regulator, the regulator configuration 158c66ec88fSEmmanuel Vadot is maintained during pmic reset. 159c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 160c66ec88fSEmmanuel Vadot 161c66ec88fSEmmanuel Vadot regulator-name: true 162c66ec88fSEmmanuel Vadot regulator-boot-on: true 163c66ec88fSEmmanuel Vadot regulator-always-on: true 164c66ec88fSEmmanuel Vadot 165c66ec88fSEmmanuel Vadot additionalProperties: false 166c66ec88fSEmmanuel Vadot 167c66ec88fSEmmanuel Vadot boost: 168c66ec88fSEmmanuel Vadot type: object 169c66ec88fSEmmanuel Vadot 170c66ec88fSEmmanuel Vadot properties: 171c66ec88fSEmmanuel Vadot interrupts: 172c66ec88fSEmmanuel Vadot maxItems: 1 173c66ec88fSEmmanuel Vadot 174c66ec88fSEmmanuel Vadot st,mask-reset: 175c66ec88fSEmmanuel Vadot description: mask reset for this regulator, the regulator configuration 176c66ec88fSEmmanuel Vadot is maintained during pmic reset. 177c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 178c66ec88fSEmmanuel Vadot 179c66ec88fSEmmanuel Vadot regulator-name: true 180c66ec88fSEmmanuel Vadot regulator-boot-on: true 181c66ec88fSEmmanuel Vadot regulator-always-on: true 182c66ec88fSEmmanuel Vadot regulator-over-current-protection: true 183c66ec88fSEmmanuel Vadot 184c66ec88fSEmmanuel Vadot additionalProperties: false 185c66ec88fSEmmanuel Vadot 186c66ec88fSEmmanuel Vadot patternProperties: 187*f126890aSEmmanuel Vadot "^(buck[1-4]|ldo[1-6]|vref_ddr|boost|pwr_sw[1-2])-supply$": 188c66ec88fSEmmanuel Vadot description: STPMIC1 voltage regulators supplies 189c66ec88fSEmmanuel Vadot 190c66ec88fSEmmanuel Vadot "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$": 191c66ec88fSEmmanuel Vadot $ref: ../regulator/regulator.yaml 192c66ec88fSEmmanuel Vadot 193c66ec88fSEmmanuel Vadot "^ldo[1-2,5-6]$": 194c66ec88fSEmmanuel Vadot type: object 195c66ec88fSEmmanuel Vadot 196c66ec88fSEmmanuel Vadot properties: 197c66ec88fSEmmanuel Vadot interrupts: 198c66ec88fSEmmanuel Vadot maxItems: 1 199c66ec88fSEmmanuel Vadot 200c66ec88fSEmmanuel Vadot st,mask-reset: 201c66ec88fSEmmanuel Vadot description: mask reset for this regulator, the regulator configuration 202c66ec88fSEmmanuel Vadot is maintained during pmic reset. 203c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 204c66ec88fSEmmanuel Vadot 205c66ec88fSEmmanuel Vadot regulator-name: true 206c66ec88fSEmmanuel Vadot regulator-boot-on: true 207c66ec88fSEmmanuel Vadot regulator-always-on: true 208c66ec88fSEmmanuel Vadot regulator-min-microvolt: true 209c66ec88fSEmmanuel Vadot regulator-max-microvolt: true 210c66ec88fSEmmanuel Vadot regulator-over-current-protection: true 211c66ec88fSEmmanuel Vadot regulator-enable-ramp-delay: true 212c66ec88fSEmmanuel Vadot 213c66ec88fSEmmanuel Vadot additionalProperties: false 214c66ec88fSEmmanuel Vadot 215c66ec88fSEmmanuel Vadot "^buck[1-4]$": 216c66ec88fSEmmanuel Vadot type: object 217c66ec88fSEmmanuel Vadot 218c66ec88fSEmmanuel Vadot properties: 219c66ec88fSEmmanuel Vadot interrupts: 220c66ec88fSEmmanuel Vadot maxItems: 1 221c66ec88fSEmmanuel Vadot 222c66ec88fSEmmanuel Vadot st,mask-reset: 223c66ec88fSEmmanuel Vadot description: mask reset for this regulator, the regulator configuration 224c66ec88fSEmmanuel Vadot is maintained during pmic reset. 225c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 226c66ec88fSEmmanuel Vadot 227c66ec88fSEmmanuel Vadot regulator-name: true 228c66ec88fSEmmanuel Vadot regulator-boot-on: true 229c66ec88fSEmmanuel Vadot regulator-always-on: true 230c66ec88fSEmmanuel Vadot regulator-min-microvolt: true 231c66ec88fSEmmanuel Vadot regulator-max-microvolt: true 232c66ec88fSEmmanuel Vadot regulator-initial-mode: true 233c66ec88fSEmmanuel Vadot regulator-pull-down: true 234c66ec88fSEmmanuel Vadot regulator-over-current-protection: true 235c66ec88fSEmmanuel Vadot regulator-enable-ramp-delay: true 236c66ec88fSEmmanuel Vadot 237c66ec88fSEmmanuel Vadot additionalProperties: false 238c66ec88fSEmmanuel Vadot 239c66ec88fSEmmanuel Vadot "^pwr_sw[1-2]$": 240c66ec88fSEmmanuel Vadot type: object 241c66ec88fSEmmanuel Vadot 242c66ec88fSEmmanuel Vadot properties: 243c66ec88fSEmmanuel Vadot interrupts: 244c66ec88fSEmmanuel Vadot maxItems: 1 245c66ec88fSEmmanuel Vadot 246c66ec88fSEmmanuel Vadot regulator-name: true 247c66ec88fSEmmanuel Vadot regulator-boot-on: true 248c66ec88fSEmmanuel Vadot regulator-always-on: true 249c66ec88fSEmmanuel Vadot regulator-over-current-protection: true 250c66ec88fSEmmanuel Vadot regulator-active-discharge: true 251c66ec88fSEmmanuel Vadot 252c66ec88fSEmmanuel Vadot additionalProperties: false 253c66ec88fSEmmanuel Vadot 254c66ec88fSEmmanuel Vadot required: 255c66ec88fSEmmanuel Vadot - compatible 256c66ec88fSEmmanuel Vadot 257c66ec88fSEmmanuel Vadot additionalProperties: false 258c66ec88fSEmmanuel Vadot 259c66ec88fSEmmanuel VadotadditionalProperties: false 260c66ec88fSEmmanuel Vadot 261c66ec88fSEmmanuel Vadotrequired: 262c66ec88fSEmmanuel Vadot - compatible 263c66ec88fSEmmanuel Vadot - reg 264c66ec88fSEmmanuel Vadot - interrupts 265c66ec88fSEmmanuel Vadot - "#interrupt-cells" 266c66ec88fSEmmanuel Vadot - interrupt-controller 267c66ec88fSEmmanuel Vadot 268c66ec88fSEmmanuel Vadotexamples: 269c66ec88fSEmmanuel Vadot - | 270c66ec88fSEmmanuel Vadot #include <dt-bindings/mfd/st,stpmic1.h> 271c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 272c66ec88fSEmmanuel Vadot i2c { 273c66ec88fSEmmanuel Vadot #address-cells = <1>; 274c66ec88fSEmmanuel Vadot #size-cells = <0>; 275c66ec88fSEmmanuel Vadot pmic@33 { 276c66ec88fSEmmanuel Vadot compatible = "st,stpmic1"; 277c66ec88fSEmmanuel Vadot reg = <0x33>; 278c66ec88fSEmmanuel Vadot interrupt-parent = <&gpioa>; 279c66ec88fSEmmanuel Vadot interrupts = <0 2>; 280c66ec88fSEmmanuel Vadot 281c66ec88fSEmmanuel Vadot interrupt-controller; 282c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 283c66ec88fSEmmanuel Vadot 284c66ec88fSEmmanuel Vadot onkey { 285c66ec88fSEmmanuel Vadot compatible = "st,stpmic1-onkey"; 286c66ec88fSEmmanuel Vadot interrupts = <IT_PONKEY_F 0>,<IT_PONKEY_R 1>; 287c66ec88fSEmmanuel Vadot interrupt-names = "onkey-falling", "onkey-rising"; 288c66ec88fSEmmanuel Vadot power-off-time-sec = <10>; 289c66ec88fSEmmanuel Vadot }; 290c66ec88fSEmmanuel Vadot 291c66ec88fSEmmanuel Vadot watchdog { 292c66ec88fSEmmanuel Vadot compatible = "st,stpmic1-wdt"; 293c66ec88fSEmmanuel Vadot }; 294c66ec88fSEmmanuel Vadot 295c66ec88fSEmmanuel Vadot regulators { 296c66ec88fSEmmanuel Vadot compatible = "st,stpmic1-regulators"; 297c66ec88fSEmmanuel Vadot 298c66ec88fSEmmanuel Vadot ldo6-supply = <&v3v3>; 299c66ec88fSEmmanuel Vadot 300c66ec88fSEmmanuel Vadot buck1 { 301c66ec88fSEmmanuel Vadot regulator-name = "vdd_core"; 302c66ec88fSEmmanuel Vadot interrupts = <IT_CURLIM_BUCK1 0>; 303c66ec88fSEmmanuel Vadot st,mask-reset; 304c66ec88fSEmmanuel Vadot regulator-boot-on; 305c66ec88fSEmmanuel Vadot regulator-min-microvolt = <700000>; 306c66ec88fSEmmanuel Vadot regulator-max-microvolt = <1200000>; 307c66ec88fSEmmanuel Vadot }; 308c66ec88fSEmmanuel Vadot 309c66ec88fSEmmanuel Vadot buck3 { 310c66ec88fSEmmanuel Vadot regulator-name = "vdd"; 311c66ec88fSEmmanuel Vadot regulator-min-microvolt = <3300000>; 312c66ec88fSEmmanuel Vadot regulator-max-microvolt = <3300000>; 313c66ec88fSEmmanuel Vadot regulator-boot-on; 314c66ec88fSEmmanuel Vadot regulator-pull-down; 315c66ec88fSEmmanuel Vadot }; 316c66ec88fSEmmanuel Vadot 317c66ec88fSEmmanuel Vadot buck4 { 318c66ec88fSEmmanuel Vadot regulator-name = "v3v3"; 319c66ec88fSEmmanuel Vadot interrupts = <IT_CURLIM_BUCK4 0>; 320c66ec88fSEmmanuel Vadot regulator-min-microvolt = <3300000>; 321c66ec88fSEmmanuel Vadot regulator-max-microvolt = <3300000>; 322c66ec88fSEmmanuel Vadot }; 323c66ec88fSEmmanuel Vadot 324c66ec88fSEmmanuel Vadot ldo6 { 325c66ec88fSEmmanuel Vadot regulator-name = "v1v8"; 326c66ec88fSEmmanuel Vadot regulator-min-microvolt = <1800000>; 327c66ec88fSEmmanuel Vadot regulator-max-microvolt = <1800000>; 328c66ec88fSEmmanuel Vadot regulator-over-current-protection; 329c66ec88fSEmmanuel Vadot }; 330c66ec88fSEmmanuel Vadot }; 331c66ec88fSEmmanuel Vadot }; 332c66ec88fSEmmanuel Vadot }; 333c66ec88fSEmmanuel Vadot 334c66ec88fSEmmanuel Vadot... 335