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