ipq806x: fix 3.18 support
[openwrt/staging/dedeckeh.git] / target / linux / ipq806x / a
1 commit be3de98aef65403129a4b714ddce8ab71f563209
2 Author: Ash Benz <ash.benz@bk.ru>
3 Date: Fri May 27 22:26:45 2016 +0800
4
5 ipq806x/dts: Add Archer C2600 DTS
6
7 Signed-off-by: Ash Benz <ash.benz@bk.ru>
8
9 diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
10 index 52cc1fa..77391d0 100644
11 --- a/target/linux/ipq806x/image/Makefile
12 +++ b/target/linux/ipq806x/image/Makefile
13 @@ -36,11 +36,6 @@ define Build/append-dtb
14 cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@
15 endef
16
17 -define Build/append-new-dtb
18 - $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb)
19 - cat $@.dtb >> $@
20 -endef
21 -
22 define Build/append-file
23 cat $(1) >> $@
24 endef
25 @@ -95,7 +90,7 @@ define Device/TpSafeImage
26 PROFILES += $$(DEVICE_NAME)
27 FILESYSTEMS := squashfs
28 KERNEL_SUFFIX := -uImage
29 - KERNEL = kernel-bin | append-new-dtb | uImage none
30 + KERNEL = kernel-bin | append-dtb | uImage none
31 KERNEL_NAME := zImage
32 TPLINK_BOARD_NAME :=
33 IMAGES := factory.bin sysupgrade.bin
34 diff --git a/target/linux/ipq806x/patches-4.4/802-ARM-qcom-add-TPLink-C2600-device-tree.patch b/target/linux/ipq806x/patches-4.4/802-ARM-qcom-add-TPLink-C2600-device-tree.patch
35 new file mode 100644
36 index 0000000..8952f33
37 --- /dev/null
38 +++ b/target/linux/ipq806x/patches-4.4/802-ARM-qcom-add-TPLink-C2600-device-tree.patch
39 @@ -0,0 +1,425 @@
40 +--- a/arch/arm/boot/dts/Makefile
41 ++++ b/arch/arm/boot/dts/Makefile
42 +@@ -506,6 +506,7 @@
43 + qcom-apq8084-ifc6540.dtb \
44 + qcom-apq8084-mtp.dtb \
45 + qcom-ipq8064-ap148.dtb \
46 ++ qcom-ipq8064-c2600.dtb \
47 + qcom-ipq8064-db149.dtb \
48 + qcom-ipq8064-r7500.dtb \
49 + qcom-ipq8064-d7800.dtb \
50 +--- /dev/null
51 ++++ b/arch/arm/boot/dts/qcom-ipq8064-c2600.dts
52 +@@ -0,0 +1,412 @@
53 ++#include "qcom-ipq8064-v1.0.dtsi"
54 ++#include <dt-bindings/input/input.h>
55 ++
56 ++/ {
57 ++ model = "TP-Link Archer C2600";
58 ++ compatible = "tplink,c2600", "qcom,ipq8064";
59 ++
60 ++ memory@0 {
61 ++ reg = <0x42000000 0x1e000000>;
62 ++ device_type = "memory";
63 ++ };
64 ++
65 ++ reserved-memory {
66 ++ #address-cells = <1>;
67 ++ #size-cells = <1>;
68 ++ ranges;
69 ++ rsvd@41200000 {
70 ++ reg = <0x41200000 0x300000>;
71 ++ no-map;
72 ++ };
73 ++ };
74 ++
75 ++ aliases {
76 ++ serial0 = &uart4;
77 ++ mdio-gpio0 = &mdio0;
78 ++ };
79 ++
80 ++ chosen {
81 ++ linux,stdout-path = "serial0:115200n8";
82 ++ };
83 ++
84 ++ soc {
85 ++ pinmux@800000 {
86 ++ i2c4_pins: i2c4_pinmux {
87 ++ pins = "gpio12", "gpio13";
88 ++ function = "gsbi4";
89 ++ bias-disable;
90 ++ };
91 ++
92 ++ spi_pins: spi_pins {
93 ++ mux {
94 ++ pins = "gpio18", "gpio19", "gpio21";
95 ++ function = "gsbi5";
96 ++ drive-strength = <10>;
97 ++ bias-none;
98 ++ };
99 ++ };
100 ++
101 ++ nand_pins: nand_pins {
102 ++ mux {
103 ++ pins = "gpio34", "gpio35", "gpio36",
104 ++ "gpio37", "gpio38", "gpio39",
105 ++ "gpio40", "gpio41", "gpio42",
106 ++ "gpio43", "gpio44", "gpio45",
107 ++ "gpio46", "gpio47";
108 ++ function = "nand";
109 ++ drive-strength = <10>;
110 ++ bias-disable;
111 ++ };
112 ++
113 ++ pullups {
114 ++ pins = "gpio39";
115 ++ bias-pull-up;
116 ++ };
117 ++
118 ++ hold {
119 ++ pins = "gpio40", "gpio41", "gpio42",
120 ++ "gpio43", "gpio44", "gpio45",
121 ++ "gpio46", "gpio47";
122 ++ bias-bus-hold;
123 ++ };
124 ++ };
125 ++
126 ++ mdio0_pins: mdio0_pins {
127 ++ mux {
128 ++ pins = "gpio0", "gpio1";
129 ++ function = "gpio";
130 ++ drive-strength = <8>;
131 ++ bias-disable;
132 ++ };
133 ++ };
134 ++
135 ++ rgmii2_pins: rgmii2_pins {
136 ++ mux {
137 ++ pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
138 ++ "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
139 ++ function = "rgmii2";
140 ++ drive-strength = <8>;
141 ++ bias-disable;
142 ++ };
143 ++ };
144 ++ };
145 ++
146 ++ gsbi@16300000 {
147 ++ qcom,mode = <GSBI_PROT_I2C_UART>;
148 ++ status = "ok";
149 ++ serial@16340000 {
150 ++ status = "ok";
151 ++ };
152 ++ /*
153 ++ * The i2c device on gsbi4 should not be enabled.
154 ++ * On ipq806x designs gsbi4 i2c is meant for exclusive
155 ++ * RPM usage. Turning this on in kernel manifests as
156 ++ * i2c failure for the RPM.
157 ++ */
158 ++ };
159 ++
160 ++ gsbi5: gsbi@1a200000 {
161 ++ qcom,mode = <GSBI_PROT_SPI>;
162 ++ status = "ok";
163 ++
164 ++ spi4: spi@1a280000 {
165 ++ status = "ok";
166 ++ spi-max-frequency = <50000000>;
167 ++
168 ++ pinctrl-0 = <&spi_pins>;
169 ++ pinctrl-names = "default";
170 ++
171 ++ cs-gpios = <&qcom_pinmux 20 0>;
172 ++
173 ++ flash: m25p80@0 {
174 ++ compatible = "s25fl256s1";
175 ++ #address-cells = <1>;
176 ++ #size-cells = <1>;
177 ++ spi-max-frequency = <50000000>;
178 ++ reg = <0>;
179 ++
180 ++ SBL1@0 {
181 ++ label = "SBL1";
182 ++ reg = <0x0 0x20000>;
183 ++ read-only;
184 ++ };
185 ++ MIBIB@20000 {
186 ++ label = "MIBIB";
187 ++ reg = <0x20000 0x20000>;
188 ++ read-only;
189 ++ };
190 ++ SBL2@40000 {
191 ++ label = "SBL2";
192 ++ reg = <0x40000 0x20000>;
193 ++ read-only;
194 ++ };
195 ++ SBL3@60000 {
196 ++ label = "SBL3";
197 ++ reg = <0x60000 0x30000>;
198 ++ read-only;
199 ++ };
200 ++ DDRCONFIG@90000 {
201 ++ label = "DDRCONFIG";
202 ++ reg = <0x90000 0x10000>;
203 ++ read-only;
204 ++ };
205 ++ SSD@a0000 {
206 ++ label = "SSD";
207 ++ reg = <0xa0000 0x10000>;
208 ++ read-only;
209 ++ };
210 ++ TZ@b0000 {
211 ++ label = "TZ";
212 ++ reg = <0xb0000 0x30000>;
213 ++ read-only;
214 ++ };
215 ++ RPM@e0000 {
216 ++ label = "RPM";
217 ++ reg = <0xe0000 0x20000>;
218 ++ read-only;
219 ++ };
220 ++ fs-uboot@100000 {
221 ++ label = "fs-uboot";
222 ++ reg = <0x100000 0x70000>;
223 ++ read-only;
224 ++ };
225 ++ uboot-env@170000 {
226 ++ label = "uboot-env";
227 ++ reg = <0x170000 0x40000>;
228 ++ read-only;
229 ++ };
230 ++ radio@1b0000 {
231 ++ label = "radio";
232 ++ reg = <0x1b0000 0x40000>;
233 ++ read-only;
234 ++ };
235 ++ os-image@1f0000 {
236 ++ label = "os-image";
237 ++ reg = <0x1f0000 0x200000>;
238 ++ };
239 ++ rootfs@3f0000 {
240 ++ label = "rootfs";
241 ++ reg = <0x3f0000 0x1b00000>;
242 ++ };
243 ++ defaultmac: default-mac@1ef0000 {
244 ++ label = "default-mac";
245 ++ reg = <0x1ef0000 0x00200>;
246 ++ read-only;
247 ++ };
248 ++ pin@1ef0200 {
249 ++ label = "pin";
250 ++ reg = <0x1ef0200 0x00200>;
251 ++ read-only;
252 ++ };
253 ++ product-info@1ef0400 {
254 ++ label = "product-info";
255 ++ reg = <0x1ef0400 0x0fc00>;
256 ++ read-only;
257 ++ };
258 ++ partition-table@1f00000 {
259 ++ label = "partition-table";
260 ++ reg = <0x1f00000 0x10000>;
261 ++ read-only;
262 ++ };
263 ++ soft-version@1f10000 {
264 ++ label = "soft-version";
265 ++ reg = <0x1f10000 0x10000>;
266 ++ read-only;
267 ++ };
268 ++ support-list@1f20000 {
269 ++ label = "support-list";
270 ++ reg = <0x1f20000 0x10000>;
271 ++ read-only;
272 ++ };
273 ++ profile@1f30000 {
274 ++ label = "profile";
275 ++ reg = <0x1f30000 0x10000>;
276 ++ read-only;
277 ++ };
278 ++ default-config@1f40000 {
279 ++ label = "default-config";
280 ++ reg = <0x1f40000 0x10000>;
281 ++ read-only;
282 ++ };
283 ++ user-config@1f50000 {
284 ++ label = "user-config";
285 ++ reg = <0x1f50000 0x40000>;
286 ++ read-only;
287 ++ };
288 ++ qos-db@1f90000 {
289 ++ label = "qos-db";
290 ++ reg = <0x1f90000 0x40000>;
291 ++ read-only;
292 ++ };
293 ++ usb-config@1fd0000 {
294 ++ label = "usb-config";
295 ++ reg = <0x1fd0000 0x10000>;
296 ++ read-only;
297 ++ };
298 ++ log@1fe0000 {
299 ++ label = "log";
300 ++ reg = <0x1fe0000 0x20000>;
301 ++ read-only;
302 ++ };
303 ++ };
304 ++ };
305 ++ };
306 ++
307 ++ phy@100f8800 { /* USB3 port 1 HS phy */
308 ++ status = "ok";
309 ++ };
310 ++
311 ++ phy@100f8830 { /* USB3 port 1 SS phy */
312 ++ status = "ok";
313 ++ };
314 ++
315 ++ phy@110f8800 { /* USB3 port 0 HS phy */
316 ++ status = "ok";
317 ++ };
318 ++
319 ++ phy@110f8830 { /* USB3 port 0 SS phy */
320 ++ status = "ok";
321 ++ };
322 ++
323 ++ usb30@0 {
324 ++ status = "ok";
325 ++ };
326 ++
327 ++ usb30@1 {
328 ++ status = "ok";
329 ++ };
330 ++
331 ++ pcie0: pci@1b500000 {
332 ++ status = "ok";
333 ++ phy-tx0-term-offset = <7>;
334 ++ };
335 ++
336 ++ pcie1: pci@1b700000 {
337 ++ status = "ok";
338 ++ phy-tx0-term-offset = <7>;
339 ++ };
340 ++
341 ++ mdio0: mdio {
342 ++ compatible = "virtual,mdio-gpio";
343 ++ #address-cells = <1>;
344 ++ #size-cells = <0>;
345 ++ gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
346 ++ pinctrl-0 = <&mdio0_pins>;
347 ++ pinctrl-names = "default";
348 ++
349 ++ phy0: ethernet-phy@0 {
350 ++ device_type = "ethernet-phy";
351 ++ reg = <0>;
352 ++ qca,ar8327-initvals = <
353 ++ 0x00004 0x7600000 /* PAD0_MODE */
354 ++ 0x00008 0x1000000 /* PAD5_MODE */
355 ++ 0x0000c 0x80 /* PAD6_MODE */
356 ++ 0x000e4 0xaa545 /* MAC_POWER_SEL */
357 ++ 0x000e0 0xc74164de /* SGMII_CTRL */
358 ++ 0x0007c 0x4e /* PORT0_STATUS */
359 ++ 0x00094 0x4e /* PORT6_STATUS */
360 ++ >;
361 ++ };
362 ++
363 ++ phy4: ethernet-phy@4 {
364 ++ device_type = "ethernet-phy";
365 ++ reg = <4>;
366 ++ };
367 ++ };
368 ++
369 ++ gmac1: ethernet@37200000 {
370 ++ status = "ok";
371 ++ phy-mode = "rgmii";
372 ++ qcom,id = <1>;
373 ++
374 ++ pinctrl-0 = <&rgmii2_pins>;
375 ++ pinctrl-names = "default";
376 ++
377 ++ mtd-mac-address = <&defaultmac 0x8>;
378 ++ mtd-mac-address-increment = <1>;
379 ++
380 ++ fixed-link {
381 ++ speed = <1000>;
382 ++ full-duplex;
383 ++ };
384 ++ };
385 ++
386 ++ gmac2: ethernet@37400000 {
387 ++ status = "ok";
388 ++ phy-mode = "sgmii";
389 ++ qcom,id = <2>;
390 ++
391 ++ mtd-mac-address = <&defaultmac 0x8>;
392 ++
393 ++ fixed-link {
394 ++ speed = <1000>;
395 ++ full-duplex;
396 ++ };
397 ++ };
398 ++ };
399 ++
400 ++ gpio-keys {
401 ++ compatible = "gpio-keys";
402 ++
403 ++ wifi {
404 ++ label = "wifi";
405 ++ gpios = <&qcom_pinmux 49 1>;
406 ++ linux,code = <KEY_WLAN>;
407 ++ };
408 ++
409 ++ reset {
410 ++ label = "reset";
411 ++ gpios = <&qcom_pinmux 64 1>;
412 ++ linux,code = <KEY_RESTART>;
413 ++ };
414 ++
415 ++ wps {
416 ++ label = "wps";
417 ++ gpios = <&qcom_pinmux 65 1>;
418 ++ linux,code = <KEY_WPS_BUTTON>;
419 ++ };
420 ++ ledgeneral {
421 ++ label = "ledgeneral";
422 ++ gpios = <&qcom_pinmux 16 1>;
423 ++ linux,code = <KEY_DOLLAR>;
424 ++ };
425 ++ };
426 ++
427 ++ gpio-leds {
428 ++ compatible = "gpio-leds";
429 ++
430 ++ lan {
431 ++ label = "lan:blue";
432 ++ gpios = <&qcom_pinmux 6 0>;
433 ++ };
434 ++ usb4 {
435 ++ label = "usb_4:blue";
436 ++ gpios = <&qcom_pinmux 7 0>;
437 ++ };
438 ++ usb2 {
439 ++ label = "usb_2:blue";
440 ++ gpios = <&qcom_pinmux 8 0>;
441 ++ };
442 ++ wps {
443 ++ label = "wps:blue";
444 ++ gpios = <&qcom_pinmux 9 0>;
445 ++ };
446 ++ wan_blue {
447 ++ label = "wan:blue";
448 ++ gpios = <&qcom_pinmux 33 1>;
449 ++ };
450 ++ status {
451 ++ label = "status:blue";
452 ++ gpios = <&qcom_pinmux 53 0>;
453 ++ default-state = "on";
454 ++ };
455 ++ ledgnr {
456 ++ label = "ledgnr:blue";
457 ++ gpios = <&qcom_pinmux 66 0>;
458 ++ };
459 ++ };
460 ++};
461 ++
462 ++&adm_dma {
463 ++ status = "ok";
464 ++};