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