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,pm7550 47 - qcom,pm8004 48 - qcom,pm8005 49 - qcom,pm8009 50 - qcom,pm8010 51 - qcom,pm8019 52 - qcom,pm8028 53 - qcom,pm8110 54 - qcom,pm8150 55 - qcom,pm8150b 56 - qcom,pm8150c 57 - qcom,pm8150l 58 - qcom,pm8226 59 - qcom,pm8350 60 - qcom,pm8350b 61 - qcom,pm8350c 62 - qcom,pm8450 63 - qcom,pm8550 64 - qcom,pm8550b 65 - qcom,pm8550ve 66 - qcom,pm8550vs 67 - qcom,pm8841 68 - qcom,pm8909 69 - qcom,pm8916 70 - qcom,pm8937 71 - qcom,pm8941 72 - qcom,pm8950 73 - qcom,pm8953 74 - qcom,pm8994 75 - qcom,pm8998 76 - qcom,pma8084 77 - qcom,pmc8180 78 - qcom,pmc8180c 79 - qcom,pmc8380 80 - qcom,pmd8028 81 - qcom,pmd9635 82 - qcom,pmi632 83 - qcom,pmi8950 84 - qcom,pmi8962 85 - qcom,pmi8994 86 - qcom,pmi8998 87 - qcom,pmih0108 88 - qcom,pmiv0104 89 - qcom,pmk8002 90 - qcom,pmk8350 91 - qcom,pmk8550 92 - qcom,pmm8155au 93 - qcom,pmm8654au 94 - qcom,pmp8074 95 - qcom,pmr735a 96 - qcom,pmr735b 97 - qcom,pmr735d 98 - qcom,pms405 99 - qcom,pmx55 100 - qcom,pmx65 101 - qcom,pmx75 102 - qcom,smb2351 103 - qcom,smb2360 104 - const: qcom,spmi-pmic 105 106 reg: 107 minItems: 1 108 maxItems: 2 109 110 '#address-cells': 111 const: 1 112 113 '#size-cells': 114 const: 0 115 116 labibb: 117 type: object 118 $ref: /schemas/regulator/qcom-labibb-regulator.yaml# 119 120 regulators: 121 type: object 122 $ref: /schemas/regulator/qcom,spmi-regulator.yaml# 123 124 pwm: 125 type: object 126 $ref: /schemas/leds/leds-qcom-lpg.yaml# 127 128patternProperties: 129 "^adc@[0-9a-f]+$": 130 type: object 131 oneOf: 132 - $ref: /schemas/iio/adc/qcom,spmi-iadc.yaml# 133 - $ref: /schemas/iio/adc/qcom,spmi-rradc.yaml# 134 - $ref: /schemas/iio/adc/qcom,spmi-vadc.yaml# 135 136 "^adc-tm@[0-9a-f]+$": 137 type: object 138 # ref depends on compatible, see allOf below 139 140 "^audio-codec@[0-9a-f]+$": 141 type: object 142 $ref: /schemas/sound/qcom,pm8916-wcd-analog-codec.yaml# 143 144 "^battery@[0-9a-f]+$": 145 type: object 146 oneOf: 147 - $ref: /schemas/power/supply/qcom,pm8916-bms-vm.yaml# 148 149 "^charger@[0-9a-f]+$": 150 type: object 151 oneOf: 152 - $ref: /schemas/power/supply/qcom,pm8916-lbc.yaml# 153 - $ref: /schemas/power/supply/qcom,pm8941-charger.yaml# 154 - $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml# 155 - $ref: /schemas/power/supply/qcom,pmi8998-charger.yaml# 156 157 "gpio@[0-9a-f]+$": 158 type: object 159 $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml# 160 161 "^led-controller@[0-9a-f]+$": 162 type: object 163 $ref: /schemas/leds/qcom,spmi-flash-led.yaml# 164 165 "^nvram@[0-9a-f]+$": 166 type: object 167 $ref: /schemas/nvmem/qcom,spmi-sdam.yaml# 168 169 "^pbs@[0-9a-f]+$": 170 type: object 171 $ref: /schemas/soc/qcom/qcom,pbs.yaml# 172 173 "phy@[0-9a-f]+$": 174 type: object 175 $ref: /schemas/phy/qcom,snps-eusb2-repeater.yaml# 176 177 "pon@[0-9a-f]+$": 178 type: object 179 $ref: /schemas/power/reset/qcom,pon.yaml# 180 181 "^rtc@[0-9a-f]+$": 182 type: object 183 $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml# 184 185 "^temp-alarm@[0-9a-f]+$": 186 type: object 187 $ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml# 188 189 "^typec@[0-9a-f]+$": 190 type: object 191 $ref: /schemas/usb/qcom,pmic-typec.yaml# 192 193 "^usb-detect@[0-9a-f]+$": 194 type: object 195 $ref: /schemas/extcon/qcom,pm8941-misc.yaml# 196 197 "^usb-vbus-regulator@[0-9a-f]+$": 198 type: object 199 $ref: /schemas/regulator/qcom,usb-vbus-regulator.yaml# 200 201 "^vibrator@[0-9a-f]+$": 202 type: object 203 $ref: /schemas/input/qcom,pm8xxx-vib.yaml# 204 205 "^mpps@[0-9a-f]+$": 206 type: object 207 $ref: /schemas/pinctrl/qcom,pmic-mpp.yaml# 208 209 "(.*)?(wled|leds)@[0-9a-f]+$": 210 type: object 211 $ref: /schemas/leds/backlight/qcom-wled.yaml# 212 unevaluatedProperties: false 213 214required: 215 - compatible 216 - reg 217 218allOf: 219 - if: 220 properties: 221 compatible: 222 contains: 223 enum: 224 - qcom,pm8998 225 then: 226 patternProperties: 227 "^adc-tm@[0-9a-f]+$": 228 $ref: /schemas/thermal/qcom-spmi-adc-tm-hc.yaml# 229 else: 230 patternProperties: 231 "^adc-tm@[0-9a-f]+$": 232 $ref: /schemas/thermal/qcom-spmi-adc-tm5.yaml# 233 234additionalProperties: false 235 236examples: 237 - | 238 #include <dt-bindings/spmi/spmi.h> 239 #include <dt-bindings/interrupt-controller/irq.h> 240 #include <dt-bindings/interrupt-controller/arm-gic.h> 241 242 spmi@c440000 { 243 compatible = "qcom,spmi-pmic-arb"; 244 reg = <0x0c440000 0x1100>, 245 <0x0c600000 0x2000000>, 246 <0x0e600000 0x100000>, 247 <0x0e700000 0xa0000>, 248 <0x0c40a000 0x26000>; 249 reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; 250 interrupt-names = "periph_irq"; 251 interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>; 252 qcom,ee = <0>; 253 qcom,channel = <0>; 254 #address-cells = <2>; 255 #size-cells = <0>; 256 interrupt-controller; 257 #interrupt-cells = <4>; 258 259 pmic@2 { 260 compatible = "qcom,pmi8998", "qcom,spmi-pmic"; 261 reg = <0x2 SPMI_USID>; 262 #address-cells = <1>; 263 #size-cells = <0>; 264 265 gpio@c000 { 266 compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio"; 267 reg = <0xc000>; 268 gpio-controller; 269 gpio-ranges = <&pmi8998_gpio 0 0 14>; 270 #gpio-cells = <2>; 271 interrupt-controller; 272 #interrupt-cells = <2>; 273 }; 274 }; 275 }; 276 277 - | 278 #include <dt-bindings/input/input.h> 279 #include <dt-bindings/interrupt-controller/irq.h> 280 #include <dt-bindings/interrupt-controller/arm-gic.h> 281 #include <dt-bindings/iio/qcom,spmi-vadc.h> 282 #include <dt-bindings/spmi/spmi.h> 283 284 pmic@0 { 285 compatible = "qcom,pm6150", "qcom,spmi-pmic"; 286 reg = <0x0 SPMI_USID>; 287 #address-cells = <1>; 288 #size-cells = <0>; 289 290 pon@800 { 291 compatible = "qcom,pm8998-pon"; 292 reg = <0x800>; 293 mode-bootloader = <0x2>; 294 mode-recovery = <0x1>; 295 296 pwrkey { 297 compatible = "qcom,pm8941-pwrkey"; 298 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 299 debounce = <15625>; 300 bias-pull-up; 301 linux,code = <KEY_POWER>; 302 }; 303 }; 304 305 temp-alarm@2400 { 306 compatible = "qcom,spmi-temp-alarm"; 307 reg = <0x2400>; 308 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; 309 io-channels = <&pm6150_adc ADC5_DIE_TEMP>; 310 io-channel-names = "thermal"; 311 #thermal-sensor-cells = <0>; 312 }; 313 314 pm6150_adc: adc@3100 { 315 compatible = "qcom,spmi-adc5"; 316 reg = <0x3100>; 317 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 318 #address-cells = <1>; 319 #size-cells = <0>; 320 #io-channel-cells = <1>; 321 322 channel@6 { 323 reg = <ADC5_DIE_TEMP>; 324 label = "die_temp"; 325 }; 326 327 channel@4f { 328 reg = <ADC5_AMUX_THM3_100K_PU>; 329 qcom,ratiometric; 330 qcom,hw-settle-time = <200>; 331 }; 332 }; 333 334 adc-tm@3500 { 335 compatible = "qcom,spmi-adc-tm5"; 336 reg = <0x3500>; 337 interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>; 338 #thermal-sensor-cells = <1>; 339 #address-cells = <1>; 340 #size-cells = <0>; 341 342 charger-thermistor@0 { 343 reg = <0>; 344 io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>; 345 qcom,ratiometric; 346 qcom,hw-settle-time-us = <200>; 347 }; 348 }; 349 350 gpio@c000 { 351 compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio"; 352 reg = <0xc000>; 353 gpio-controller; 354 gpio-ranges = <&pm6150_gpio 0 0 10>; 355 #gpio-cells = <2>; 356 interrupt-controller; 357 #interrupt-cells = <2>; 358 }; 359 }; 360