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