summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml
blob: 11ae8ec3c739469ca04361139a090d1ada232601 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/xlnx,gpio-xilinx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Xilinx AXI GPIO controller

maintainers:
  - Neeli Srinivas <srinivas.neeli@xilinx.com>

description:
  The AXI GPIO design provides a general purpose input/output interface
  to an AXI4-Lite interface. The AXI GPIO can be configured as either
  a single or a dual-channel device. The width of each channel is
  independently configurable. The channels can be configured to
  generate an interrupt when a transition on any of their inputs occurs.

properties:
  compatible:
    enum:
      - xlnx,xps-gpio-1.00.a

  reg:
    maxItems: 1

  "#gpio-cells":
    const: 2

  interrupts:
    maxItems: 1

  gpio-controller: true

  gpio-line-names:
    description: strings describing the names of each gpio line
    minItems: 1
    maxItems: 64

  interrupt-controller: true

  "#interrupt-cells":
    const: 2

  clocks:
    maxItems: 1

  interrupt-names: true

  xlnx,all-inputs:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: This option sets this GPIO channel1 bits in input mode.

  xlnx,all-inputs-2:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: This option sets this GPIO channel2 bits in input mode.

  xlnx,all-outputs:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: This option sets this GPIO channel1 bits in output mode.

  xlnx,all-outputs-2:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: This option sets this GPIO channel2 bits in output mode.

  xlnx,dout-default:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Sets the default value of all the enabled bits of
                 channel1.
    default: 0

  xlnx,dout-default-2:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Sets the default value of all the enabled bits of
                 channel2.
    default: 0

  xlnx,gpio-width:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: The value defines the bit width of the GPIO channel1.
    minimum: 1
    maximum: 32
    default: 32

  xlnx,gpio2-width:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: The value defines the bit width of the GPIO channel2.
    minimum: 1
    maximum: 32
    default: 32

  xlnx,interrupt-present:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: This parameter enables interrupt control logic
                 and interrupt registers in GPIO module.
    minimum: 0
    maximum: 1
    default: 0

  xlnx,is-dual:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: This parameter enables a second GPIO channel (GPIO2).
    minimum: 0
    maximum: 1
    default: 0

  xlnx,tri-default:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: This value configures the input or output mode
                 of each bit of GPIO channel1.

  xlnx,tri-default-2:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: This value configures the input or output mode
                 of each bit of GPIO channel2.

required:
  - reg
  - compatible
  - gpio-controller
  - "#gpio-cells"

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

        gpio@a0020000 {
            compatible = "xlnx,xps-gpio-1.00.a";
            reg = <0xa0020000 0x10000>;
            #gpio-cells = <2>;
            #interrupt-cells = <0x2>;
            clocks = <&zynqmp_clk 71>;
            gpio-controller;
            interrupt-controller;
            interrupt-names = "ip2intc_irpt";
            interrupt-parent = <&gic>;
            interrupts = <0 89 4>;
            xlnx,all-inputs = <0x0>;
            xlnx,all-inputs-2 = <0x0>;
            xlnx,all-outputs = <0x0>;
            xlnx,all-outputs-2 = <0x0>;
            xlnx,dout-default = <0x0>;
            xlnx,dout-default-2 = <0x0>;
            xlnx,gpio-width = <0x20>;
            xlnx,gpio2-width = <0x20>;
            xlnx,interrupt-present = <0x1>;
            xlnx,is-dual = <0x1>;
            xlnx,tri-default = <0xFFFFFFFF>;
            xlnx,tri-default-2 = <0xFFFFFFFF>;
        };

...