xref: /linux/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml (revision 5143840cef6bb1ec4f334604ecc55130dd196fed)
1db2056e2SYinbo Zhu# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2db2056e2SYinbo Zhu%YAML 1.2
3db2056e2SYinbo Zhu---
4db2056e2SYinbo Zhu$id: http://devicetree.org/schemas/gpio/loongson,ls-gpio.yaml#
5db2056e2SYinbo Zhu$schema: http://devicetree.org/meta-schemas/core.yaml#
6db2056e2SYinbo Zhu
7db2056e2SYinbo Zhutitle: Loongson GPIO controller.
8db2056e2SYinbo Zhu
9db2056e2SYinbo Zhumaintainers:
10db2056e2SYinbo Zhu  - Yinbo Zhu <zhuyinbo@loongson.cn>
11db2056e2SYinbo Zhu
12db2056e2SYinbo Zhuproperties:
13db2056e2SYinbo Zhu  compatible:
141b83a90bSYinbo Zhu    oneOf:
151b83a90bSYinbo Zhu      - enum:
16db2056e2SYinbo Zhu          - loongson,ls2k-gpio
171b83a90bSYinbo Zhu          - loongson,ls2k0500-gpio0
181b83a90bSYinbo Zhu          - loongson,ls2k0500-gpio1
191b83a90bSYinbo Zhu          - loongson,ls2k2000-gpio0
201b83a90bSYinbo Zhu          - loongson,ls2k2000-gpio1
211b83a90bSYinbo Zhu          - loongson,ls2k2000-gpio2
221b83a90bSYinbo Zhu          - loongson,ls3a5000-gpio
23*e4a345c5SBinbin Zhou          - loongson,ls3a6000-gpio  # Loongson-3A6000 node GPIO
24db2056e2SYinbo Zhu          - loongson,ls7a-gpio
25*e4a345c5SBinbin Zhou          - loongson,ls7a2000-gpio1 # LS7A2000 chipset GPIO
26*e4a345c5SBinbin Zhou          - loongson,ls7a2000-gpio2 # LS7A2000 ACPI GPIO
271b83a90bSYinbo Zhu      - items:
281b83a90bSYinbo Zhu          - const: loongson,ls2k1000-gpio
291b83a90bSYinbo Zhu          - const: loongson,ls2k-gpio
301b83a90bSYinbo Zhu      - items:
311b83a90bSYinbo Zhu          - const: loongson,ls7a1000-gpio
321b83a90bSYinbo Zhu          - const: loongson,ls7a-gpio
33db2056e2SYinbo Zhu
34db2056e2SYinbo Zhu  reg:
35db2056e2SYinbo Zhu    maxItems: 1
36db2056e2SYinbo Zhu
37db2056e2SYinbo Zhu  ngpios:
38db2056e2SYinbo Zhu    minimum: 1
39db2056e2SYinbo Zhu    maximum: 64
40db2056e2SYinbo Zhu
41db2056e2SYinbo Zhu  "#gpio-cells":
42db2056e2SYinbo Zhu    const: 2
43db2056e2SYinbo Zhu
44db2056e2SYinbo Zhu  gpio-controller: true
45db2056e2SYinbo Zhu
46db2056e2SYinbo Zhu  gpio-ranges: true
47db2056e2SYinbo Zhu
48db2056e2SYinbo Zhu  interrupts:
49db2056e2SYinbo Zhu    minItems: 1
50db2056e2SYinbo Zhu    maxItems: 64
51db2056e2SYinbo Zhu
52db2056e2SYinbo Zhurequired:
53db2056e2SYinbo Zhu  - compatible
54db2056e2SYinbo Zhu  - reg
55db2056e2SYinbo Zhu  - ngpios
56db2056e2SYinbo Zhu  - "#gpio-cells"
57db2056e2SYinbo Zhu  - gpio-controller
58db2056e2SYinbo Zhu  - gpio-ranges
59db2056e2SYinbo Zhu  - interrupts
60db2056e2SYinbo Zhu
61db2056e2SYinbo ZhuadditionalProperties: false
62db2056e2SYinbo Zhu
63db2056e2SYinbo Zhuexamples:
64db2056e2SYinbo Zhu  - |
65db2056e2SYinbo Zhu    #include <dt-bindings/interrupt-controller/irq.h>
66db2056e2SYinbo Zhu
67db2056e2SYinbo Zhu    gpio0: gpio@1fe00500 {
681b83a90bSYinbo Zhu      compatible = "loongson,ls2k1000-gpio", "loongson,ls2k-gpio";
69db2056e2SYinbo Zhu      reg = <0x1fe00500 0x38>;
70db2056e2SYinbo Zhu      ngpios = <64>;
71db2056e2SYinbo Zhu      #gpio-cells = <2>;
72db2056e2SYinbo Zhu      gpio-controller;
73db2056e2SYinbo Zhu      gpio-ranges = <&pctrl 0 0 15>,
74db2056e2SYinbo Zhu                    <&pctrl 16 16 15>,
75db2056e2SYinbo Zhu                    <&pctrl 32 32 10>,
76db2056e2SYinbo Zhu                    <&pctrl 44 44 20>;
77db2056e2SYinbo Zhu      interrupt-parent = <&liointc1>;
78db2056e2SYinbo Zhu      interrupts = <28 IRQ_TYPE_LEVEL_LOW>,
79db2056e2SYinbo Zhu                   <29 IRQ_TYPE_LEVEL_LOW>,
80db2056e2SYinbo Zhu                   <30 IRQ_TYPE_LEVEL_LOW>,
81db2056e2SYinbo Zhu                   <30 IRQ_TYPE_LEVEL_LOW>,
82db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
83db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
84db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
85db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
86db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
87db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
88db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
89db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
90db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
91db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
92db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
93db2056e2SYinbo Zhu                   <>,
94db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
95db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
96db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
97db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
98db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
99db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
100db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
101db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
102db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
103db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
104db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
105db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
106db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
107db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
108db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
109db2056e2SYinbo Zhu                   <26 IRQ_TYPE_LEVEL_LOW>,
110db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
111db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
112db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
113db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
114db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
115db2056e2SYinbo Zhu                   <>,
116db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
117db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
118db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
119db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
120db2056e2SYinbo Zhu                   <>,
121db2056e2SYinbo Zhu                   <>,
122db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
123db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
124db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
125db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
126db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
127db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
128db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
129db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
130db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
131db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
132db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
133db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
134db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
135db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
136db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
137db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
138db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
139db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
140db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>,
141db2056e2SYinbo Zhu                   <27 IRQ_TYPE_LEVEL_LOW>;
142db2056e2SYinbo Zhu    };
143