xref: /freebsd/sys/contrib/device-tree/Bindings/gpio/altr-pio-1.0.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*833e5d42SEmmanuel Vadot%YAML 1.2
3*833e5d42SEmmanuel Vadot---
4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/altr-pio-1.0.yaml#
5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*833e5d42SEmmanuel Vadot
7*833e5d42SEmmanuel Vadottitle: Altera GPIO controller
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadotmaintainers:
10*833e5d42SEmmanuel Vadot  - Dinh Nguyen <dinguyen@kernel.org>
11*833e5d42SEmmanuel Vadot  - Marek Vasut <marex@denx.de>
12*833e5d42SEmmanuel Vadot  - Mathieu Malaterre <malat@debian.org>
13*833e5d42SEmmanuel Vadot  - Tien Hock Loh <thloh@altera.com>
14*833e5d42SEmmanuel Vadot
15*833e5d42SEmmanuel Vadotproperties:
16*833e5d42SEmmanuel Vadot  compatible:
17*833e5d42SEmmanuel Vadot    const: altr,pio-1.0
18*833e5d42SEmmanuel Vadot
19*833e5d42SEmmanuel Vadot  reg:
20*833e5d42SEmmanuel Vadot    maxItems: 1
21*833e5d42SEmmanuel Vadot
22*833e5d42SEmmanuel Vadot  gpio-controller: true
23*833e5d42SEmmanuel Vadot
24*833e5d42SEmmanuel Vadot  "#gpio-cells":
25*833e5d42SEmmanuel Vadot    const: 2
26*833e5d42SEmmanuel Vadot    description:
27*833e5d42SEmmanuel Vadot      First cell is the GPIO offset number. Second cell is reserved and
28*833e5d42SEmmanuel Vadot      currently unused.
29*833e5d42SEmmanuel Vadot
30*833e5d42SEmmanuel Vadot  interrupts:
31*833e5d42SEmmanuel Vadot    maxItems: 1
32*833e5d42SEmmanuel Vadot
33*833e5d42SEmmanuel Vadot  interrupt-controller: true
34*833e5d42SEmmanuel Vadot
35*833e5d42SEmmanuel Vadot  "#interrupt-cells":
36*833e5d42SEmmanuel Vadot    const: 2
37*833e5d42SEmmanuel Vadot
38*833e5d42SEmmanuel Vadot  altr,ngpio:
39*833e5d42SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
40*833e5d42SEmmanuel Vadot    description: Width of the GPIO bank.
41*833e5d42SEmmanuel Vadot    default: 32
42*833e5d42SEmmanuel Vadot
43*833e5d42SEmmanuel Vadot  altr,interrupt-type:
44*833e5d42SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
45*833e5d42SEmmanuel Vadot    description: >
46*833e5d42SEmmanuel Vadot      Specifies the interrupt trigger type synthesized by hardware.
47*833e5d42SEmmanuel Vadot      Values defined in <dt-bindings/interrupt-controller/irq.h>.
48*833e5d42SEmmanuel Vadot    enum: [1, 2, 3, 4]
49*833e5d42SEmmanuel Vadot
50*833e5d42SEmmanuel Vadotrequired:
51*833e5d42SEmmanuel Vadot  - compatible
52*833e5d42SEmmanuel Vadot  - reg
53*833e5d42SEmmanuel Vadot  - gpio-controller
54*833e5d42SEmmanuel Vadot  - "#gpio-cells"
55*833e5d42SEmmanuel Vadot  - interrupts
56*833e5d42SEmmanuel Vadot  - interrupt-controller
57*833e5d42SEmmanuel Vadot  - "#interrupt-cells"
58*833e5d42SEmmanuel Vadot
59*833e5d42SEmmanuel VadotadditionalProperties: false
60*833e5d42SEmmanuel Vadot
61*833e5d42SEmmanuel Vadotexamples:
62*833e5d42SEmmanuel Vadot  - |
63*833e5d42SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
64*833e5d42SEmmanuel Vadot
65*833e5d42SEmmanuel Vadot    gpio@ff200000 {
66*833e5d42SEmmanuel Vadot        compatible = "altr,pio-1.0";
67*833e5d42SEmmanuel Vadot        reg = <0xff200000 0x10>;
68*833e5d42SEmmanuel Vadot        interrupts = <45 4>;
69*833e5d42SEmmanuel Vadot        interrupt-controller;
70*833e5d42SEmmanuel Vadot        #interrupt-cells = <2>;
71*833e5d42SEmmanuel Vadot        gpio-controller;
72*833e5d42SEmmanuel Vadot        #gpio-cells = <2>;
73*833e5d42SEmmanuel Vadot        altr,ngpio = <32>;
74*833e5d42SEmmanuel Vadot        altr,interrupt-type = <IRQ_TYPE_EDGE_RISING>;
75*833e5d42SEmmanuel Vadot    };
76