xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-gpio.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2354d7675SEmmanuel Vadot%YAML 1.2
3354d7675SEmmanuel Vadot---
4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,pmic-gpio.yaml#
5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6354d7675SEmmanuel Vadot
7354d7675SEmmanuel Vadottitle: Qualcomm PMIC GPIO block
8354d7675SEmmanuel Vadot
9354d7675SEmmanuel Vadotmaintainers:
10354d7675SEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
11354d7675SEmmanuel Vadot
12354d7675SEmmanuel Vadotdescription:
13354d7675SEmmanuel Vadot  This binding describes the GPIO block(s) found in the 8xxx series of
14354d7675SEmmanuel Vadot  PMIC's from Qualcomm.
15354d7675SEmmanuel Vadot
16354d7675SEmmanuel Vadotproperties:
17354d7675SEmmanuel Vadot  compatible:
18354d7675SEmmanuel Vadot    items:
19354d7675SEmmanuel Vadot      - enum:
20e67e8565SEmmanuel Vadot          - qcom,pm2250-gpio
21354d7675SEmmanuel Vadot          - qcom,pm660-gpio
22354d7675SEmmanuel Vadot          - qcom,pm660l-gpio
23d5b0e70fSEmmanuel Vadot          - qcom,pm6125-gpio
24354d7675SEmmanuel Vadot          - qcom,pm6150-gpio
25354d7675SEmmanuel Vadot          - qcom,pm6150l-gpio
268cc087a1SEmmanuel Vadot          - qcom,pm6350-gpio
27*7ef62cebSEmmanuel Vadot          - qcom,pm7250b-gpio
28354d7675SEmmanuel Vadot          - qcom,pm7325-gpio
29354d7675SEmmanuel Vadot          - qcom,pm8005-gpio
30354d7675SEmmanuel Vadot          - qcom,pm8008-gpio
31354d7675SEmmanuel Vadot          - qcom,pm8018-gpio
32e67e8565SEmmanuel Vadot          - qcom,pm8019-gpio
33354d7675SEmmanuel Vadot          - qcom,pm8038-gpio
34354d7675SEmmanuel Vadot          - qcom,pm8058-gpio
35354d7675SEmmanuel Vadot          - qcom,pm8150-gpio
36354d7675SEmmanuel Vadot          - qcom,pm8150b-gpio
37d5b0e70fSEmmanuel Vadot          - qcom,pm8150l-gpio
38e67e8565SEmmanuel Vadot          - qcom,pm8226-gpio
39354d7675SEmmanuel Vadot          - qcom,pm8350-gpio
40354d7675SEmmanuel Vadot          - qcom,pm8350b-gpio
41354d7675SEmmanuel Vadot          - qcom,pm8350c-gpio
42c9ccf3a3SEmmanuel Vadot          - qcom,pm8450-gpio
43354d7675SEmmanuel Vadot          - qcom,pm8916-gpio
44354d7675SEmmanuel Vadot          - qcom,pm8917-gpio
45354d7675SEmmanuel Vadot          - qcom,pm8921-gpio
46354d7675SEmmanuel Vadot          - qcom,pm8941-gpio
47354d7675SEmmanuel Vadot          - qcom,pm8950-gpio
48354d7675SEmmanuel Vadot          - qcom,pm8994-gpio
49354d7675SEmmanuel Vadot          - qcom,pm8998-gpio
50354d7675SEmmanuel Vadot          - qcom,pma8084-gpio
51354d7675SEmmanuel Vadot          - qcom,pmi8950-gpio
52354d7675SEmmanuel Vadot          - qcom,pmi8994-gpio
53354d7675SEmmanuel Vadot          - qcom,pmi8998-gpio
54354d7675SEmmanuel Vadot          - qcom,pmk8350-gpio
55d5b0e70fSEmmanuel Vadot          - qcom,pmm8155au-gpio
56b97ee269SEmmanuel Vadot          - qcom,pmp8074-gpio
57354d7675SEmmanuel Vadot          - qcom,pmr735a-gpio
58354d7675SEmmanuel Vadot          - qcom,pmr735b-gpio
59354d7675SEmmanuel Vadot          - qcom,pms405-gpio
60354d7675SEmmanuel Vadot          - qcom,pmx55-gpio
61d5b0e70fSEmmanuel Vadot          - qcom,pmx65-gpio
62354d7675SEmmanuel Vadot
63354d7675SEmmanuel Vadot      - enum:
64354d7675SEmmanuel Vadot          - qcom,spmi-gpio
65354d7675SEmmanuel Vadot          - qcom,ssbi-gpio
66354d7675SEmmanuel Vadot
67354d7675SEmmanuel Vadot  reg:
68354d7675SEmmanuel Vadot    maxItems: 1
69354d7675SEmmanuel Vadot
70354d7675SEmmanuel Vadot  interrupt-controller: true
71354d7675SEmmanuel Vadot
72354d7675SEmmanuel Vadot  '#interrupt-cells':
73354d7675SEmmanuel Vadot    const: 2
74354d7675SEmmanuel Vadot
75354d7675SEmmanuel Vadot  gpio-controller: true
76354d7675SEmmanuel Vadot
77354d7675SEmmanuel Vadot  gpio-ranges:
78354d7675SEmmanuel Vadot    maxItems: 1
79354d7675SEmmanuel Vadot
80d5b0e70fSEmmanuel Vadot  gpio-line-names:
81d5b0e70fSEmmanuel Vadot    minItems: 2
82d5b0e70fSEmmanuel Vadot    maxItems: 44
83d5b0e70fSEmmanuel Vadot
84d5b0e70fSEmmanuel Vadot  gpio-reserved-ranges:
85d5b0e70fSEmmanuel Vadot    minItems: 1
86d5b0e70fSEmmanuel Vadot    # maxItems as half of total number of GPIOs, as there has to be at
87d5b0e70fSEmmanuel Vadot    # least one usable GPIO between each reserved range.
88d5b0e70fSEmmanuel Vadot    maxItems: 22
89d5b0e70fSEmmanuel Vadot
90354d7675SEmmanuel Vadot  '#gpio-cells':
91354d7675SEmmanuel Vadot    const: 2
92354d7675SEmmanuel Vadot    description:
93354d7675SEmmanuel Vadot      The first cell will be used to define gpio number and the
94354d7675SEmmanuel Vadot      second denotes the flags for this gpio
95354d7675SEmmanuel Vadot
96354d7675SEmmanuel VadotadditionalProperties: false
97354d7675SEmmanuel Vadot
98354d7675SEmmanuel Vadotrequired:
99354d7675SEmmanuel Vadot  - compatible
100354d7675SEmmanuel Vadot  - reg
101354d7675SEmmanuel Vadot  - gpio-controller
102354d7675SEmmanuel Vadot  - '#gpio-cells'
103354d7675SEmmanuel Vadot  - gpio-ranges
104354d7675SEmmanuel Vadot  - interrupt-controller
105354d7675SEmmanuel Vadot
106d5b0e70fSEmmanuel VadotallOf:
107d5b0e70fSEmmanuel Vadot  - if:
108d5b0e70fSEmmanuel Vadot      properties:
109d5b0e70fSEmmanuel Vadot        compatible:
110d5b0e70fSEmmanuel Vadot          contains:
111d5b0e70fSEmmanuel Vadot            enum:
112d5b0e70fSEmmanuel Vadot              - qcom,pm8008-gpio
113d5b0e70fSEmmanuel Vadot              - qcom,pmi8950-gpio
114d5b0e70fSEmmanuel Vadot    then:
115d5b0e70fSEmmanuel Vadot      properties:
116d5b0e70fSEmmanuel Vadot        gpio-line-names:
117d5b0e70fSEmmanuel Vadot          minItems: 2
118d5b0e70fSEmmanuel Vadot          maxItems: 2
119d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
120d5b0e70fSEmmanuel Vadot          maxItems: 1
121d5b0e70fSEmmanuel Vadot
122d5b0e70fSEmmanuel Vadot  - if:
123d5b0e70fSEmmanuel Vadot      properties:
124d5b0e70fSEmmanuel Vadot        compatible:
125d5b0e70fSEmmanuel Vadot          contains:
126d5b0e70fSEmmanuel Vadot            enum:
127d5b0e70fSEmmanuel Vadot              - qcom,pm8005-gpio
128d5b0e70fSEmmanuel Vadot              - qcom,pm8450-gpio
129d5b0e70fSEmmanuel Vadot              - qcom,pm8916-gpio
130d5b0e70fSEmmanuel Vadot              - qcom,pmk8350-gpio
131d5b0e70fSEmmanuel Vadot              - qcom,pmr735a-gpio
132d5b0e70fSEmmanuel Vadot              - qcom,pmr735b-gpio
133d5b0e70fSEmmanuel Vadot    then:
134d5b0e70fSEmmanuel Vadot      properties:
135d5b0e70fSEmmanuel Vadot        gpio-line-names:
136d5b0e70fSEmmanuel Vadot          minItems: 4
137d5b0e70fSEmmanuel Vadot          maxItems: 4
138d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
139d5b0e70fSEmmanuel Vadot          minItems: 1
140d5b0e70fSEmmanuel Vadot          maxItems: 2
141d5b0e70fSEmmanuel Vadot
142d5b0e70fSEmmanuel Vadot  - if:
143d5b0e70fSEmmanuel Vadot      properties:
144d5b0e70fSEmmanuel Vadot        compatible:
145d5b0e70fSEmmanuel Vadot          contains:
146d5b0e70fSEmmanuel Vadot            enum:
147d5b0e70fSEmmanuel Vadot              - qcom,pm8018-gpio
148d5b0e70fSEmmanuel Vadot              - qcom,pm8019-gpio
149d5b0e70fSEmmanuel Vadot    then:
150d5b0e70fSEmmanuel Vadot      properties:
151d5b0e70fSEmmanuel Vadot        gpio-line-names:
152d5b0e70fSEmmanuel Vadot          minItems: 6
153d5b0e70fSEmmanuel Vadot          maxItems: 6
154d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
155d5b0e70fSEmmanuel Vadot          minItems: 1
156d5b0e70fSEmmanuel Vadot          maxItems: 3
157d5b0e70fSEmmanuel Vadot
158d5b0e70fSEmmanuel Vadot  - if:
159d5b0e70fSEmmanuel Vadot      properties:
160d5b0e70fSEmmanuel Vadot        compatible:
161d5b0e70fSEmmanuel Vadot          contains:
162d5b0e70fSEmmanuel Vadot            enum:
163b97ee269SEmmanuel Vadot              - qcom,pm8226-gpio
164d5b0e70fSEmmanuel Vadot              - qcom,pm8350b-gpio
165d5b0e70fSEmmanuel Vadot              - qcom,pm8950-gpio
166d5b0e70fSEmmanuel Vadot    then:
167d5b0e70fSEmmanuel Vadot      properties:
168d5b0e70fSEmmanuel Vadot        gpio-line-names:
169d5b0e70fSEmmanuel Vadot          minItems: 8
170d5b0e70fSEmmanuel Vadot          maxItems: 8
171d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
172d5b0e70fSEmmanuel Vadot          minItems: 1
173d5b0e70fSEmmanuel Vadot          maxItems: 4
174d5b0e70fSEmmanuel Vadot
175d5b0e70fSEmmanuel Vadot  - if:
176d5b0e70fSEmmanuel Vadot      properties:
177d5b0e70fSEmmanuel Vadot        compatible:
178d5b0e70fSEmmanuel Vadot          contains:
179d5b0e70fSEmmanuel Vadot            enum:
180d5b0e70fSEmmanuel Vadot              - qcom,pm6350-gpio
181d5b0e70fSEmmanuel Vadot              - qcom,pm8350c-gpio
182d5b0e70fSEmmanuel Vadot    then:
183d5b0e70fSEmmanuel Vadot      properties:
184d5b0e70fSEmmanuel Vadot        gpio-line-names:
185d5b0e70fSEmmanuel Vadot          minItems: 9
186d5b0e70fSEmmanuel Vadot          maxItems: 9
187d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
188d5b0e70fSEmmanuel Vadot          minItems: 1
189d5b0e70fSEmmanuel Vadot          maxItems: 5
190d5b0e70fSEmmanuel Vadot
191d5b0e70fSEmmanuel Vadot  - if:
192d5b0e70fSEmmanuel Vadot      properties:
193d5b0e70fSEmmanuel Vadot        compatible:
194d5b0e70fSEmmanuel Vadot          contains:
195d5b0e70fSEmmanuel Vadot            enum:
196d5b0e70fSEmmanuel Vadot              - qcom,pm2250-gpio
197d5b0e70fSEmmanuel Vadot              - qcom,pm6150-gpio
198d5b0e70fSEmmanuel Vadot              - qcom,pm7325-gpio
199d5b0e70fSEmmanuel Vadot              - qcom,pm8150-gpio
200d5b0e70fSEmmanuel Vadot              - qcom,pm8350-gpio
201d5b0e70fSEmmanuel Vadot              - qcom,pmc8180-gpio
202d5b0e70fSEmmanuel Vadot              - qcom,pmi8994-gpio
203d5b0e70fSEmmanuel Vadot              - qcom,pmm8155au-gpio
204d5b0e70fSEmmanuel Vadot    then:
205d5b0e70fSEmmanuel Vadot      properties:
206d5b0e70fSEmmanuel Vadot        gpio-line-names:
207d5b0e70fSEmmanuel Vadot          minItems: 10
208d5b0e70fSEmmanuel Vadot          maxItems: 10
209d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
210d5b0e70fSEmmanuel Vadot          minItems: 1
211d5b0e70fSEmmanuel Vadot          maxItems: 5
212d5b0e70fSEmmanuel Vadot
213d5b0e70fSEmmanuel Vadot  - if:
214d5b0e70fSEmmanuel Vadot      properties:
215d5b0e70fSEmmanuel Vadot        compatible:
216d5b0e70fSEmmanuel Vadot          contains:
217d5b0e70fSEmmanuel Vadot            enum:
218d5b0e70fSEmmanuel Vadot              - qcom,pmx55-gpio
219d5b0e70fSEmmanuel Vadot    then:
220d5b0e70fSEmmanuel Vadot      properties:
221d5b0e70fSEmmanuel Vadot        gpio-line-names:
222d5b0e70fSEmmanuel Vadot          minItems: 11
223d5b0e70fSEmmanuel Vadot          maxItems: 11
224d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
225d5b0e70fSEmmanuel Vadot          minItems: 1
226d5b0e70fSEmmanuel Vadot          maxItems: 6
227d5b0e70fSEmmanuel Vadot
228d5b0e70fSEmmanuel Vadot  - if:
229d5b0e70fSEmmanuel Vadot      properties:
230d5b0e70fSEmmanuel Vadot        compatible:
231d5b0e70fSEmmanuel Vadot          contains:
232d5b0e70fSEmmanuel Vadot            enum:
233d5b0e70fSEmmanuel Vadot              - qcom,pm660l-gpio
234d5b0e70fSEmmanuel Vadot              - qcom,pm6150l-gpio
235*7ef62cebSEmmanuel Vadot              - qcom,pm7250b-gpio
236d5b0e70fSEmmanuel Vadot              - qcom,pm8038-gpio
237d5b0e70fSEmmanuel Vadot              - qcom,pm8150b-gpio
238d5b0e70fSEmmanuel Vadot              - qcom,pm8150l-gpio
239d5b0e70fSEmmanuel Vadot              - qcom,pmc8180c-gpio
240b97ee269SEmmanuel Vadot              - qcom,pmp8074-gpio
241d5b0e70fSEmmanuel Vadot              - qcom,pms405-gpio
242d5b0e70fSEmmanuel Vadot    then:
243d5b0e70fSEmmanuel Vadot      properties:
244d5b0e70fSEmmanuel Vadot        gpio-line-names:
245d5b0e70fSEmmanuel Vadot          minItems: 12
246d5b0e70fSEmmanuel Vadot          maxItems: 12
247d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
248d5b0e70fSEmmanuel Vadot          minItems: 1
249d5b0e70fSEmmanuel Vadot          maxItems: 6
250d5b0e70fSEmmanuel Vadot
251d5b0e70fSEmmanuel Vadot  - if:
252d5b0e70fSEmmanuel Vadot      properties:
253d5b0e70fSEmmanuel Vadot        compatible:
254d5b0e70fSEmmanuel Vadot          contains:
255d5b0e70fSEmmanuel Vadot            enum:
256d5b0e70fSEmmanuel Vadot              - qcom,pm660-gpio
257d5b0e70fSEmmanuel Vadot    then:
258d5b0e70fSEmmanuel Vadot      properties:
259d5b0e70fSEmmanuel Vadot        gpio-line-names:
260d5b0e70fSEmmanuel Vadot          minItems: 13
261d5b0e70fSEmmanuel Vadot          maxItems: 13
262d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
263d5b0e70fSEmmanuel Vadot          minItems: 1
264d5b0e70fSEmmanuel Vadot          maxItems: 7
265d5b0e70fSEmmanuel Vadot
266d5b0e70fSEmmanuel Vadot  - if:
267d5b0e70fSEmmanuel Vadot      properties:
268d5b0e70fSEmmanuel Vadot        compatible:
269d5b0e70fSEmmanuel Vadot          contains:
270d5b0e70fSEmmanuel Vadot            enum:
271d5b0e70fSEmmanuel Vadot              - qcom,pmi8998-gpio
272d5b0e70fSEmmanuel Vadot    then:
273d5b0e70fSEmmanuel Vadot      properties:
274d5b0e70fSEmmanuel Vadot        gpio-line-names:
275d5b0e70fSEmmanuel Vadot          minItems: 14
276d5b0e70fSEmmanuel Vadot          maxItems: 14
277d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
278d5b0e70fSEmmanuel Vadot          minItems: 1
279d5b0e70fSEmmanuel Vadot          maxItems: 7
280d5b0e70fSEmmanuel Vadot
281d5b0e70fSEmmanuel Vadot  - if:
282d5b0e70fSEmmanuel Vadot      properties:
283d5b0e70fSEmmanuel Vadot        compatible:
284d5b0e70fSEmmanuel Vadot          contains:
285d5b0e70fSEmmanuel Vadot            enum:
286d5b0e70fSEmmanuel Vadot              - qcom,pmx65-gpio
287d5b0e70fSEmmanuel Vadot    then:
288d5b0e70fSEmmanuel Vadot      properties:
289d5b0e70fSEmmanuel Vadot        gpio-line-names:
290d5b0e70fSEmmanuel Vadot          minItems: 16
291d5b0e70fSEmmanuel Vadot          maxItems: 16
292d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
293d5b0e70fSEmmanuel Vadot          minItems: 1
294d5b0e70fSEmmanuel Vadot          maxItems: 8
295d5b0e70fSEmmanuel Vadot
296d5b0e70fSEmmanuel Vadot  - if:
297d5b0e70fSEmmanuel Vadot      properties:
298d5b0e70fSEmmanuel Vadot        compatible:
299d5b0e70fSEmmanuel Vadot          contains:
300d5b0e70fSEmmanuel Vadot            enum:
301d5b0e70fSEmmanuel Vadot              - qcom,pm8994-gpio
302d5b0e70fSEmmanuel Vadot              - qcom,pma8084-gpio
303d5b0e70fSEmmanuel Vadot    then:
304d5b0e70fSEmmanuel Vadot      properties:
305d5b0e70fSEmmanuel Vadot        gpio-line-names:
306d5b0e70fSEmmanuel Vadot          minItems: 22
307d5b0e70fSEmmanuel Vadot          maxItems: 22
308d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
309d5b0e70fSEmmanuel Vadot          minItems: 1
310d5b0e70fSEmmanuel Vadot          maxItems: 11
311d5b0e70fSEmmanuel Vadot
312d5b0e70fSEmmanuel Vadot  - if:
313d5b0e70fSEmmanuel Vadot      properties:
314d5b0e70fSEmmanuel Vadot        compatible:
315d5b0e70fSEmmanuel Vadot          contains:
316d5b0e70fSEmmanuel Vadot            enum:
317d5b0e70fSEmmanuel Vadot              - qcom,pm8998-gpio
318d5b0e70fSEmmanuel Vadot    then:
319d5b0e70fSEmmanuel Vadot      properties:
320d5b0e70fSEmmanuel Vadot        gpio-line-names:
321d5b0e70fSEmmanuel Vadot          minItems: 26
322d5b0e70fSEmmanuel Vadot          maxItems: 26
323d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
324d5b0e70fSEmmanuel Vadot          minItems: 1
325d5b0e70fSEmmanuel Vadot          maxItems: 13
326d5b0e70fSEmmanuel Vadot
327d5b0e70fSEmmanuel Vadot  - if:
328d5b0e70fSEmmanuel Vadot      properties:
329d5b0e70fSEmmanuel Vadot        compatible:
330d5b0e70fSEmmanuel Vadot          contains:
331d5b0e70fSEmmanuel Vadot            enum:
332d5b0e70fSEmmanuel Vadot              - qcom,pm8941-gpio
333d5b0e70fSEmmanuel Vadot    then:
334d5b0e70fSEmmanuel Vadot      properties:
335d5b0e70fSEmmanuel Vadot        gpio-line-names:
336d5b0e70fSEmmanuel Vadot          minItems: 36
337d5b0e70fSEmmanuel Vadot          maxItems: 36
338d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
339d5b0e70fSEmmanuel Vadot          minItems: 1
340d5b0e70fSEmmanuel Vadot          maxItems: 18
341d5b0e70fSEmmanuel Vadot
342d5b0e70fSEmmanuel Vadot  - if:
343d5b0e70fSEmmanuel Vadot      properties:
344d5b0e70fSEmmanuel Vadot        compatible:
345d5b0e70fSEmmanuel Vadot          contains:
346d5b0e70fSEmmanuel Vadot            enum:
347d5b0e70fSEmmanuel Vadot              - qcom,pm8917-gpio
348d5b0e70fSEmmanuel Vadot    then:
349d5b0e70fSEmmanuel Vadot      properties:
350d5b0e70fSEmmanuel Vadot        gpio-line-names:
351d5b0e70fSEmmanuel Vadot          minItems: 38
352d5b0e70fSEmmanuel Vadot          maxItems: 38
353d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
354d5b0e70fSEmmanuel Vadot          minItems: 1
355d5b0e70fSEmmanuel Vadot          maxItems: 19
356d5b0e70fSEmmanuel Vadot
357d5b0e70fSEmmanuel Vadot  - if:
358d5b0e70fSEmmanuel Vadot      properties:
359d5b0e70fSEmmanuel Vadot        compatible:
360d5b0e70fSEmmanuel Vadot          contains:
361d5b0e70fSEmmanuel Vadot            enum:
362d5b0e70fSEmmanuel Vadot              - qcom,pm8058-gpio
363d5b0e70fSEmmanuel Vadot              - qcom,pm8921-gpio
364d5b0e70fSEmmanuel Vadot    then:
365d5b0e70fSEmmanuel Vadot      properties:
366d5b0e70fSEmmanuel Vadot        gpio-line-names:
367d5b0e70fSEmmanuel Vadot          minItems: 44
368d5b0e70fSEmmanuel Vadot          maxItems: 44
369d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
370d5b0e70fSEmmanuel Vadot          minItems: 1
371d5b0e70fSEmmanuel Vadot          maxItems: 22
372d5b0e70fSEmmanuel Vadot
373354d7675SEmmanuel VadotpatternProperties:
374354d7675SEmmanuel Vadot  '-state$':
375354d7675SEmmanuel Vadot    oneOf:
376354d7675SEmmanuel Vadot      - $ref: "#/$defs/qcom-pmic-gpio-state"
377354d7675SEmmanuel Vadot      - patternProperties:
378d5b0e70fSEmmanuel Vadot          "(pinconf|-pins)$":
379354d7675SEmmanuel Vadot            $ref: "#/$defs/qcom-pmic-gpio-state"
380d5b0e70fSEmmanuel Vadot        additionalProperties: false
381354d7675SEmmanuel Vadot
382354d7675SEmmanuel Vadot$defs:
383354d7675SEmmanuel Vadot  qcom-pmic-gpio-state:
384354d7675SEmmanuel Vadot    type: object
385354d7675SEmmanuel Vadot    allOf:
386354d7675SEmmanuel Vadot      - $ref: "pinmux-node.yaml"
387354d7675SEmmanuel Vadot      - $ref: "pincfg-node.yaml"
388354d7675SEmmanuel Vadot    properties:
389354d7675SEmmanuel Vadot      pins:
390354d7675SEmmanuel Vadot        description:
391354d7675SEmmanuel Vadot          List of gpio pins affected by the properties specified in
392354d7675SEmmanuel Vadot          this subnode.  Valid pins are
393d5b0e70fSEmmanuel Vadot                 - gpio1-gpio9 for pm6125
394354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pm6150
395354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pm6150l
3968cc087a1SEmmanuel Vadot                 - gpio1-gpio9 for pm6350
397*7ef62cebSEmmanuel Vadot                 - gpio1-gpio12 for pm7250b
398354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pm7325
399354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pm8005
400354d7675SEmmanuel Vadot                 - gpio1-gpio2 for pm8008
401354d7675SEmmanuel Vadot                 - gpio1-gpio6 for pm8018
402354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pm8038
403354d7675SEmmanuel Vadot                 - gpio1-gpio40 for pm8058
404354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pm8150 (holes on gpio2, gpio5,
405354d7675SEmmanuel Vadot                                            gpio7 and gpio8)
406354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pm8150b (holes on gpio3, gpio4
407354d7675SEmmanuel Vadot                                             and gpio7)
408354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pm8150l (hole on gpio7)
409354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pm8916
410354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pm8350
411354d7675SEmmanuel Vadot                 - gpio1-gpio8 for pm8350b
412354d7675SEmmanuel Vadot                 - gpio1-gpio9 for pm8350c
413*7ef62cebSEmmanuel Vadot                 - gpio1-gpio4 for pm8450
414354d7675SEmmanuel Vadot                 - gpio1-gpio38 for pm8917
415354d7675SEmmanuel Vadot                 - gpio1-gpio44 for pm8921
416354d7675SEmmanuel Vadot                 - gpio1-gpio36 for pm8941
417354d7675SEmmanuel Vadot                 - gpio1-gpio8 for pm8950 (hole on gpio3)
418354d7675SEmmanuel Vadot                 - gpio1-gpio22 for pm8994
419354d7675SEmmanuel Vadot                 - gpio1-gpio26 for pm8998
420354d7675SEmmanuel Vadot                 - gpio1-gpio22 for pma8084
421354d7675SEmmanuel Vadot                 - gpio1-gpio2 for pmi8950
422354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pmi8994
423354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pmk8350
424d5b0e70fSEmmanuel Vadot                 - gpio1-gpio10 for pmm8155au
425b97ee269SEmmanuel Vadot                 - gpio1-gpio12 for pmp8074 (holes on gpio1 and gpio12)
426354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pmr735a
427354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pmr735b
428354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pms405 (holes on gpio1, gpio9
429354d7675SEmmanuel Vadot                                            and gpio10)
430354d7675SEmmanuel Vadot                 - gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10
431354d7675SEmmanuel Vadot                                            and gpio11)
432d5b0e70fSEmmanuel Vadot                 - gpio1-gpio16 for pmx65
433354d7675SEmmanuel Vadot
434354d7675SEmmanuel Vadot        items:
435354d7675SEmmanuel Vadot          pattern: "^gpio([0-9]+)$"
436354d7675SEmmanuel Vadot
437354d7675SEmmanuel Vadot      function:
438354d7675SEmmanuel Vadot        items:
439354d7675SEmmanuel Vadot          - enum:
440354d7675SEmmanuel Vadot              - normal
441354d7675SEmmanuel Vadot              - paired
442354d7675SEmmanuel Vadot              - func1
443354d7675SEmmanuel Vadot              - func2
444354d7675SEmmanuel Vadot              - dtest1
445354d7675SEmmanuel Vadot              - dtest2
446354d7675SEmmanuel Vadot              - dtest3
447354d7675SEmmanuel Vadot              - dtest4
448354d7675SEmmanuel Vadot              - func3  # supported by LV/MV GPIO subtypes
449354d7675SEmmanuel Vadot              - func4  # supported by LV/MV GPIO subtypes
450354d7675SEmmanuel Vadot
451354d7675SEmmanuel Vadot      bias-disable: true
452354d7675SEmmanuel Vadot      bias-pull-down: true
453354d7675SEmmanuel Vadot      bias-pull-up: true
454354d7675SEmmanuel Vadot
455354d7675SEmmanuel Vadot      qcom,pull-up-strength:
456354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
457354d7675SEmmanuel Vadot        description:
458354d7675SEmmanuel Vadot          Specifies the strength to use for pull up, if selected.
459354d7675SEmmanuel Vadot          Valid values are defined in
460354d7675SEmmanuel Vadot          <dt-bindings/pinctrl/qcom,pmic-gpio.h>
461354d7675SEmmanuel Vadot          If this property is omitted 30uA strength will be used
462354d7675SEmmanuel Vadot          if pull up is selected
463354d7675SEmmanuel Vadot        enum: [0, 1, 2, 3]
464354d7675SEmmanuel Vadot
465354d7675SEmmanuel Vadot      bias-high-impedance: true
466354d7675SEmmanuel Vadot      input-enable: true
467d5b0e70fSEmmanuel Vadot      input-disable: true
468354d7675SEmmanuel Vadot      output-high: true
469354d7675SEmmanuel Vadot      output-low: true
4708cc087a1SEmmanuel Vadot      output-enable: true
4718cc087a1SEmmanuel Vadot      output-disable: true
472354d7675SEmmanuel Vadot      power-source: true
473354d7675SEmmanuel Vadot
474354d7675SEmmanuel Vadot      qcom,drive-strength:
475354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
476354d7675SEmmanuel Vadot        description:
477354d7675SEmmanuel Vadot          Selects the drive strength for the specified pins
478354d7675SEmmanuel Vadot          Valid drive strength values are defined in
479354d7675SEmmanuel Vadot          <dt-bindings/pinctrl/qcom,pmic-gpio.h>
480354d7675SEmmanuel Vadot        enum: [0, 1, 2, 3]
481354d7675SEmmanuel Vadot
482354d7675SEmmanuel Vadot      drive-push-pull: true
483354d7675SEmmanuel Vadot      drive-open-drain: true
484354d7675SEmmanuel Vadot      drive-open-source: true
485354d7675SEmmanuel Vadot
486354d7675SEmmanuel Vadot      qcom,analog-pass:
487354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/flag
488354d7675SEmmanuel Vadot        description:
489354d7675SEmmanuel Vadot          The specified pins are configured in
490354d7675SEmmanuel Vadot          analog-pass-through mode.
491354d7675SEmmanuel Vadot
492354d7675SEmmanuel Vadot      qcom,atest:
493354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
494354d7675SEmmanuel Vadot        description:
495354d7675SEmmanuel Vadot          Selects ATEST rail to route to GPIO when it's
496354d7675SEmmanuel Vadot          configured in analog-pass-through mode.
497354d7675SEmmanuel Vadot        enum: [1, 2, 3, 4]
498354d7675SEmmanuel Vadot
499354d7675SEmmanuel Vadot      qcom,dtest-buffer:
500354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
501354d7675SEmmanuel Vadot        description:
502354d7675SEmmanuel Vadot          Selects DTEST rail to route to GPIO when it's
503354d7675SEmmanuel Vadot          configured as digital input.
504354d7675SEmmanuel Vadot        enum: [1, 2, 3, 4]
505354d7675SEmmanuel Vadot
506354d7675SEmmanuel Vadot    required:
507354d7675SEmmanuel Vadot      - pins
508354d7675SEmmanuel Vadot      - function
509354d7675SEmmanuel Vadot
510354d7675SEmmanuel Vadot    additionalProperties: false
511354d7675SEmmanuel Vadot
512354d7675SEmmanuel Vadotexamples:
513354d7675SEmmanuel Vadot  - |
514354d7675SEmmanuel Vadot    #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
515354d7675SEmmanuel Vadot
516354d7675SEmmanuel Vadot    pm8921_gpio: gpio@150 {
517354d7675SEmmanuel Vadot      compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio";
518354d7675SEmmanuel Vadot      reg = <0x150 0x160>;
519354d7675SEmmanuel Vadot      interrupt-controller;
520354d7675SEmmanuel Vadot      #interrupt-cells = <2>;
521354d7675SEmmanuel Vadot      gpio-controller;
522354d7675SEmmanuel Vadot      gpio-ranges = <&pm8921_gpio 0 0 44>;
523354d7675SEmmanuel Vadot      #gpio-cells = <2>;
524354d7675SEmmanuel Vadot
525354d7675SEmmanuel Vadot      pm8921_gpio_keys: gpio-keys-state {
526d5b0e70fSEmmanuel Vadot        volume-keys-pins {
527354d7675SEmmanuel Vadot          pins = "gpio20", "gpio21";
528354d7675SEmmanuel Vadot          function = "normal";
529354d7675SEmmanuel Vadot
530354d7675SEmmanuel Vadot          input-enable;
531354d7675SEmmanuel Vadot          bias-pull-up;
532354d7675SEmmanuel Vadot          drive-push-pull;
533354d7675SEmmanuel Vadot          qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
534354d7675SEmmanuel Vadot          power-source = <PM8921_GPIO_S4>;
535354d7675SEmmanuel Vadot        };
536354d7675SEmmanuel Vadot      };
537354d7675SEmmanuel Vadot    };
538354d7675SEmmanuel Vadot...
539