1# SPDX-License-Identifier: GPL-2.0-only 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm SPMI PMICs multi-function device 8 9description: | 10 Some Qualcomm PMICs used with the Snapdragon series SoCs are interfaced 11 to the chip via the SPMI (System Power Management Interface) bus. 12 Support for multiple independent functions are implemented by splitting the 13 16-bit SPMI peripheral address space into 256 smaller fixed-size regions, 256 bytes 14 each. A function can consume one or more of these fixed-size register regions. 15 16 The Qualcomm SPMI series includes the PM8941, PM8841, PMA8084, PM8998 and other 17 PMICs. These PMICs use a "QPNP" scheme through SPMI interface. 18 QPNP is effectively a partitioning scheme for dividing the SPMI extended 19 register space up into logical pieces, and set of fixed register 20 locations/definitions within these regions, with some of these regions 21 specifically used for interrupt handling. 22 23maintainers: 24 - Stephen Boyd <sboyd@kernel.org> 25 26properties: 27 $nodename: 28 oneOf: 29 - pattern: '^pmic@.*$' 30 - pattern: '^pm(a|s)?[0-9]*@.*$' 31 deprecated: true 32 33 compatible: 34 items: 35 - enum: 36 - qcom,pm2250 37 - qcom,pm6125 38 - qcom,pm6150 39 - qcom,pm6150l 40 - qcom,pm6350 41 - qcom,pm660 42 - qcom,pm660l 43 - qcom,pm7250b 44 - qcom,pm7550ba 45 - qcom,pm7325 46 - qcom,pm8004 47 - qcom,pm8005 48 - qcom,pm8009 49 - qcom,pm8010 50 - qcom,pm8019 51 - qcom,pm8028 52 - qcom,pm8110 53 - qcom,pm8150 54 - qcom,pm8150b 55 - qcom,pm8150c 56 - qcom,pm8150l 57 - qcom,pm8226 58 - qcom,pm8350 59 - qcom,pm8350b 60 - qcom,pm8350c 61 - qcom,pm8450 62 - qcom,pm8550 63 - qcom,pm8550b 64 - qcom,pm8550ve 65 - qcom,pm8550vs 66 - qcom,pm8841 67 - qcom,pm8909 68 - qcom,pm8916 69 - qcom,pm8941 70 - qcom,pm8950 71 - qcom,pm8953 72 - qcom,pm8994 73 - qcom,pm8998 74 - qcom,pma8084 75 - qcom,pmc8180 76 - qcom,pmc8180c 77 - qcom,pmd9635 78 - qcom,pmi632 79 - qcom,pmi8950 80 - qcom,pmi8962 81 - qcom,pmi8994 82 - qcom,pmi8998 83 - qcom,pmk8002 84 - qcom,pmk8350 85 - qcom,pmk8550 86 - qcom,pmm8155au 87 - qcom,pmm8654au 88 - qcom,pmp8074 89 - qcom,pmr735a 90 - qcom,pmr735b 91 - qcom,pmr735d 92 - qcom,pms405 93 - qcom,pmx55 94 - qcom,pmx65 95 - qcom,pmx75 96 - qcom,smb2351 97 - const: qcom,spmi-pmic 98 99 reg: 100 minItems: 1 101 maxItems: 2 102 103 '#address-cells': 104 const: 1 105 106 '#size-cells': 107 const: 0 108 109 labibb: 110 type: object 111 $ref: /schemas/regulator/qcom-labibb-regulator.yaml# 112 113 regulators: 114 type: object 115 $ref: /schemas/regulator/qcom,spmi-regulator.yaml# 116 117 pwm: 118 type: object 119 $ref: /schemas/leds/leds-qcom-lpg.yaml# 120 121patternProperties: 122 "^adc@[0-9a-f]+$": 123 type: object 124 oneOf: 125 - $ref: /schemas/iio/adc/qcom,spmi-iadc.yaml# 126 - $ref: /schemas/iio/adc/qcom,spmi-rradc.yaml# 127 - $ref: /schemas/iio/adc/qcom,spmi-vadc.yaml# 128 129 "^adc-tm@[0-9a-f]+$": 130 type: object 131 # ref depends on compatible, see allOf below 132 133 "^audio-codec@[0-9a-f]+$": 134 type: object 135 $ref: /schemas/sound/qcom,pm8916-wcd-analog-codec.yaml# 136 137 "^charger@[0-9a-f]+$": 138 type: object 139 oneOf: 140 - $ref: /schemas/power/supply/qcom,pm8941-charger.yaml# 141 - $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml# 142 - $ref: /schemas/power/supply/qcom,pmi8998-charger.yaml# 143 144 "gpio@[0-9a-f]+$": 145 type: object 146 $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml# 147 148 "^led-controller@[0-9a-f]+$": 149 type: object 150 $ref: /schemas/leds/qcom,spmi-flash-led.yaml# 151 152 "^nvram@[0-9a-f]+$": 153 type: object 154 $ref: /schemas/nvmem/qcom,spmi-sdam.yaml# 155 156 "phy@[0-9a-f]+$": 157 type: object 158 $ref: /schemas/phy/qcom,snps-eusb2-repeater.yaml# 159 160 "pon@[0-9a-f]+$": 161 type: object 162 $ref: /schemas/power/reset/qcom,pon.yaml# 163 164 "^rtc@[0-9a-f]+$": 165 type: object 166 $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml# 167 168 "^temp-alarm@[0-9a-f]+$": 169 type: object 170 $ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml# 171 172 "^typec@[0-9a-f]+$": 173 type: object 174 $ref: /schemas/usb/qcom,pmic-typec.yaml# 175 176 "^usb-detect@[0-9a-f]+$": 177 type: object 178 $ref: /schemas/extcon/qcom,pm8941-misc.yaml# 179 180 "^usb-vbus-regulator@[0-9a-f]+$": 181 type: object 182 $ref: /schemas/regulator/qcom,usb-vbus-regulator.yaml# 183 184 "^vibrator@[0-9a-f]+$": 185 type: object 186 $ref: /schemas/input/qcom,pm8xxx-vib.yaml# 187 188 "^mpps@[0-9a-f]+$": 189 type: object 190 $ref: /schemas/pinctrl/qcom,pmic-mpp.yaml# 191 192 "(.*)?(wled|leds)@[0-9a-f]+$": 193 type: object 194 $ref: /schemas/leds/backlight/qcom-wled.yaml# 195 unevaluatedProperties: false 196 197required: 198 - compatible 199 - reg 200 201allOf: 202 - if: 203 properties: 204 compatible: 205 contains: 206 enum: 207 - qcom,pm8998 208 then: 209 patternProperties: 210 "^adc-tm@[0-9a-f]+$": 211 $ref: /schemas/thermal/qcom-spmi-adc-tm-hc.yaml# 212 else: 213 patternProperties: 214 "^adc-tm@[0-9a-f]+$": 215 $ref: /schemas/thermal/qcom-spmi-adc-tm5.yaml# 216 217additionalProperties: false 218 219examples: 220 - | 221 #include <dt-bindings/spmi/spmi.h> 222 #include <dt-bindings/interrupt-controller/irq.h> 223 #include <dt-bindings/interrupt-controller/arm-gic.h> 224 225 spmi@c440000 { 226 compatible = "qcom,spmi-pmic-arb"; 227 reg = <0x0c440000 0x1100>, 228 <0x0c600000 0x2000000>, 229 <0x0e600000 0x100000>, 230 <0x0e700000 0xa0000>, 231 <0x0c40a000 0x26000>; 232 reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; 233 interrupt-names = "periph_irq"; 234 interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>; 235 qcom,ee = <0>; 236 qcom,channel = <0>; 237 #address-cells = <2>; 238 #size-cells = <0>; 239 interrupt-controller; 240 #interrupt-cells = <4>; 241 242 pmic@2 { 243 compatible = "qcom,pmi8998", "qcom,spmi-pmic"; 244 reg = <0x2 SPMI_USID>; 245 #address-cells = <1>; 246 #size-cells = <0>; 247 248 gpio@c000 { 249 compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio"; 250 reg = <0xc000>; 251 gpio-controller; 252 gpio-ranges = <&pmi8998_gpio 0 0 14>; 253 #gpio-cells = <2>; 254 interrupt-controller; 255 #interrupt-cells = <2>; 256 }; 257 }; 258 }; 259 260 - | 261 #include <dt-bindings/input/input.h> 262 #include <dt-bindings/interrupt-controller/irq.h> 263 #include <dt-bindings/interrupt-controller/arm-gic.h> 264 #include <dt-bindings/iio/qcom,spmi-vadc.h> 265 #include <dt-bindings/spmi/spmi.h> 266 267 pmic@0 { 268 compatible = "qcom,pm6150", "qcom,spmi-pmic"; 269 reg = <0x0 SPMI_USID>; 270 #address-cells = <1>; 271 #size-cells = <0>; 272 273 pon@800 { 274 compatible = "qcom,pm8998-pon"; 275 reg = <0x800>; 276 mode-bootloader = <0x2>; 277 mode-recovery = <0x1>; 278 279 pwrkey { 280 compatible = "qcom,pm8941-pwrkey"; 281 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 282 debounce = <15625>; 283 bias-pull-up; 284 linux,code = <KEY_POWER>; 285 }; 286 }; 287 288 temp-alarm@2400 { 289 compatible = "qcom,spmi-temp-alarm"; 290 reg = <0x2400>; 291 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; 292 io-channels = <&pm6150_adc ADC5_DIE_TEMP>; 293 io-channel-names = "thermal"; 294 #thermal-sensor-cells = <0>; 295 }; 296 297 pm6150_adc: adc@3100 { 298 compatible = "qcom,spmi-adc5"; 299 reg = <0x3100>; 300 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 301 #address-cells = <1>; 302 #size-cells = <0>; 303 #io-channel-cells = <1>; 304 305 channel@6 { 306 reg = <ADC5_DIE_TEMP>; 307 label = "die_temp"; 308 }; 309 310 channel@4f { 311 reg = <ADC5_AMUX_THM3_100K_PU>; 312 qcom,ratiometric; 313 qcom,hw-settle-time = <200>; 314 }; 315 }; 316 317 adc-tm@3500 { 318 compatible = "qcom,spmi-adc-tm5"; 319 reg = <0x3500>; 320 interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>; 321 #thermal-sensor-cells = <1>; 322 #address-cells = <1>; 323 #size-cells = <0>; 324 325 charger-thermistor@0 { 326 reg = <0>; 327 io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>; 328 qcom,ratiometric; 329 qcom,hw-settle-time-us = <200>; 330 }; 331 }; 332 333 gpio@c000 { 334 compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio"; 335 reg = <0xc000>; 336 gpio-controller; 337 gpio-ranges = <&pm6150_gpio 0 0 10>; 338 #gpio-cells = <2>; 339 interrupt-controller; 340 #interrupt-cells = <2>; 341 }; 342 }; 343