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