summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/mfd/qcom,spmi-pmic.yaml
blob: 65cbc6dee545e6f2ca9bd824011f402ed5cbe071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm SPMI PMICs multi-function device

description: |
  Some Qualcomm PMICs used with the Snapdragon series SoCs are interfaced
  to the chip via the SPMI (System Power Management Interface) bus.
  Support for multiple independent functions are implemented by splitting the
  16-bit SPMI peripheral address space into 256 smaller fixed-size regions, 256 bytes
  each. A function can consume one or more of these fixed-size register regions.

  The Qualcomm SPMI series includes the PM8941, PM8841, PMA8084, PM8998 and other
  PMICs.  These PMICs use a "QPNP" scheme through SPMI interface.
  QPNP is effectively a partitioning scheme for dividing the SPMI extended
  register space up into logical pieces, and set of fixed register
  locations/definitions within these regions, with some of these regions
  specifically used for interrupt handling.

maintainers:
  - Stephen Boyd <sboyd@kernel.org>

properties:
  $nodename:
    oneOf:
      - pattern: '^pmic@.*$'
      - pattern: '^pm(a|s)?[0-9]*@.*$'
        deprecated: true

  compatible:
    items:
      - enum:
          - qcom,pm660
          - qcom,pm660l
          - qcom,pm6150
          - qcom,pm6150l
          - qcom,pm6350
          - qcom,pm7325
          - qcom,pm8004
          - qcom,pm8005
          - qcom,pm8009
          - qcom,pm8019
          - qcom,pm8110
          - qcom,pm8150
          - qcom,pm8150b
          - qcom,pm8150l
          - qcom,pm8226
          - qcom,pm8350
          - qcom,pm8350b
          - qcom,pm8350c
          - qcom,pm8841
          - qcom,pm8909
          - qcom,pm8916
          - qcom,pm8941
          - qcom,pm8950
          - qcom,pm8994
          - qcom,pm8998
          - qcom,pma8084
          - qcom,pmd9635
          - qcom,pmi8950
          - qcom,pmi8962
          - qcom,pmi8994
          - qcom,pmi8998
          - qcom,pmk8350
          - qcom,pmm8155au
          - qcom,pmr735a
          - qcom,pmr735b
          - qcom,pms405
          - qcom,pmx55
          - qcom,pmx65
          - qcom,smb2351
      - const: qcom,spmi-pmic

  reg:
    minItems: 1
    maxItems: 2

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

  labibb:
    type: object
    $ref: /schemas/regulator/qcom-labibb-regulator.yaml#

  regulators:
    type: object
    $ref: /schemas/regulator/regulator.yaml#

patternProperties:
  "^adc@[0-9a-f]+$":
    type: object
    $ref: /schemas/iio/adc/qcom,spmi-vadc.yaml#

  "^adc-tm@[0-9a-f]+$":
    type: object
    $ref: /schemas/thermal/qcom-spmi-adc-tm5.yaml#

  "^audio-codec@[0-9a-f]+$":
    type: object
    additionalProperties: true # FIXME qcom,pm8916-wcd-analog-codec binding not converted yet

  "extcon@[0-9a-f]+$":
    type: object
    $ref: /schemas/extcon/qcom,pm8941-misc.yaml#

  "gpio(s)?@[0-9a-f]+$":
    type: object
    $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml#

  "pon@[0-9a-f]+$":
    type: object
    $ref: /schemas/power/reset/qcom,pon.yaml#

  "pwm@[0-9a-f]+$":
    type: object
    $ref: /schemas/leds/leds-qcom-lpg.yaml#

  "^rtc@[0-9a-f]+$":
    type: object
    $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml#

  "^temp-alarm@[0-9a-f]+$":
    type: object
    $ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml#

  "^vibrator@[0-9a-f]+$":
    type: object
    additionalProperties: true # FIXME qcom,pm8916-vib binding not converted yet

  "^mpps@[0-9a-f]+$":
    type: object
    $ref: /schemas/pinctrl/qcom,pmic-mpp.yaml#

  "(.*)?(wled|leds)@[0-9a-f]+$":
    type: object
    $ref: /schemas/leds/backlight/qcom-wled.yaml#
    unevaluatedProperties: false

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/spmi/spmi.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    spmi@c440000 {
        compatible = "qcom,spmi-pmic-arb";
        reg = <0x0c440000 0x1100>,
              <0x0c600000 0x2000000>,
              <0x0e600000 0x100000>,
              <0x0e700000 0xa0000>,
              <0x0c40a000 0x26000>;
        reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
        interrupt-names = "periph_irq";
        interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>;
        qcom,ee = <0>;
        qcom,channel = <0>;
        #address-cells = <2>;
        #size-cells = <0>;
        interrupt-controller;
        #interrupt-cells = <4>;

        pmi8998_lsid0: pmic@2 {
            compatible = "qcom,pmi8998", "qcom,spmi-pmic";
            reg = <0x2 SPMI_USID>;
            #address-cells = <1>;
            #size-cells = <0>;

            pmi8998_gpio: gpios@c000 {
                compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio";
                reg = <0xc000>;
                gpio-controller;
                gpio-ranges = <&pmi8998_gpio 0 0 14>;
                #gpio-cells = <2>;
                interrupt-controller;
                #interrupt-cells = <2>;
            };
        };
    };