xref: /linux/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml (revision fcb117e0758d1462128a50c5788555e03b48833b)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/trivial-gpio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Trivial 2-cell GPIO controllers
8
9maintainers:
10  - Bartosz Golaszewski <brgl@bgdev.pl>
11
12properties:
13  compatible:
14    oneOf:
15      - items:
16          - enum:
17              - cirrus,ep7312-gpio
18          - const: cirrus,ep7209-gpio
19      - enum:
20          - apm,xgene-gpio
21          - cirrus,ep7209-gpio
22          - cznic,moxtet-gpio
23          - dlg,slg7xl45106
24          - fcs,fxl6408
25          - gateworks,pld-gpio
26          - ibm,ppc4xx-gpio
27          - loongson,ls1x-gpio
28          - maxim,max77620
29          - nintendo,hollywood-gpio
30          - nxp,pca9570
31          - nxp,pca9571
32          - rockchip,rk3328-grf-gpio
33          - snps,creg-gpio-hsdk
34          - technologic,ts4800-gpio
35          - technologic,ts4900-gpio
36          - technologic,ts7970-gpio
37          - ti,741g125 # for 741G125 (1-bit Input),
38          - ti,741g174 # for 741G74 (1-bit Output),
39          - ti,742g125 # for 742G125 (2-bit Input),
40          - ti,7474    # for 7474 (2-bit Output),
41          - ti,74125   # for 74125 (4-bit Input),
42          - ti,74175   # for 74175 (4-bit Output),
43          - ti,74365   # for 74365 (6-bit Input),
44          - ti,74174   # for 74174 (6-bit Output),
45          - ti,74244   # for 74244 (8-bit Input),
46          - ti,74273   # for 74273 (8-bit Output),
47          - ti,741624  # for 741624 (16-bit Input),
48          - ti,7416374 # for 7416374 (16-bit Output).
49          - ti,lp3943-gpio
50          - ti,palmas-gpio
51          - ti,tpic2810
52          - ti,tps80036-gpio
53          - ti,tps65913-gpio
54          - ti,tps65914-gpio
55
56  reg:
57    maxItems: 1
58
59  '#gpio-cells':
60    const: 2
61
62  gpio-controller: true
63
64  gpio-line-names: true
65
66  ngpios: true
67
68  # Don't add more properties
69
70patternProperties:
71  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
72    type: object
73    required:
74      - gpio-hog
75
76required:
77  - compatible
78  - '#gpio-cells'
79  - gpio-controller
80
81allOf:
82  - if:
83      properties:
84        compatible:
85          contains:
86            enum:
87              - maxim,max77620
88              - rockchip,rk3328-grf-gpio
89              - ti,lp3943-gpio
90              - ti,palmas-gpio
91              - ti,tps80036-gpio
92              - ti,tps65913-gpio
93              - ti,tps65914-gpio
94    then:
95      properties:
96        reg: false
97    else:
98      required:
99        - reg
100
101additionalProperties: false
102
103examples:
104  - |
105    gpio@1701c000 {
106        compatible = "apm,xgene-gpio";
107        reg = <0x1701c000 0x40>;
108        gpio-controller;
109        #gpio-cells = <2>;
110    };
111