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