xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-gpio.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
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
277ef62cebSEmmanuel 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
43cb7aa33aSEmmanuel Vadot          - qcom,pm8550-gpio
44cb7aa33aSEmmanuel Vadot          - qcom,pm8550b-gpio
45cb7aa33aSEmmanuel Vadot          - qcom,pm8550ve-gpio
46cb7aa33aSEmmanuel Vadot          - qcom,pm8550vs-gpio
47354d7675SEmmanuel Vadot          - qcom,pm8916-gpio
48354d7675SEmmanuel Vadot          - qcom,pm8917-gpio
49354d7675SEmmanuel Vadot          - qcom,pm8921-gpio
50354d7675SEmmanuel Vadot          - qcom,pm8941-gpio
51354d7675SEmmanuel Vadot          - qcom,pm8950-gpio
52354d7675SEmmanuel Vadot          - qcom,pm8994-gpio
53354d7675SEmmanuel Vadot          - qcom,pm8998-gpio
54354d7675SEmmanuel Vadot          - qcom,pma8084-gpio
55*fac71e4eSEmmanuel Vadot          - qcom,pmi632-gpio
56354d7675SEmmanuel Vadot          - qcom,pmi8950-gpio
57354d7675SEmmanuel Vadot          - qcom,pmi8994-gpio
58354d7675SEmmanuel Vadot          - qcom,pmi8998-gpio
59354d7675SEmmanuel Vadot          - qcom,pmk8350-gpio
60cb7aa33aSEmmanuel Vadot          - qcom,pmk8550-gpio
61d5b0e70fSEmmanuel Vadot          - qcom,pmm8155au-gpio
62*fac71e4eSEmmanuel Vadot          - qcom,pmm8654au-gpio
63b97ee269SEmmanuel Vadot          - qcom,pmp8074-gpio
64354d7675SEmmanuel Vadot          - qcom,pmr735a-gpio
65354d7675SEmmanuel Vadot          - qcom,pmr735b-gpio
66cb7aa33aSEmmanuel Vadot          - qcom,pmr735d-gpio
67354d7675SEmmanuel Vadot          - qcom,pms405-gpio
68354d7675SEmmanuel Vadot          - qcom,pmx55-gpio
69d5b0e70fSEmmanuel Vadot          - qcom,pmx65-gpio
70354d7675SEmmanuel Vadot
71354d7675SEmmanuel Vadot      - enum:
72354d7675SEmmanuel Vadot          - qcom,spmi-gpio
73354d7675SEmmanuel Vadot          - qcom,ssbi-gpio
74354d7675SEmmanuel Vadot
75354d7675SEmmanuel Vadot  reg:
76354d7675SEmmanuel Vadot    maxItems: 1
77354d7675SEmmanuel Vadot
78354d7675SEmmanuel Vadot  interrupt-controller: true
79354d7675SEmmanuel Vadot
80354d7675SEmmanuel Vadot  '#interrupt-cells':
81354d7675SEmmanuel Vadot    const: 2
82354d7675SEmmanuel Vadot
83354d7675SEmmanuel Vadot  gpio-controller: true
84354d7675SEmmanuel Vadot
85354d7675SEmmanuel Vadot  gpio-ranges:
86354d7675SEmmanuel Vadot    maxItems: 1
87354d7675SEmmanuel Vadot
88d5b0e70fSEmmanuel Vadot  gpio-line-names:
89d5b0e70fSEmmanuel Vadot    minItems: 2
90d5b0e70fSEmmanuel Vadot    maxItems: 44
91d5b0e70fSEmmanuel Vadot
92d5b0e70fSEmmanuel Vadot  gpio-reserved-ranges:
93d5b0e70fSEmmanuel Vadot    minItems: 1
94d5b0e70fSEmmanuel Vadot    # maxItems as half of total number of GPIOs, as there has to be at
95d5b0e70fSEmmanuel Vadot    # least one usable GPIO between each reserved range.
96d5b0e70fSEmmanuel Vadot    maxItems: 22
97d5b0e70fSEmmanuel Vadot
98354d7675SEmmanuel Vadot  '#gpio-cells':
99354d7675SEmmanuel Vadot    const: 2
100354d7675SEmmanuel Vadot    description:
101354d7675SEmmanuel Vadot      The first cell will be used to define gpio number and the
102354d7675SEmmanuel Vadot      second denotes the flags for this gpio
103354d7675SEmmanuel Vadot
104354d7675SEmmanuel VadotadditionalProperties: false
105354d7675SEmmanuel Vadot
106354d7675SEmmanuel Vadotrequired:
107354d7675SEmmanuel Vadot  - compatible
108354d7675SEmmanuel Vadot  - reg
109354d7675SEmmanuel Vadot  - gpio-controller
110354d7675SEmmanuel Vadot  - '#gpio-cells'
111354d7675SEmmanuel Vadot  - gpio-ranges
112354d7675SEmmanuel Vadot  - interrupt-controller
113354d7675SEmmanuel Vadot
114d5b0e70fSEmmanuel VadotallOf:
115d5b0e70fSEmmanuel Vadot  - if:
116d5b0e70fSEmmanuel Vadot      properties:
117d5b0e70fSEmmanuel Vadot        compatible:
118d5b0e70fSEmmanuel Vadot          contains:
119d5b0e70fSEmmanuel Vadot            enum:
120d5b0e70fSEmmanuel Vadot              - qcom,pm8008-gpio
121d5b0e70fSEmmanuel Vadot              - qcom,pmi8950-gpio
122cb7aa33aSEmmanuel Vadot              - qcom,pmr735d-gpio
123d5b0e70fSEmmanuel Vadot    then:
124d5b0e70fSEmmanuel Vadot      properties:
125d5b0e70fSEmmanuel Vadot        gpio-line-names:
126d5b0e70fSEmmanuel Vadot          minItems: 2
127d5b0e70fSEmmanuel Vadot          maxItems: 2
128d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
129d5b0e70fSEmmanuel Vadot          maxItems: 1
130d5b0e70fSEmmanuel Vadot
131d5b0e70fSEmmanuel Vadot  - if:
132d5b0e70fSEmmanuel Vadot      properties:
133d5b0e70fSEmmanuel Vadot        compatible:
134d5b0e70fSEmmanuel Vadot          contains:
135d5b0e70fSEmmanuel Vadot            enum:
136d5b0e70fSEmmanuel Vadot              - qcom,pm8005-gpio
137d5b0e70fSEmmanuel Vadot              - qcom,pm8450-gpio
138d5b0e70fSEmmanuel Vadot              - qcom,pm8916-gpio
139d5b0e70fSEmmanuel Vadot              - qcom,pmk8350-gpio
140d5b0e70fSEmmanuel Vadot              - qcom,pmr735a-gpio
141d5b0e70fSEmmanuel Vadot              - qcom,pmr735b-gpio
142d5b0e70fSEmmanuel Vadot    then:
143d5b0e70fSEmmanuel Vadot      properties:
144d5b0e70fSEmmanuel Vadot        gpio-line-names:
145d5b0e70fSEmmanuel Vadot          minItems: 4
146d5b0e70fSEmmanuel Vadot          maxItems: 4
147d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
148d5b0e70fSEmmanuel Vadot          minItems: 1
149d5b0e70fSEmmanuel Vadot          maxItems: 2
150d5b0e70fSEmmanuel Vadot
151d5b0e70fSEmmanuel Vadot  - if:
152d5b0e70fSEmmanuel Vadot      properties:
153d5b0e70fSEmmanuel Vadot        compatible:
154d5b0e70fSEmmanuel Vadot          contains:
155d5b0e70fSEmmanuel Vadot            enum:
156d5b0e70fSEmmanuel Vadot              - qcom,pm8018-gpio
157d5b0e70fSEmmanuel Vadot              - qcom,pm8019-gpio
158cb7aa33aSEmmanuel Vadot              - qcom,pm8550vs-gpio
159cb7aa33aSEmmanuel Vadot              - qcom,pmk8550-gpio
160d5b0e70fSEmmanuel Vadot    then:
161d5b0e70fSEmmanuel Vadot      properties:
162d5b0e70fSEmmanuel Vadot        gpio-line-names:
163d5b0e70fSEmmanuel Vadot          minItems: 6
164d5b0e70fSEmmanuel Vadot          maxItems: 6
165d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
166d5b0e70fSEmmanuel Vadot          minItems: 1
167d5b0e70fSEmmanuel Vadot          maxItems: 3
168d5b0e70fSEmmanuel Vadot
169d5b0e70fSEmmanuel Vadot  - if:
170d5b0e70fSEmmanuel Vadot      properties:
171d5b0e70fSEmmanuel Vadot        compatible:
172d5b0e70fSEmmanuel Vadot          contains:
173d5b0e70fSEmmanuel Vadot            enum:
174b97ee269SEmmanuel Vadot              - qcom,pm8226-gpio
175d5b0e70fSEmmanuel Vadot              - qcom,pm8350b-gpio
176cb7aa33aSEmmanuel Vadot              - qcom,pm8550ve-gpio
177d5b0e70fSEmmanuel Vadot              - qcom,pm8950-gpio
178*fac71e4eSEmmanuel Vadot              - qcom,pmi632-gpio
179d5b0e70fSEmmanuel Vadot    then:
180d5b0e70fSEmmanuel Vadot      properties:
181d5b0e70fSEmmanuel Vadot        gpio-line-names:
182d5b0e70fSEmmanuel Vadot          minItems: 8
183d5b0e70fSEmmanuel Vadot          maxItems: 8
184d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
185d5b0e70fSEmmanuel Vadot          minItems: 1
186d5b0e70fSEmmanuel Vadot          maxItems: 4
187d5b0e70fSEmmanuel Vadot
188d5b0e70fSEmmanuel Vadot  - if:
189d5b0e70fSEmmanuel Vadot      properties:
190d5b0e70fSEmmanuel Vadot        compatible:
191d5b0e70fSEmmanuel Vadot          contains:
192d5b0e70fSEmmanuel Vadot            enum:
193d5b0e70fSEmmanuel Vadot              - qcom,pm6350-gpio
194d5b0e70fSEmmanuel Vadot              - qcom,pm8350c-gpio
195d5b0e70fSEmmanuel Vadot    then:
196d5b0e70fSEmmanuel Vadot      properties:
197d5b0e70fSEmmanuel Vadot        gpio-line-names:
198d5b0e70fSEmmanuel Vadot          minItems: 9
199d5b0e70fSEmmanuel Vadot          maxItems: 9
200d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
201d5b0e70fSEmmanuel Vadot          minItems: 1
202d5b0e70fSEmmanuel Vadot          maxItems: 5
203d5b0e70fSEmmanuel Vadot
204d5b0e70fSEmmanuel Vadot  - if:
205d5b0e70fSEmmanuel Vadot      properties:
206d5b0e70fSEmmanuel Vadot        compatible:
207d5b0e70fSEmmanuel Vadot          contains:
208d5b0e70fSEmmanuel Vadot            enum:
209d5b0e70fSEmmanuel Vadot              - qcom,pm2250-gpio
210d5b0e70fSEmmanuel Vadot              - qcom,pm6150-gpio
211d5b0e70fSEmmanuel Vadot              - qcom,pm7325-gpio
212d5b0e70fSEmmanuel Vadot              - qcom,pm8150-gpio
213d5b0e70fSEmmanuel Vadot              - qcom,pm8350-gpio
214d5b0e70fSEmmanuel Vadot              - qcom,pmc8180-gpio
215d5b0e70fSEmmanuel Vadot              - qcom,pmi8994-gpio
216d5b0e70fSEmmanuel Vadot              - qcom,pmm8155au-gpio
217d5b0e70fSEmmanuel Vadot    then:
218d5b0e70fSEmmanuel Vadot      properties:
219d5b0e70fSEmmanuel Vadot        gpio-line-names:
220d5b0e70fSEmmanuel Vadot          minItems: 10
221d5b0e70fSEmmanuel Vadot          maxItems: 10
222d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
223d5b0e70fSEmmanuel Vadot          minItems: 1
224d5b0e70fSEmmanuel Vadot          maxItems: 5
225d5b0e70fSEmmanuel Vadot
226d5b0e70fSEmmanuel Vadot  - if:
227d5b0e70fSEmmanuel Vadot      properties:
228d5b0e70fSEmmanuel Vadot        compatible:
229d5b0e70fSEmmanuel Vadot          contains:
230d5b0e70fSEmmanuel Vadot            enum:
231d5b0e70fSEmmanuel Vadot              - qcom,pmx55-gpio
232d5b0e70fSEmmanuel Vadot    then:
233d5b0e70fSEmmanuel Vadot      properties:
234d5b0e70fSEmmanuel Vadot        gpio-line-names:
235d5b0e70fSEmmanuel Vadot          minItems: 11
236d5b0e70fSEmmanuel Vadot          maxItems: 11
237d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
238d5b0e70fSEmmanuel Vadot          minItems: 1
239d5b0e70fSEmmanuel Vadot          maxItems: 6
240d5b0e70fSEmmanuel Vadot
241d5b0e70fSEmmanuel Vadot  - if:
242d5b0e70fSEmmanuel Vadot      properties:
243d5b0e70fSEmmanuel Vadot        compatible:
244d5b0e70fSEmmanuel Vadot          contains:
245d5b0e70fSEmmanuel Vadot            enum:
246d5b0e70fSEmmanuel Vadot              - qcom,pm660l-gpio
247d5b0e70fSEmmanuel Vadot              - qcom,pm6150l-gpio
2487ef62cebSEmmanuel Vadot              - qcom,pm7250b-gpio
249d5b0e70fSEmmanuel Vadot              - qcom,pm8038-gpio
250d5b0e70fSEmmanuel Vadot              - qcom,pm8150b-gpio
251d5b0e70fSEmmanuel Vadot              - qcom,pm8150l-gpio
252cb7aa33aSEmmanuel Vadot              - qcom,pm8550-gpio
253cb7aa33aSEmmanuel Vadot              - qcom,pm8550b-gpio
254d5b0e70fSEmmanuel Vadot              - qcom,pmc8180c-gpio
255b97ee269SEmmanuel Vadot              - qcom,pmp8074-gpio
256d5b0e70fSEmmanuel Vadot              - qcom,pms405-gpio
257d5b0e70fSEmmanuel Vadot    then:
258d5b0e70fSEmmanuel Vadot      properties:
259d5b0e70fSEmmanuel Vadot        gpio-line-names:
260d5b0e70fSEmmanuel Vadot          minItems: 12
261d5b0e70fSEmmanuel Vadot          maxItems: 12
262d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
263d5b0e70fSEmmanuel Vadot          minItems: 1
264d5b0e70fSEmmanuel Vadot          maxItems: 6
265d5b0e70fSEmmanuel Vadot
266d5b0e70fSEmmanuel Vadot  - if:
267d5b0e70fSEmmanuel Vadot      properties:
268d5b0e70fSEmmanuel Vadot        compatible:
269d5b0e70fSEmmanuel Vadot          contains:
270d5b0e70fSEmmanuel Vadot            enum:
271d5b0e70fSEmmanuel Vadot              - qcom,pm660-gpio
272d5b0e70fSEmmanuel Vadot    then:
273d5b0e70fSEmmanuel Vadot      properties:
274d5b0e70fSEmmanuel Vadot        gpio-line-names:
275d5b0e70fSEmmanuel Vadot          minItems: 13
276d5b0e70fSEmmanuel Vadot          maxItems: 13
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,pmi8998-gpio
287d5b0e70fSEmmanuel Vadot    then:
288d5b0e70fSEmmanuel Vadot      properties:
289d5b0e70fSEmmanuel Vadot        gpio-line-names:
290d5b0e70fSEmmanuel Vadot          minItems: 14
291d5b0e70fSEmmanuel Vadot          maxItems: 14
292d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
293d5b0e70fSEmmanuel Vadot          minItems: 1
294d5b0e70fSEmmanuel Vadot          maxItems: 7
295d5b0e70fSEmmanuel Vadot
296d5b0e70fSEmmanuel Vadot  - if:
297d5b0e70fSEmmanuel Vadot      properties:
298d5b0e70fSEmmanuel Vadot        compatible:
299d5b0e70fSEmmanuel Vadot          contains:
300d5b0e70fSEmmanuel Vadot            enum:
301d5b0e70fSEmmanuel Vadot              - qcom,pmx65-gpio
302d5b0e70fSEmmanuel Vadot    then:
303d5b0e70fSEmmanuel Vadot      properties:
304d5b0e70fSEmmanuel Vadot        gpio-line-names:
305d5b0e70fSEmmanuel Vadot          minItems: 16
306d5b0e70fSEmmanuel Vadot          maxItems: 16
307d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
308d5b0e70fSEmmanuel Vadot          minItems: 1
309d5b0e70fSEmmanuel Vadot          maxItems: 8
310d5b0e70fSEmmanuel Vadot
311d5b0e70fSEmmanuel Vadot  - if:
312d5b0e70fSEmmanuel Vadot      properties:
313d5b0e70fSEmmanuel Vadot        compatible:
314d5b0e70fSEmmanuel Vadot          contains:
315d5b0e70fSEmmanuel Vadot            enum:
316d5b0e70fSEmmanuel Vadot              - qcom,pm8994-gpio
317d5b0e70fSEmmanuel Vadot              - qcom,pma8084-gpio
318d5b0e70fSEmmanuel Vadot    then:
319d5b0e70fSEmmanuel Vadot      properties:
320d5b0e70fSEmmanuel Vadot        gpio-line-names:
321d5b0e70fSEmmanuel Vadot          minItems: 22
322d5b0e70fSEmmanuel Vadot          maxItems: 22
323d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
324d5b0e70fSEmmanuel Vadot          minItems: 1
325d5b0e70fSEmmanuel Vadot          maxItems: 11
326d5b0e70fSEmmanuel Vadot
327d5b0e70fSEmmanuel Vadot  - if:
328d5b0e70fSEmmanuel Vadot      properties:
329d5b0e70fSEmmanuel Vadot        compatible:
330d5b0e70fSEmmanuel Vadot          contains:
331d5b0e70fSEmmanuel Vadot            enum:
332d5b0e70fSEmmanuel Vadot              - qcom,pm8998-gpio
333d5b0e70fSEmmanuel Vadot    then:
334d5b0e70fSEmmanuel Vadot      properties:
335d5b0e70fSEmmanuel Vadot        gpio-line-names:
336d5b0e70fSEmmanuel Vadot          minItems: 26
337d5b0e70fSEmmanuel Vadot          maxItems: 26
338d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
339d5b0e70fSEmmanuel Vadot          minItems: 1
340d5b0e70fSEmmanuel Vadot          maxItems: 13
341d5b0e70fSEmmanuel Vadot
342d5b0e70fSEmmanuel Vadot  - if:
343d5b0e70fSEmmanuel Vadot      properties:
344d5b0e70fSEmmanuel Vadot        compatible:
345d5b0e70fSEmmanuel Vadot          contains:
346d5b0e70fSEmmanuel Vadot            enum:
347d5b0e70fSEmmanuel Vadot              - qcom,pm8941-gpio
348d5b0e70fSEmmanuel Vadot    then:
349d5b0e70fSEmmanuel Vadot      properties:
350d5b0e70fSEmmanuel Vadot        gpio-line-names:
351d5b0e70fSEmmanuel Vadot          minItems: 36
352d5b0e70fSEmmanuel Vadot          maxItems: 36
353d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
354d5b0e70fSEmmanuel Vadot          minItems: 1
355d5b0e70fSEmmanuel Vadot          maxItems: 18
356d5b0e70fSEmmanuel Vadot
357d5b0e70fSEmmanuel Vadot  - if:
358d5b0e70fSEmmanuel Vadot      properties:
359d5b0e70fSEmmanuel Vadot        compatible:
360d5b0e70fSEmmanuel Vadot          contains:
361d5b0e70fSEmmanuel Vadot            enum:
362d5b0e70fSEmmanuel Vadot              - qcom,pm8917-gpio
363d5b0e70fSEmmanuel Vadot    then:
364d5b0e70fSEmmanuel Vadot      properties:
365d5b0e70fSEmmanuel Vadot        gpio-line-names:
366d5b0e70fSEmmanuel Vadot          minItems: 38
367d5b0e70fSEmmanuel Vadot          maxItems: 38
368d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
369d5b0e70fSEmmanuel Vadot          minItems: 1
370d5b0e70fSEmmanuel Vadot          maxItems: 19
371d5b0e70fSEmmanuel Vadot
372d5b0e70fSEmmanuel Vadot  - if:
373d5b0e70fSEmmanuel Vadot      properties:
374d5b0e70fSEmmanuel Vadot        compatible:
375d5b0e70fSEmmanuel Vadot          contains:
376d5b0e70fSEmmanuel Vadot            enum:
377d5b0e70fSEmmanuel Vadot              - qcom,pm8058-gpio
378d5b0e70fSEmmanuel Vadot              - qcom,pm8921-gpio
379d5b0e70fSEmmanuel Vadot    then:
380d5b0e70fSEmmanuel Vadot      properties:
381d5b0e70fSEmmanuel Vadot        gpio-line-names:
382d5b0e70fSEmmanuel Vadot          minItems: 44
383d5b0e70fSEmmanuel Vadot          maxItems: 44
384d5b0e70fSEmmanuel Vadot        gpio-reserved-ranges:
385d5b0e70fSEmmanuel Vadot          minItems: 1
386d5b0e70fSEmmanuel Vadot          maxItems: 22
387d5b0e70fSEmmanuel Vadot
388354d7675SEmmanuel VadotpatternProperties:
389354d7675SEmmanuel Vadot  '-state$':
390354d7675SEmmanuel Vadot    oneOf:
391354d7675SEmmanuel Vadot      - $ref: "#/$defs/qcom-pmic-gpio-state"
392354d7675SEmmanuel Vadot      - patternProperties:
393d5b0e70fSEmmanuel Vadot          "(pinconf|-pins)$":
394354d7675SEmmanuel Vadot            $ref: "#/$defs/qcom-pmic-gpio-state"
395d5b0e70fSEmmanuel Vadot        additionalProperties: false
396354d7675SEmmanuel Vadot
397354d7675SEmmanuel Vadot$defs:
398354d7675SEmmanuel Vadot  qcom-pmic-gpio-state:
399354d7675SEmmanuel Vadot    type: object
400354d7675SEmmanuel Vadot    allOf:
401*fac71e4eSEmmanuel Vadot      - $ref: pinmux-node.yaml
402*fac71e4eSEmmanuel Vadot      - $ref: pincfg-node.yaml
403354d7675SEmmanuel Vadot    properties:
404354d7675SEmmanuel Vadot      pins:
405354d7675SEmmanuel Vadot        description:
406354d7675SEmmanuel Vadot          List of gpio pins affected by the properties specified in
407354d7675SEmmanuel Vadot          this subnode.  Valid pins are
408d5b0e70fSEmmanuel Vadot                 - gpio1-gpio9 for pm6125
409354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pm6150
410354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pm6150l
4118cc087a1SEmmanuel Vadot                 - gpio1-gpio9 for pm6350
4127ef62cebSEmmanuel Vadot                 - gpio1-gpio12 for pm7250b
413354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pm7325
414354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pm8005
415354d7675SEmmanuel Vadot                 - gpio1-gpio2 for pm8008
416354d7675SEmmanuel Vadot                 - gpio1-gpio6 for pm8018
417354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pm8038
418354d7675SEmmanuel Vadot                 - gpio1-gpio40 for pm8058
419354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pm8150 (holes on gpio2, gpio5,
420354d7675SEmmanuel Vadot                                            gpio7 and gpio8)
421354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pm8150b (holes on gpio3, gpio4
422354d7675SEmmanuel Vadot                                             and gpio7)
423354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pm8150l (hole on gpio7)
424354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pm8916
425354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pm8350
426354d7675SEmmanuel Vadot                 - gpio1-gpio8 for pm8350b
427354d7675SEmmanuel Vadot                 - gpio1-gpio9 for pm8350c
4287ef62cebSEmmanuel Vadot                 - gpio1-gpio4 for pm8450
429cb7aa33aSEmmanuel Vadot                 - gpio1-gpio12 for pm8550
430cb7aa33aSEmmanuel Vadot                 - gpio1-gpio12 for pm8550b
431cb7aa33aSEmmanuel Vadot                 - gpio1-gpio8 for pm8550ve
432cb7aa33aSEmmanuel Vadot                 - gpio1-gpio6 for pm8550vs
433354d7675SEmmanuel Vadot                 - gpio1-gpio38 for pm8917
434354d7675SEmmanuel Vadot                 - gpio1-gpio44 for pm8921
435354d7675SEmmanuel Vadot                 - gpio1-gpio36 for pm8941
436354d7675SEmmanuel Vadot                 - gpio1-gpio8 for pm8950 (hole on gpio3)
437354d7675SEmmanuel Vadot                 - gpio1-gpio22 for pm8994
438354d7675SEmmanuel Vadot                 - gpio1-gpio26 for pm8998
439354d7675SEmmanuel Vadot                 - gpio1-gpio22 for pma8084
440*fac71e4eSEmmanuel Vadot                 - gpio1-gpio8 for pmi632
441354d7675SEmmanuel Vadot                 - gpio1-gpio2 for pmi8950
442354d7675SEmmanuel Vadot                 - gpio1-gpio10 for pmi8994
443354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pmk8350
444cb7aa33aSEmmanuel Vadot                 - gpio1-gpio6 for pmk8550
445d5b0e70fSEmmanuel Vadot                 - gpio1-gpio10 for pmm8155au
446*fac71e4eSEmmanuel Vadot                 - gpio1-gpio12 for pmm8654au
447b97ee269SEmmanuel Vadot                 - gpio1-gpio12 for pmp8074 (holes on gpio1 and gpio12)
448354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pmr735a
449354d7675SEmmanuel Vadot                 - gpio1-gpio4 for pmr735b
450cb7aa33aSEmmanuel Vadot                 - gpio1-gpio2 for pmr735d
451354d7675SEmmanuel Vadot                 - gpio1-gpio12 for pms405 (holes on gpio1, gpio9
452354d7675SEmmanuel Vadot                                            and gpio10)
453354d7675SEmmanuel Vadot                 - gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10
454354d7675SEmmanuel Vadot                                            and gpio11)
455d5b0e70fSEmmanuel Vadot                 - gpio1-gpio16 for pmx65
456354d7675SEmmanuel Vadot
457354d7675SEmmanuel Vadot        items:
458354d7675SEmmanuel Vadot          pattern: "^gpio([0-9]+)$"
459354d7675SEmmanuel Vadot
460354d7675SEmmanuel Vadot      function:
461354d7675SEmmanuel Vadot        items:
462354d7675SEmmanuel Vadot          - enum:
463354d7675SEmmanuel Vadot              - normal
464354d7675SEmmanuel Vadot              - paired
465354d7675SEmmanuel Vadot              - func1
466354d7675SEmmanuel Vadot              - func2
467354d7675SEmmanuel Vadot              - dtest1
468354d7675SEmmanuel Vadot              - dtest2
469354d7675SEmmanuel Vadot              - dtest3
470354d7675SEmmanuel Vadot              - dtest4
471354d7675SEmmanuel Vadot              - func3  # supported by LV/MV GPIO subtypes
472354d7675SEmmanuel Vadot              - func4  # supported by LV/MV GPIO subtypes
473354d7675SEmmanuel Vadot
474354d7675SEmmanuel Vadot      bias-disable: true
475354d7675SEmmanuel Vadot      bias-pull-down: true
476354d7675SEmmanuel Vadot      bias-pull-up: true
477354d7675SEmmanuel Vadot
478354d7675SEmmanuel Vadot      qcom,pull-up-strength:
479354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
480354d7675SEmmanuel Vadot        description:
481354d7675SEmmanuel Vadot          Specifies the strength to use for pull up, if selected.
482354d7675SEmmanuel Vadot          Valid values are defined in
483354d7675SEmmanuel Vadot          <dt-bindings/pinctrl/qcom,pmic-gpio.h>
484354d7675SEmmanuel Vadot          If this property is omitted 30uA strength will be used
485354d7675SEmmanuel Vadot          if pull up is selected
486354d7675SEmmanuel Vadot        enum: [0, 1, 2, 3]
487354d7675SEmmanuel Vadot
488354d7675SEmmanuel Vadot      bias-high-impedance: true
489354d7675SEmmanuel Vadot      input-enable: true
490d5b0e70fSEmmanuel Vadot      input-disable: true
491354d7675SEmmanuel Vadot      output-high: true
492354d7675SEmmanuel Vadot      output-low: true
4938cc087a1SEmmanuel Vadot      output-enable: true
4948cc087a1SEmmanuel Vadot      output-disable: true
495354d7675SEmmanuel Vadot      power-source: true
496354d7675SEmmanuel Vadot
497354d7675SEmmanuel Vadot      qcom,drive-strength:
498354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
499354d7675SEmmanuel Vadot        description:
500354d7675SEmmanuel Vadot          Selects the drive strength for the specified pins
501354d7675SEmmanuel Vadot          Valid drive strength values are defined in
502354d7675SEmmanuel Vadot          <dt-bindings/pinctrl/qcom,pmic-gpio.h>
503354d7675SEmmanuel Vadot        enum: [0, 1, 2, 3]
504354d7675SEmmanuel Vadot
505354d7675SEmmanuel Vadot      drive-push-pull: true
506354d7675SEmmanuel Vadot      drive-open-drain: true
507354d7675SEmmanuel Vadot      drive-open-source: true
508354d7675SEmmanuel Vadot
509354d7675SEmmanuel Vadot      qcom,analog-pass:
510354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/flag
511354d7675SEmmanuel Vadot        description:
512354d7675SEmmanuel Vadot          The specified pins are configured in
513354d7675SEmmanuel Vadot          analog-pass-through mode.
514354d7675SEmmanuel Vadot
515354d7675SEmmanuel Vadot      qcom,atest:
516354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
517354d7675SEmmanuel Vadot        description:
518354d7675SEmmanuel Vadot          Selects ATEST rail to route to GPIO when it's
519354d7675SEmmanuel Vadot          configured in analog-pass-through mode.
520354d7675SEmmanuel Vadot        enum: [1, 2, 3, 4]
521354d7675SEmmanuel Vadot
522354d7675SEmmanuel Vadot      qcom,dtest-buffer:
523354d7675SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
524354d7675SEmmanuel Vadot        description:
525354d7675SEmmanuel Vadot          Selects DTEST rail to route to GPIO when it's
526354d7675SEmmanuel Vadot          configured as digital input.
527354d7675SEmmanuel Vadot        enum: [1, 2, 3, 4]
528354d7675SEmmanuel Vadot
529354d7675SEmmanuel Vadot    required:
530354d7675SEmmanuel Vadot      - pins
531354d7675SEmmanuel Vadot      - function
532354d7675SEmmanuel Vadot
533354d7675SEmmanuel Vadot    additionalProperties: false
534354d7675SEmmanuel Vadot
535354d7675SEmmanuel Vadotexamples:
536354d7675SEmmanuel Vadot  - |
537354d7675SEmmanuel Vadot    #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
538354d7675SEmmanuel Vadot
539354d7675SEmmanuel Vadot    pm8921_gpio: gpio@150 {
540354d7675SEmmanuel Vadot      compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio";
541354d7675SEmmanuel Vadot      reg = <0x150 0x160>;
542354d7675SEmmanuel Vadot      interrupt-controller;
543354d7675SEmmanuel Vadot      #interrupt-cells = <2>;
544354d7675SEmmanuel Vadot      gpio-controller;
545354d7675SEmmanuel Vadot      gpio-ranges = <&pm8921_gpio 0 0 44>;
546354d7675SEmmanuel Vadot      #gpio-cells = <2>;
547354d7675SEmmanuel Vadot
548354d7675SEmmanuel Vadot      pm8921_gpio_keys: gpio-keys-state {
549d5b0e70fSEmmanuel Vadot        volume-keys-pins {
550354d7675SEmmanuel Vadot          pins = "gpio20", "gpio21";
551354d7675SEmmanuel Vadot          function = "normal";
552354d7675SEmmanuel Vadot
553354d7675SEmmanuel Vadot          input-enable;
554354d7675SEmmanuel Vadot          bias-pull-up;
555354d7675SEmmanuel Vadot          drive-push-pull;
556354d7675SEmmanuel Vadot          qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
557354d7675SEmmanuel Vadot          power-source = <PM8921_GPIO_S4>;
558354d7675SEmmanuel Vadot        };
559354d7675SEmmanuel Vadot      };
560354d7675SEmmanuel Vadot    };
561354d7675SEmmanuel Vadot...
562