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