brintos

brintos / linux-shallow public Read only

0
0
Text · 9.4 KiB · a2b2fbf Raw
356 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only2%YAML 1.23---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 device8 9description: |10  Some Qualcomm PMICs used with the Snapdragon series SoCs are interfaced11  to the chip via the SPMI (System Power Management Interface) bus.12  Support for multiple independent functions are implemented by splitting the13  16-bit SPMI peripheral address space into 256 smaller fixed-size regions, 256 bytes14  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 other17  PMICs.  These PMICs use a "QPNP" scheme through SPMI interface.18  QPNP is effectively a partitioning scheme for dividing the SPMI extended19  register space up into logical pieces, and set of fixed register20  locations/definitions within these regions, with some of these regions21  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: true32 33  compatible:34    items:35      - enum:36          - qcom,pm225037          - qcom,pm612538          - qcom,pm615039          - qcom,pm6150l40          - qcom,pm635041          - qcom,pm66042          - qcom,pm660l43          - qcom,pm7250b44          - qcom,pm7550ba45          - qcom,pm732546          - qcom,pm800447          - qcom,pm800548          - qcom,pm800949          - qcom,pm801050          - qcom,pm801951          - qcom,pm802852          - qcom,pm811053          - qcom,pm815054          - qcom,pm8150b55          - qcom,pm8150c56          - qcom,pm8150l57          - qcom,pm822658          - qcom,pm835059          - qcom,pm8350b60          - qcom,pm8350c61          - qcom,pm845062          - qcom,pm855063          - qcom,pm8550b64          - qcom,pm8550ve65          - qcom,pm8550vs66          - qcom,pm884167          - qcom,pm890968          - qcom,pm891669          - qcom,pm893770          - qcom,pm894171          - qcom,pm895072          - qcom,pm895373          - qcom,pm899474          - qcom,pm899875          - qcom,pma808476          - qcom,pmc818077          - qcom,pmc8180c78          - qcom,pmc838079          - qcom,pmd963580          - qcom,pmi63281          - qcom,pmi895082          - qcom,pmi896283          - qcom,pmi899484          - qcom,pmi899885          - qcom,pmk800286          - qcom,pmk835087          - qcom,pmk855088          - qcom,pmm8155au89          - qcom,pmm8654au90          - qcom,pmp807491          - qcom,pmr735a92          - qcom,pmr735b93          - qcom,pmr735d94          - qcom,pms40595          - qcom,pmx5596          - qcom,pmx6597          - qcom,pmx7598          - qcom,smb235199          - qcom,smb2360100      - const: qcom,spmi-pmic101 102  reg:103    minItems: 1104    maxItems: 2105 106  '#address-cells':107    const: 1108 109  '#size-cells':110    const: 0111 112  labibb:113    type: object114    $ref: /schemas/regulator/qcom-labibb-regulator.yaml#115 116  regulators:117    type: object118    $ref: /schemas/regulator/qcom,spmi-regulator.yaml#119 120  pwm:121    type: object122    $ref: /schemas/leds/leds-qcom-lpg.yaml#123 124patternProperties:125  "^adc@[0-9a-f]+$":126    type: object127    oneOf:128      - $ref: /schemas/iio/adc/qcom,spmi-iadc.yaml#129      - $ref: /schemas/iio/adc/qcom,spmi-rradc.yaml#130      - $ref: /schemas/iio/adc/qcom,spmi-vadc.yaml#131 132  "^adc-tm@[0-9a-f]+$":133    type: object134    # ref depends on compatible, see allOf below135 136  "^audio-codec@[0-9a-f]+$":137    type: object138    $ref: /schemas/sound/qcom,pm8916-wcd-analog-codec.yaml#139 140  "^battery@[0-9a-f]+$":141    type: object142    oneOf:143      - $ref: /schemas/power/supply/qcom,pm8916-bms-vm.yaml#144 145  "^charger@[0-9a-f]+$":146    type: object147    oneOf:148      - $ref: /schemas/power/supply/qcom,pm8916-lbc.yaml#149      - $ref: /schemas/power/supply/qcom,pm8941-charger.yaml#150      - $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml#151      - $ref: /schemas/power/supply/qcom,pmi8998-charger.yaml#152 153  "gpio@[0-9a-f]+$":154    type: object155    $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml#156 157  "^led-controller@[0-9a-f]+$":158    type: object159    $ref: /schemas/leds/qcom,spmi-flash-led.yaml#160 161  "^nvram@[0-9a-f]+$":162    type: object163    $ref: /schemas/nvmem/qcom,spmi-sdam.yaml#164 165  "^pbs@[0-9a-f]+$":166    type: object167    $ref: /schemas/soc/qcom/qcom,pbs.yaml#168 169  "phy@[0-9a-f]+$":170    type: object171    $ref: /schemas/phy/qcom,snps-eusb2-repeater.yaml#172 173  "pon@[0-9a-f]+$":174    type: object175    $ref: /schemas/power/reset/qcom,pon.yaml#176 177  "^rtc@[0-9a-f]+$":178    type: object179    $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml#180 181  "^temp-alarm@[0-9a-f]+$":182    type: object183    $ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml#184 185  "^typec@[0-9a-f]+$":186    type: object187    $ref: /schemas/usb/qcom,pmic-typec.yaml#188 189  "^usb-detect@[0-9a-f]+$":190    type: object191    $ref: /schemas/extcon/qcom,pm8941-misc.yaml#192 193  "^usb-vbus-regulator@[0-9a-f]+$":194    type: object195    $ref: /schemas/regulator/qcom,usb-vbus-regulator.yaml#196 197  "^vibrator@[0-9a-f]+$":198    type: object199    $ref: /schemas/input/qcom,pm8xxx-vib.yaml#200 201  "^mpps@[0-9a-f]+$":202    type: object203    $ref: /schemas/pinctrl/qcom,pmic-mpp.yaml#204 205  "(.*)?(wled|leds)@[0-9a-f]+$":206    type: object207    $ref: /schemas/leds/backlight/qcom-wled.yaml#208    unevaluatedProperties: false209 210required:211  - compatible212  - reg213 214allOf:215  - if:216      properties:217        compatible:218          contains:219            enum:220              - qcom,pm8998221    then:222      patternProperties:223        "^adc-tm@[0-9a-f]+$":224          $ref: /schemas/thermal/qcom-spmi-adc-tm-hc.yaml#225    else:226      patternProperties:227        "^adc-tm@[0-9a-f]+$":228          $ref: /schemas/thermal/qcom-spmi-adc-tm5.yaml#229 230additionalProperties: false231 232examples:233  - |234    #include <dt-bindings/spmi/spmi.h>235    #include <dt-bindings/interrupt-controller/irq.h>236    #include <dt-bindings/interrupt-controller/arm-gic.h>237 238    spmi@c440000 {239        compatible = "qcom,spmi-pmic-arb";240        reg = <0x0c440000 0x1100>,241              <0x0c600000 0x2000000>,242              <0x0e600000 0x100000>,243              <0x0e700000 0xa0000>,244              <0x0c40a000 0x26000>;245        reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";246        interrupt-names = "periph_irq";247        interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>;248        qcom,ee = <0>;249        qcom,channel = <0>;250        #address-cells = <2>;251        #size-cells = <0>;252        interrupt-controller;253        #interrupt-cells = <4>;254 255        pmic@2 {256            compatible = "qcom,pmi8998", "qcom,spmi-pmic";257            reg = <0x2 SPMI_USID>;258            #address-cells = <1>;259            #size-cells = <0>;260 261            gpio@c000 {262                compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio";263                reg = <0xc000>;264                gpio-controller;265                gpio-ranges = <&pmi8998_gpio 0 0 14>;266                #gpio-cells = <2>;267                interrupt-controller;268                #interrupt-cells = <2>;269            };270        };271    };272 273  - |274    #include <dt-bindings/input/input.h>275    #include <dt-bindings/interrupt-controller/irq.h>276    #include <dt-bindings/interrupt-controller/arm-gic.h>277    #include <dt-bindings/iio/qcom,spmi-vadc.h>278    #include <dt-bindings/spmi/spmi.h>279 280    pmic@0 {281        compatible = "qcom,pm6150", "qcom,spmi-pmic";282        reg = <0x0 SPMI_USID>;283        #address-cells = <1>;284        #size-cells = <0>;285 286        pon@800 {287            compatible = "qcom,pm8998-pon";288            reg = <0x800>;289            mode-bootloader = <0x2>;290            mode-recovery = <0x1>;291 292            pwrkey {293                compatible = "qcom,pm8941-pwrkey";294                interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;295                debounce = <15625>;296                bias-pull-up;297                linux,code = <KEY_POWER>;298            };299        };300 301        temp-alarm@2400 {302            compatible = "qcom,spmi-temp-alarm";303            reg = <0x2400>;304            interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;305            io-channels = <&pm6150_adc ADC5_DIE_TEMP>;306            io-channel-names = "thermal";307            #thermal-sensor-cells = <0>;308        };309 310        pm6150_adc: adc@3100 {311            compatible = "qcom,spmi-adc5";312            reg = <0x3100>;313            interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;314            #address-cells = <1>;315            #size-cells = <0>;316            #io-channel-cells = <1>;317 318            channel@6 {319                reg = <ADC5_DIE_TEMP>;320                label = "die_temp";321            };322 323            channel@4f {324                reg = <ADC5_AMUX_THM3_100K_PU>;325                qcom,ratiometric;326                qcom,hw-settle-time = <200>;327            };328        };329 330        adc-tm@3500 {331            compatible = "qcom,spmi-adc-tm5";332            reg = <0x3500>;333            interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;334            #thermal-sensor-cells = <1>;335            #address-cells = <1>;336            #size-cells = <0>;337 338            charger-thermistor@0 {339                reg = <0>;340                io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>;341                qcom,ratiometric;342                qcom,hw-settle-time-us = <200>;343            };344        };345 346        gpio@c000 {347            compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio";348            reg = <0xc000>;349            gpio-controller;350            gpio-ranges = <&pm6150_gpio 0 0 10>;351            #gpio-cells = <2>;352            interrupt-controller;353            #interrupt-cells = <2>;354        };355    };356