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