mpc85xx: convert mtd-mac-address to nvmem implementation
[openwrt/staging/hauke.git] / target / linux / mpc85xx / files / arch / powerpc / boot / dts / tl-wdr4900-v1.dts
1 /*
2 * TP-Link TL-WDR4900 v1 Device Tree Source
3 *
4 * Copyright 2013 Gabor Juhos <juhosg@openwrt.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12 /include/ "fsl/p1010si-pre.dtsi"
13
14 / {
15 model = "TP-Link TL-WDR4900 v1";
16 compatible = "tplink,tl-wdr4900-v1";
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 /*
21 stdout-path = "/soc@ffe00000/serial@4500";
22 */
23 };
24
25 aliases {
26 spi0 = &spi0;
27 led-boot = &system_green;
28 led-failsafe = &system_green;
29 led-running = &system_green;
30 led-upgrade = &system_green;
31 label-mac-device = &enet0;
32 };
33
34 memory {
35 device_type = "memory";
36 };
37
38 soc: soc@ffe00000 {
39 ranges = <0x0 0x0 0xffe00000 0x100000>;
40
41 spi0: spi@7000 {
42 flash@0 {
43 compatible = "jedec,spi-nor";
44 reg = <0>;
45 spi-max-frequency = <25000000>;
46
47 partitions {
48 compatible = "fixed-partitions";
49 #address-cells = <1>;
50 #size-cells = <1>;
51
52 uboot: partition@0 {
53 reg = <0x0 0x0050000>;
54 label = "u-boot";
55 read-only;
56 };
57
58 partition@50000 {
59 reg = <0x00050000 0x00010000>;
60 label = "dtb";
61 read-only;
62 };
63
64 partition@60000 {
65 compatible = "tplink,firmware";
66 reg = <0x00060000 0x00f80000>;
67 label = "firmware";
68 };
69
70 partition@fe0000 {
71 reg = <0x00fe0000 0x00010000>;
72 label = "config";
73 read-only;
74 };
75
76 partition@ff0000 {
77 reg = <0x00ff0000 0x00010000>;
78 label = "caldata";
79 read-only;
80 };
81 };
82 };
83 };
84
85 gpio0: gpio-controller@fc00 {
86 };
87
88 usb@22000 {
89 phy_type = "utmi";
90 dr_mode = "host";
91 };
92
93 mdio@24000 {
94 phy0: ethernet-phy@0 {
95 reg = <0x0>;
96 qca,ar8327-initvals = <
97 0x00004 0x07600000 /* PAD0_MODE */
98 0x00008 0x00000000 /* PAD5_MODE */
99 0x0000c 0x01000000 /* PAD6_MODE */
100 0x00010 0x40000000 /* POWER_ON_STRAP */
101 0x00050 0xcf35cf35 /* LED_CTRL0 */
102 0x00054 0xcf35cf35 /* LED_CTRL1 */
103 0x00058 0xcf35cf35 /* LED_CTRL2 */
104 0x0005c 0x03ffff00 /* LED_CTRL3 */
105 0x0007c 0x0000007e /* PORT0_STATUS */
106 0x00094 0x00000200 /* PORT6_STATUS */
107 >;
108 };
109 };
110
111 mdio@25000 {
112 status = "disabled";
113 };
114
115 mdio@26000 {
116 status = "disabled";
117 };
118
119 enet0: ethernet@b0000 {
120 phy-handle = <&phy0>;
121 phy-connection-type = "rgmii-id";
122 nvmem-cells = <&macaddr_uboot_4fc00>;
123 nvmem-cell-names = "mac-address";
124 };
125
126 enet1: ethernet@b1000 {
127 status = "disabled";
128 };
129
130 enet2: ethernet@b2000 {
131 status = "disabled";
132 };
133
134 sdhc@2e000 {
135 status = "disabled";
136 };
137
138 serial1: serial@4600 {
139 status = "disabled";
140 };
141
142 can0: can@1c000 {
143 status = "disabled";
144 };
145
146 can1: can@1d000 {
147 status = "disabled";
148 };
149
150 ptp_clock@b0e00 {
151 compatible = "fsl,etsec-ptp";
152 reg = <0xb0e00 0xb0>;
153 interrupts = <68 2 0 0 69 2 0 0 70 2 0 0>;
154 fsl,cksel = <1>;
155 fsl,tclk-period = <5>;
156 fsl,tmr-prsc = <2>;
157 fsl,tmr-add = <0xcccccccd>;
158 fsl,tmr-fiper1 = <0x3b9ac9fb>; /* 1PPS */
159 fsl,tmr-fiper2 = <0x00018696>;
160 fsl,max-adj = <249999999>;
161 };
162 };
163
164 pci0: pcie@ffe09000 {
165 reg = <0 0xffe09000 0 0x1000>;
166 ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
167 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
168 pcie@0 {
169 ranges = <0x2000000 0x0 0xa0000000
170 0x2000000 0x0 0xa0000000
171 0x0 0x20000000
172
173 0x1000000 0x0 0x0
174 0x1000000 0x0 0x0
175 0x0 0x100000>;
176 };
177 };
178
179 pci1: pcie@ffe0a000 {
180 reg = <0 0xffe0a000 0 0x1000>;
181 ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
182 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
183 pcie@0 {
184 ranges = <0x2000000 0x0 0x80000000
185 0x2000000 0x0 0x80000000
186 0x0 0x20000000
187
188 0x1000000 0x0 0x0
189 0x1000000 0x0 0x0
190 0x0 0x100000>;
191 };
192 };
193
194 ifc: ifc@ffe1e000 {
195 status = "disabled";
196 };
197
198 leds {
199 compatible = "gpio-leds";
200
201 system_green: system {
202 gpios = <&gpio0 2 1>; /* active low */
203 label = "tp-link:blue:system";
204 };
205
206 usb1 {
207 gpios = <&gpio0 3 1>; /* active low */
208 label = "tp-link:green:usb1";
209 };
210
211 usb2 {
212 gpios = <&gpio0 4 1>; /* active low */
213 label = "tp-link:green:usb2";
214 };
215
216 usbpower {
217 gpios = <&gpio0 10 1>; /* active low */
218 label = "tp-link:usb:power";
219 };
220 };
221
222 buttons {
223 compatible = "gpio-keys";
224
225 reset {
226 label = "Reset button";
227 gpios = <&gpio0 5 1>; /* active low */
228 linux,code = <0x198>; /* KEY_RESTART */
229 };
230
231 rfkill {
232 label = "RFKILL switch";
233 gpios = <&gpio0 11 1>; /* active low */
234 linux,code = <0xf7>; /* RFKill */
235 };
236 };
237 };
238
239 /include/ "fsl/p1010si-post.dtsi"
240
241 / {
242 cpus {
243 PowerPC,P1010@0 {
244 bus-frequency = <399999996>;
245 timebase-frequency = <49999999>;
246 clock-frequency = <799999992>;
247 };
248 };
249
250 memory {
251 reg = <0x0 0x0 0x0 0x8000000>;
252 };
253
254 soc@ffe00000 {
255 bus-frequency = <399999996>;
256
257 serial@4600 {
258 clock-frequency = <399999996>;
259 };
260
261 serial@4500 {
262 clock-frequency = <399999996>;
263 };
264
265 pic@40000 {
266 clock-frequency = <399999996>;
267 };
268 };
269 };
270
271 /*
272 * The TL-WDR4900 v1 uses the NXP (Freescale) P1014 SoC which is closely
273 * related to the P1010.
274 *
275 * NXP QP1010FS.pdf "QorIQ P1010 and P1014 Communications Processors"
276 * datasheet states that the P1014 does not include the accelerated crypto
277 * module (CAAM/SEC4) which is present in the P1010.
278 *
279 * NXP Appliation Note AN4938 Rev. 2 implies that some P1014 may contain the
280 * SEC4 module, but states that SoCs with System Version Register values
281 * 0x80F10110 or 0x80F10120 do not have the security feature.
282 *
283 * All v1.3 TL-WDR4900 tested have SVR == 0x80F10110 which AN4938 describes
284 * as: core rev 1.0, "P1014 (without security)".
285 *
286 * The SVR value is reported by uboot on the serial console.
287 */
288
289 / {
290 soc: soc@ffe00000 {
291 /delete-node/ crypto@30000; /* Pulled in by p1010si-post */
292 };
293 };
294
295 &uboot {
296 compatible = "nvmem-cells";
297 #address-cells = <1>;
298 #size-cells = <1>;
299
300 macaddr_uboot_4fc00: macaddr@4fc00 {
301 reg = <0x4fc00 0x6>;
302 };
303 };