xref: /linux/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml (revision fba5618451d2b3af5e55f8af5ce9c5d3677ad9c4)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/sifive,gpio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: SiFive GPIO controller
8
9maintainers:
10  - Yash Shah <yash.shah@sifive.com>
11  - Paul Walmsley <paul.walmsley@sifive.com>
12
13properties:
14  compatible:
15    items:
16      - const: sifive,fu540-c000-gpio
17      - const: sifive,gpio0
18
19  reg:
20    maxItems: 1
21
22  interrupts:
23    description:
24      interrupt mapping one per GPIO. Maximum 16 GPIOs.
25    minItems: 1
26    maxItems: 16
27
28  interrupt-controller: true
29
30  "#interrupt-cells":
31    const: 2
32
33  clocks:
34    maxItems: 1
35
36  "#gpio-cells":
37    const: 2
38
39  gpio-controller: true
40
41required:
42  - compatible
43  - reg
44  - interrupts
45  - interrupt-controller
46  - "#interrupt-cells"
47  - clocks
48  - "#gpio-cells"
49  - gpio-controller
50
51additionalProperties: false
52
53examples:
54  - |
55      #include <dt-bindings/clock/sifive-fu540-prci.h>
56      gpio@10060000 {
57        compatible = "sifive,fu540-c000-gpio", "sifive,gpio0";
58        interrupt-parent = <&plic>;
59        interrupts = <7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22>;
60        reg = <0x10060000 0x1000>;
61        clocks = <&tlclk PRCI_CLK_TLCLK>;
62        gpio-controller;
63        #gpio-cells = <2>;
64        interrupt-controller;
65        #interrupt-cells = <2>;
66      };
67
68...
69