aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/dts/meraki-mr24.dts
blob: 4b43c683e12b82a5e2644b79837c3427be5b5005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Device Tree Source for Meraki MR24 (Ikarem)
 *
 * Copyright (C) 2016 Chris Blake <chrisrblake93@gmail.com>
 *
 * Based on Cisco Meraki GPL Release r23-20150601 MR24 DTS
 */

/dts-v1/;

#include <dt-bindings/leds/common.h>
#include "apm82181.dtsi"

/ {
	model = "Meraki MR24 Access Point";
	compatible = "meraki,mr24", "meraki,ikarem", "apm,bluestone";

	aliases {
		serial0 = &UART1;
	};

	chosen {
		stdout-path = "/plb/opb/serial@ef600400";
	};
};


&CRYPTO {
	status = "okay";
};

&PKA {
	status = "okay";
};

&TRNG {
	status = "okay";
};

&ndfc {
	/* Ikarem has 32MB of NAND */
	status = "okay";

	nand {
		nand-is-boot-medium;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0x00000000 0x00150000>;
				read-only;
			};

			partition@150000 {
				/*
				 * The u-boot environment size is one NAND
				 * block (16KiB). u-boot allocates four NAND
				 * blocks (64KiB) in order to have spares
				 * around for bad block management
				 */
					label = "u-boot-env";
					reg = <0x00150000 0x00010000>;
					read-only;
				};

			partition@160000 {
				/*
				 * redundant u-boot environment.
				 * has to be kept it in sync with the
				 * data in "u-boot-env".
				 */
				label = "u-boot-env-redundant";
				reg = <0x00160000 0x00010000>;
				read-only;
			};

			partition@170000 {
				label = "oops";
				reg = <0x00170000 0x00010000>;
			};

			partition@180000 {
				label = "ubi";
				reg = <0x00180000 0x01e80000>;
			};
		};
	};
};

&UART1 {
	status = "okay";
};

&GPIO0 {
	status = "okay";
};

&IIC0 {
	status = "okay";
	/* Boot ROM is at 0x52-0x53, do not touch */
	/* Unknown chip at 0x6e, not sure what it is */
};

&EMAC0 {
	status = "okay";

	phy-mode = "rgmii-id";
	phy-map = <0x2>;
	phy-address = <0x1>;
	phy-handle = <&phy>;

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		phy: phy@1 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <1>;
		};
	};
};

&POB0 {
	leds {
		compatible = "gpio-leds";

		led-0 {
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_POWER;
			gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
		};

		led-1 {
			color = <LED_COLOR_ID_AMBER>;
			function = LED_FUNCTION_FAULT;
			gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
			panic-indicator;
		};

		led-2 {
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_WAN;
			gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
		};

		led-3 {
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_WLAN;
			function-enumerator = <0>;
			gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
		};

		led-4 {
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_WLAN;
			function-enumerator = <1>;
			gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
		};

		led-5 {
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_WLAN;
			function-enumerator = <2>;
			gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
		};

		led-6 {
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_WLAN;
			function-enumerator = <3>;
			gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
		};
	};

	keys {
		compatible = "gpio-keys";

		reset {
			/* Label as per Meraki's "MR24 Installation Guide" */
			label = "Factory Reset Button";
			linux,code = <KEY_RESTART>;
			interrupt-parent = <&UIC1>;
			interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
			gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
			debounce-interval = <60>;
		};
	};
};

&PCIE0 {
	status = "okay";
	/*
	 * relevant lspci topology:
	 *
	 *	-+-[0000:40]---00.0-[41-7f]----00.0-[42-45]--+-02.0-[43]----00.0
	 *	                                             +-03.0-[44]----00.0
	 *
	 */

	bridge@64,0 {
		reg = <0x00400000 0 0 0 0>;
		#address-cells = <3>;
		#size-cells = <2>;
		ranges;

		bridge@65,0 {
			/* IDT PES3T3 PCI Express Switch */
			compatible = "pci111d,8039";
			reg = <0x00410000 0 0 0 0>;
			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			bridge@66,2 {
				compatible = "pci111d,8039";
				reg = <0x00421000 0 0 0 0>;
				#address-cells = <3>;
				#size-cells = <2>;
				ranges;

				wifi0: wifi@67,0 {
					/* Atheros AR9380 2.4GHz */
					compatible = "pci168c,0030";
					reg = <0x00430000 0 0 0 0>;
					interrupts = <3>; /* INTC 4.1.1 */
				};
			};

			bridge@66,3 {
				compatible = "pci111d,8039";
				reg = <0x00421800 0 0 0 0>;
				#address-cells = <3>;
				#size-cells = <2>;
				ranges;

				wifi1: wifi@68,0 {
					/* Atheros AR9380 5GHz */
					compatible = "pci168c,0030";
					reg = <0x00440000 0 0 0 0>;
					interrupts = <4>; /* INTD 4.1.1 */
				};
			};
		};
	};
};