xref: /linux/Documentation/devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml (revision ba96b2e7974b9b5283b52dd5dc8bb3d15be7734c)
1*ba96b2e7SSrinivas Neeli# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*ba96b2e7SSrinivas Neeli%YAML 1.2
3*ba96b2e7SSrinivas Neeli---
4*ba96b2e7SSrinivas Neeli$id: http://devicetree.org/schemas/gpio/xlnx,gpio-xilinx.yaml#
5*ba96b2e7SSrinivas Neeli$schema: http://devicetree.org/meta-schemas/core.yaml#
6*ba96b2e7SSrinivas Neeli
7*ba96b2e7SSrinivas Neelititle: Xilinx AXI GPIO controller
8*ba96b2e7SSrinivas Neeli
9*ba96b2e7SSrinivas Neelimaintainers:
10*ba96b2e7SSrinivas Neeli  - Neeli Srinivas <srinivas.neeli@xilinx.com>
11*ba96b2e7SSrinivas Neeli
12*ba96b2e7SSrinivas Neelidescription:
13*ba96b2e7SSrinivas Neeli  The AXI GPIO design provides a general purpose input/output interface
14*ba96b2e7SSrinivas Neeli  to an AXI4-Lite interface. The AXI GPIO can be configured as either
15*ba96b2e7SSrinivas Neeli  a single or a dual-channel device. The width of each channel is
16*ba96b2e7SSrinivas Neeli  independently configurable. The channels can be configured to
17*ba96b2e7SSrinivas Neeli  generate an interrupt when a transition on any of their inputs occurs.
18*ba96b2e7SSrinivas Neeli
19*ba96b2e7SSrinivas Neeliproperties:
20*ba96b2e7SSrinivas Neeli  compatible:
21*ba96b2e7SSrinivas Neeli    enum:
22*ba96b2e7SSrinivas Neeli      - xlnx,xps-gpio-1.00.a
23*ba96b2e7SSrinivas Neeli
24*ba96b2e7SSrinivas Neeli  reg:
25*ba96b2e7SSrinivas Neeli    maxItems: 1
26*ba96b2e7SSrinivas Neeli
27*ba96b2e7SSrinivas Neeli  "#gpio-cells":
28*ba96b2e7SSrinivas Neeli    const: 2
29*ba96b2e7SSrinivas Neeli
30*ba96b2e7SSrinivas Neeli  interrupts:
31*ba96b2e7SSrinivas Neeli    maxItems: 1
32*ba96b2e7SSrinivas Neeli
33*ba96b2e7SSrinivas Neeli  gpio-controller: true
34*ba96b2e7SSrinivas Neeli
35*ba96b2e7SSrinivas Neeli  gpio-line-names:
36*ba96b2e7SSrinivas Neeli    description: strings describing the names of each gpio line
37*ba96b2e7SSrinivas Neeli    minItems: 1
38*ba96b2e7SSrinivas Neeli    maxItems: 64
39*ba96b2e7SSrinivas Neeli
40*ba96b2e7SSrinivas Neeli  interrupt-controller: true
41*ba96b2e7SSrinivas Neeli
42*ba96b2e7SSrinivas Neeli  "#interrupt-cells":
43*ba96b2e7SSrinivas Neeli    const: 2
44*ba96b2e7SSrinivas Neeli
45*ba96b2e7SSrinivas Neeli  clocks:
46*ba96b2e7SSrinivas Neeli    maxItems: 1
47*ba96b2e7SSrinivas Neeli
48*ba96b2e7SSrinivas Neeli  interrupt-names: true
49*ba96b2e7SSrinivas Neeli
50*ba96b2e7SSrinivas Neeli  xlnx,all-inputs:
51*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
52*ba96b2e7SSrinivas Neeli    description: This option sets this GPIO channel1 bits in input mode.
53*ba96b2e7SSrinivas Neeli
54*ba96b2e7SSrinivas Neeli  xlnx,all-inputs-2:
55*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
56*ba96b2e7SSrinivas Neeli    description: This option sets this GPIO channel2 bits in input mode.
57*ba96b2e7SSrinivas Neeli
58*ba96b2e7SSrinivas Neeli  xlnx,all-outputs:
59*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
60*ba96b2e7SSrinivas Neeli    description: This option sets this GPIO channel1 bits in output mode.
61*ba96b2e7SSrinivas Neeli
62*ba96b2e7SSrinivas Neeli  xlnx,all-outputs-2:
63*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
64*ba96b2e7SSrinivas Neeli    description: This option sets this GPIO channel2 bits in output mode.
65*ba96b2e7SSrinivas Neeli
66*ba96b2e7SSrinivas Neeli  xlnx,dout-default:
67*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
68*ba96b2e7SSrinivas Neeli    description: Sets the default value of all the enabled bits of
69*ba96b2e7SSrinivas Neeli                 channel1.
70*ba96b2e7SSrinivas Neeli    default: 0
71*ba96b2e7SSrinivas Neeli
72*ba96b2e7SSrinivas Neeli  xlnx,dout-default-2:
73*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
74*ba96b2e7SSrinivas Neeli    description: Sets the default value of all the enabled bits of
75*ba96b2e7SSrinivas Neeli                 channel2.
76*ba96b2e7SSrinivas Neeli    default: 0
77*ba96b2e7SSrinivas Neeli
78*ba96b2e7SSrinivas Neeli  xlnx,gpio-width:
79*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
80*ba96b2e7SSrinivas Neeli    description: The value defines the bit width of the GPIO channel1.
81*ba96b2e7SSrinivas Neeli    minimum: 1
82*ba96b2e7SSrinivas Neeli    maximum: 32
83*ba96b2e7SSrinivas Neeli    default: 32
84*ba96b2e7SSrinivas Neeli
85*ba96b2e7SSrinivas Neeli  xlnx,gpio2-width:
86*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
87*ba96b2e7SSrinivas Neeli    description: The value defines the bit width of the GPIO channel2.
88*ba96b2e7SSrinivas Neeli    minimum: 1
89*ba96b2e7SSrinivas Neeli    maximum: 32
90*ba96b2e7SSrinivas Neeli    default: 32
91*ba96b2e7SSrinivas Neeli
92*ba96b2e7SSrinivas Neeli  xlnx,interrupt-present:
93*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
94*ba96b2e7SSrinivas Neeli    description: This parameter enables interrupt control logic
95*ba96b2e7SSrinivas Neeli                 and interrupt registers in GPIO module.
96*ba96b2e7SSrinivas Neeli    minimum: 0
97*ba96b2e7SSrinivas Neeli    maximum: 1
98*ba96b2e7SSrinivas Neeli    default: 0
99*ba96b2e7SSrinivas Neeli
100*ba96b2e7SSrinivas Neeli  xlnx,is-dual:
101*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
102*ba96b2e7SSrinivas Neeli    description: This parameter enables a second GPIO channel (GPIO2).
103*ba96b2e7SSrinivas Neeli    minimum: 0
104*ba96b2e7SSrinivas Neeli    maximum: 1
105*ba96b2e7SSrinivas Neeli    default: 0
106*ba96b2e7SSrinivas Neeli
107*ba96b2e7SSrinivas Neeli  xlnx,tri-default:
108*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
109*ba96b2e7SSrinivas Neeli    description: This value configures the input or output mode
110*ba96b2e7SSrinivas Neeli                 of each bit of GPIO channel1.
111*ba96b2e7SSrinivas Neeli
112*ba96b2e7SSrinivas Neeli  xlnx,tri-default-2:
113*ba96b2e7SSrinivas Neeli    $ref: /schemas/types.yaml#/definitions/uint32
114*ba96b2e7SSrinivas Neeli    description: This value configures the input or output mode
115*ba96b2e7SSrinivas Neeli                 of each bit of GPIO channel2.
116*ba96b2e7SSrinivas Neeli
117*ba96b2e7SSrinivas Neelirequired:
118*ba96b2e7SSrinivas Neeli  - reg
119*ba96b2e7SSrinivas Neeli  - compatible
120*ba96b2e7SSrinivas Neeli  - gpio-controller
121*ba96b2e7SSrinivas Neeli  - "#gpio-cells"
122*ba96b2e7SSrinivas Neeli
123*ba96b2e7SSrinivas NeeliunevaluatedProperties: false
124*ba96b2e7SSrinivas Neeli
125*ba96b2e7SSrinivas Neeliexamples:
126*ba96b2e7SSrinivas Neeli  - |
127*ba96b2e7SSrinivas Neeli    #include <dt-bindings/interrupt-controller/arm-gic.h>
128*ba96b2e7SSrinivas Neeli
129*ba96b2e7SSrinivas Neeli        gpio@e000a000 {
130*ba96b2e7SSrinivas Neeli            compatible = "xlnx,xps-gpio-1.00.a";
131*ba96b2e7SSrinivas Neeli            reg = <0xa0020000 0x10000>;
132*ba96b2e7SSrinivas Neeli            #gpio-cells = <2>;
133*ba96b2e7SSrinivas Neeli            #interrupt-cells = <0x2>;
134*ba96b2e7SSrinivas Neeli            clocks = <&zynqmp_clk 71>;
135*ba96b2e7SSrinivas Neeli            gpio-controller;
136*ba96b2e7SSrinivas Neeli            interrupt-controller;
137*ba96b2e7SSrinivas Neeli            interrupt-names = "ip2intc_irpt";
138*ba96b2e7SSrinivas Neeli            interrupt-parent = <&gic>;
139*ba96b2e7SSrinivas Neeli            interrupts = <0 89 4>;
140*ba96b2e7SSrinivas Neeli            xlnx,all-inputs = <0x0>;
141*ba96b2e7SSrinivas Neeli            xlnx,all-inputs-2 = <0x0>;
142*ba96b2e7SSrinivas Neeli            xlnx,all-outputs = <0x0>;
143*ba96b2e7SSrinivas Neeli            xlnx,all-outputs-2 = <0x0>;
144*ba96b2e7SSrinivas Neeli            xlnx,dout-default = <0x0>;
145*ba96b2e7SSrinivas Neeli            xlnx,dout-default-2 = <0x0>;
146*ba96b2e7SSrinivas Neeli            xlnx,gpio-width = <0x20>;
147*ba96b2e7SSrinivas Neeli            xlnx,gpio2-width = <0x20>;
148*ba96b2e7SSrinivas Neeli            xlnx,interrupt-present = <0x1>;
149*ba96b2e7SSrinivas Neeli            xlnx,is-dual = <0x1>;
150*ba96b2e7SSrinivas Neeli            xlnx,tri-default = <0xFFFFFFFF>;
151*ba96b2e7SSrinivas Neeli            xlnx,tri-default-2 = <0xFFFFFFFF>;
152*ba96b2e7SSrinivas Neeli        };
153*ba96b2e7SSrinivas Neeli
154*ba96b2e7SSrinivas Neeli...
155