apm821xx: align gpio-keys node names with dt-schema
[openwrt/staging/jow.git] / target / linux / apm821xx / dts / meraki-mr24.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Device Tree Source for Meraki MR24 (Ikarem)
4 *
5 * Copyright (C) 2016 Chris Blake <chrisrblake93@gmail.com>
6 *
7 * Based on Cisco Meraki GPL Release r23-20150601 MR24 DTS
8 */
9
10 /dts-v1/;
11
12 #include <dt-bindings/leds/common.h>
13 #include "apm82181.dtsi"
14
15 / {
16 model = "Meraki MR24 Access Point";
17 compatible = "meraki,mr24", "meraki,ikarem", "apm,bluestone";
18
19 aliases {
20 serial0 = &UART1;
21 };
22
23 chosen {
24 stdout-path = "/plb/opb/serial@ef600400";
25 };
26 };
27
28
29 &CRYPTO {
30 status = "okay";
31 };
32
33 &PKA {
34 status = "okay";
35 };
36
37 &TRNG {
38 status = "okay";
39 };
40
41 &ndfc {
42 /* Ikarem has 32MB of NAND */
43 status = "okay";
44
45 nand {
46 nand-is-boot-medium;
47
48 partitions {
49 compatible = "fixed-partitions";
50 #address-cells = <1>;
51 #size-cells = <1>;
52
53 partition@0 {
54 label = "u-boot";
55 reg = <0x00000000 0x00150000>;
56 read-only;
57 };
58
59 partition@150000 {
60 /*
61 * The u-boot environment size is one NAND
62 * block (16KiB). u-boot allocates four NAND
63 * blocks (64KiB) in order to have spares
64 * around for bad block management
65 */
66 label = "u-boot-env";
67 reg = <0x00150000 0x00010000>;
68 read-only;
69 };
70
71 partition@160000 {
72 /*
73 * redundant u-boot environment.
74 * has to be kept it in sync with the
75 * data in "u-boot-env".
76 */
77 label = "u-boot-env-redundant";
78 reg = <0x00160000 0x00010000>;
79 read-only;
80 };
81
82 partition@170000 {
83 label = "oops";
84 reg = <0x00170000 0x00010000>;
85 };
86
87 partition@180000 {
88 label = "ubi";
89 reg = <0x00180000 0x01e80000>;
90 };
91 };
92 };
93 };
94
95 &UART1 {
96 status = "okay";
97 };
98
99 &GPIO0 {
100 status = "okay";
101 };
102
103 &IIC0 {
104 status = "okay";
105 /* Boot ROM is at 0x52-0x53, do not touch */
106 /* Unknown chip at 0x6e, not sure what it is */
107 };
108
109 &EMAC0 {
110 status = "okay";
111
112 phy-mode = "rgmii-id";
113 phy-map = <0x2>;
114 phy-address = <0x1>;
115 phy-handle = <&phy>;
116
117 mdio {
118 #address-cells = <1>;
119 #size-cells = <0>;
120
121 phy: phy@1 {
122 compatible = "ethernet-phy-ieee802.3-c22";
123 reg = <1>;
124 };
125 };
126 };
127
128 &POB0 {
129 leds {
130 compatible = "gpio-leds";
131
132 led-0 {
133 color = <LED_COLOR_ID_GREEN>;
134 function = LED_FUNCTION_POWER;
135 gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
136 };
137
138 led-1 {
139 color = <LED_COLOR_ID_AMBER>;
140 function = LED_FUNCTION_FAULT;
141 gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
142 panic-indicator;
143 };
144
145 led-2 {
146 color = <LED_COLOR_ID_GREEN>;
147 function = LED_FUNCTION_WAN;
148 gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
149 };
150
151 led-3 {
152 color = <LED_COLOR_ID_GREEN>;
153 function = LED_FUNCTION_WLAN;
154 function-enumerator = <0>;
155 gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
156 };
157
158 led-4 {
159 color = <LED_COLOR_ID_GREEN>;
160 function = LED_FUNCTION_WLAN;
161 function-enumerator = <1>;
162 gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
163 };
164
165 led-5 {
166 color = <LED_COLOR_ID_GREEN>;
167 function = LED_FUNCTION_WLAN;
168 function-enumerator = <2>;
169 gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
170 };
171
172 led-6 {
173 color = <LED_COLOR_ID_GREEN>;
174 function = LED_FUNCTION_WLAN;
175 function-enumerator = <3>;
176 gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
177 };
178 };
179
180 keys {
181 compatible = "gpio-keys";
182
183 button-restart {
184 /* Label as per Meraki's "MR24 Installation Guide" */
185 label = "Factory Reset Button";
186 linux,code = <KEY_RESTART>;
187 interrupt-parent = <&UIC1>;
188 interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
189 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
190 debounce-interval = <60>;
191 };
192 };
193 };
194
195 &PCIE0 {
196 status = "okay";
197 /*
198 * relevant lspci topology:
199 *
200 * -+-[0000:40]---00.0-[41-7f]----00.0-[42-45]--+-02.0-[43]----00.0
201 * +-03.0-[44]----00.0
202 *
203 */
204
205 bridge@64,0 {
206 reg = <0x00400000 0 0 0 0>;
207 #address-cells = <3>;
208 #size-cells = <2>;
209 ranges;
210
211 bridge@65,0 {
212 /* IDT PES3T3 PCI Express Switch */
213 compatible = "pci111d,8039";
214 reg = <0x00410000 0 0 0 0>;
215 #address-cells = <3>;
216 #size-cells = <2>;
217 ranges;
218
219 bridge@66,2 {
220 compatible = "pci111d,8039";
221 reg = <0x00421000 0 0 0 0>;
222 #address-cells = <3>;
223 #size-cells = <2>;
224 ranges;
225
226 wifi0: wifi@67,0 {
227 /* Atheros AR9380 2.4GHz */
228 compatible = "pci168c,0030";
229 reg = <0x00430000 0 0 0 0>;
230 interrupts = <3>; /* INTC 4.1.1 */
231 };
232 };
233
234 bridge@66,3 {
235 compatible = "pci111d,8039";
236 reg = <0x00421800 0 0 0 0>;
237 #address-cells = <3>;
238 #size-cells = <2>;
239 ranges;
240
241 wifi1: wifi@68,0 {
242 /* Atheros AR9380 5GHz */
243 compatible = "pci168c,0030";
244 reg = <0x00440000 0 0 0 0>;
245 interrupts = <4>; /* INTD 4.1.1 */
246 };
247 };
248 };
249 };
250 };