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