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