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