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