xref: /linux/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml (revision fbf5df34a4dbcd09d433dd4f0916bf9b2ddb16de)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/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          - fsl,ls1046aqds-fpga-gpio-stat-pres2
26          - fsl,lx2160ardb-fpga-gpio-sfp
27          - gateworks,pld-gpio
28          - ibm,ppc4xx-gpio
29          - loongson,ls1x-gpio
30          - nintendo,hollywood-gpio
31          - nxp,pca9570
32          - nxp,pca9571
33          - rockchip,rk3328-grf-gpio
34          - snps,creg-gpio-hsdk
35          - technologic,ts4800-gpio
36          - technologic,ts4900-gpio
37          - technologic,ts7970-gpio
38          - ti,741g125 # for 741G125 (1-bit Input),
39          - ti,741g174 # for 741G74 (1-bit Output),
40          - ti,742g125 # for 742G125 (2-bit Input),
41          - ti,7474    # for 7474 (2-bit Output),
42          - ti,74125   # for 74125 (4-bit Input),
43          - ti,74175   # for 74175 (4-bit Output),
44          - ti,74365   # for 74365 (6-bit Input),
45          - ti,74174   # for 74174 (6-bit Output),
46          - ti,74244   # for 74244 (8-bit Input),
47          - ti,74273   # for 74273 (8-bit Output),
48          - ti,741624  # for 741624 (16-bit Input),
49          - ti,7416374 # for 7416374 (16-bit Output).
50          - ti,lp3943-gpio
51          - ti,palmas-gpio
52          - ti,tpic2810
53          - ti,tps80036-gpio
54          - ti,tps65913-gpio
55          - ti,tps65914-gpio
56
57  reg:
58    maxItems: 1
59
60  '#gpio-cells':
61    const: 2
62
63  gpio-controller: true
64
65  gpio-line-names: true
66
67  ngpios: true
68
69  # Don't add more properties
70
71patternProperties:
72  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
73    type: object
74    required:
75      - gpio-hog
76
77required:
78  - compatible
79  - '#gpio-cells'
80  - gpio-controller
81
82allOf:
83  - if:
84      properties:
85        compatible:
86          contains:
87            enum:
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