summaryrefslogtreecommitdiffstats
path: root/master/Hans_Ulli_Kroll.patch
blob: 895af38242e884c38676d0855afee3859ff5af79 (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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
commit 738b0b62be025b09ea71cb59debc354df1b91d5d
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Thu Oct 6 12:22:41 2016 +0200

    build integration into LEDE cde6ebc3f670c245172ca89cca94e454f1c00937

diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index b1afb82..b7ca97f 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -413,3 +413,23 @@ define Device/tiny-ac
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
 endef
 TARGET_DEVICES += tiny-ac
+
+define Device/br-6478ac-v2
+  DTS := BR-6478AC-V2
+  DEVICE_TITLE := Edimax BR-6478AC-V2
+  BLOCKSIZE := 4k
+  IMAGES += factory.bin
+  IMAGE_SIZE := $(ralink_default_fw_size_8M)
+  IMAGE/sysupgrade.bin := \
+	append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
+	seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
+	pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.bin := \
+	append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
+	append-rootfs | pad-rootfs -x 64 | \
+	seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
+	seama-seal -m "signature=wapn22_dlink.2013gui_dap1320b" | \
+	check-size $$$$(IMAGE_SIZE)
+  DEVICE_PACKAGES := kmod-mt76
+endef
+TARGET_DEVICES += br-6478ac-v2
commit 63f49a2f6af6d9b09a3cc2dcd980ed2375a51690
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Thu Oct 6 12:23:48 2016 +0200

    first DTS and update
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit ebb1dc8ea31b9c14a4a7eccba51e2d40c8237de9)

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 6157d87..6783576 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -177,6 +177,7 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"1:lan" "0:wan" "6@eth0"
 		;;
+	br-6478ac-v2|\
 	e1700|\
 	mt7620a_mt7530)
 		ucidef_add_switch "switch1" \
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 10139d7..0fa260b 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -76,6 +76,9 @@ ramips_board_detect() {
 	*"BR-6475nD")
 		name="br-6475nd"
 		;;
+	*"BR-6478AC-v2")
+		name="br-6478ac-v2"
+		;;
 	*"Broadway")
 		name="broadway"
 		;;
commit 85eacfde9ea48acf0c90ca3ad3ada9b8e9e8577c
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Thu Oct 6 12:24:37 2016 +0200

    add DTS
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit 3e92f50702735086e69994fc87177e4bb49df8a5)

diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
new file mode 100644
index 0000000..a428652
--- /dev/null
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -0,0 +1,179 @@
+/*
+ * Device Tree file for the Edimax BR-6478AC V2
+ * based on Linksys E1700
+ *
+ * Copyright (C) 2016 Hasn Ulli Kroll <ulli.kroll@googlemail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+	compatible = "BR-6478AC-V2", "ralink,mt7620a-soc";
+	model = "Edimax BR-6478ACV2";
+
+	chosen {
+                bootargs = "console=ttyS0,57600";
+	};
+
+	palmbus@10000000 {
+			spi@b00 {
+			status = "okay";
+
+			m25p80@0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "mx25l6405d";
+				reg = <0 0>;
+				linux,modalias = "m25p80", "mx25l6405d";
+				spi-max-frequency = <10000000>;
+	
+				partition@0 {
+					label = "u-boot";
+					reg = <0x0 0x30000>;
+					read-only;
+				};
+	
+				partition@30000 {
+					label = "u-boot-env";
+					reg = <0x30000 0x10000>;
+					read-only;
+				};
+	
+				factory: partition@40000 {
+					label = "factory";
+					reg = <0x40000 0x10000>;
+					read-only;
+				};
+	
+				partition@50000 {
+					label = "cimage";
+					reg = <0x50000 0x20000>;
+					read-only;
+				};
+	
+				partition@70000 {
+	                                label = "firmware";
+	                                reg = <0x00070000 0x00790000>;
+				};
+			};
+		};
+	};
+
+	pinctrl {
+		state_default: pinctrl0 {
+		gpio {
+			ralink,group = "i2c", "uartf";
+			ralink,function = "gpio";
+		};
+		};
+	};
+
+	ethernet@10100000 {
+		status = "okay";
+		mtd-mac-address = <&factory 0x28>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+		port@5 {
+			status = "okay";
+			mediatek,fixed-link = <1000 1 1 1>;
+			phy-mode = "rgmii";
+		};
+
+		mdio-bus {
+			status = "okay";
+
+			phy0: ethernet-phy@0 {
+				reg = <0>;
+				phy-mode = "rgmii";
+			};
+
+			phy1: ethernet-phy@1 {
+				reg = <1>;
+				phy-mode = "rgmii";
+			};
+
+			phy2: ethernet-phy@2 {
+				reg = <2>;
+				phy-mode = "rgmii";
+			};
+
+			phy3: ethernet-phy@3 {
+				reg = <3>;
+				phy-mode = "rgmii";
+			};
+
+			phy4: ethernet-phy@4 {
+				reg = <4>;
+				phy-mode = "rgmii";
+			};
+
+			phy1f: ethernet-phy@1f {
+				reg = <0x1f>;
+				phy-mode = "rgmii";
+			};
+		};
+	};
+
+	gsw@10110000 {
+		mediatek,port4 = "gmac";
+		mediatek,mt7530 = <1>;
+	};
+
+	wmac@10180000 {
+		ralink,mtd-eeprom = <&factory 0>;
+	};
+	
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 1 0>;
+			linux,code = <0x198>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio0 2 0>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power {
+			label = "br-6478ac-v2:green:power";
+			gpios = <&gpio0 10 1>;
+		};
+
+		wan {
+			label = "br-6478ac-v2:green:wps";
+			gpios = <&gpio0 12 1>;
+		};
+	};
+
+	pcie@10140000 {
+		status = "okay";
+	};
+
+	ehci@101c0000 {
+		status = "okay";
+	};
+
+	ohci@101c1000 {
+		status = "okay";
+	};
+};
+
+	
commit d5dce4b6dada43f9b582eb089527beff4c196517
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Thu Oct 6 12:27:10 2016 +0200

    update nor in DTS
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit 3d80ef2f6f078d037578e0d9e401fe56adb22927)

diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
index a428652..8b4c260 100644
--- a/target/linux/ramips/dts/BR-6478AC-V2.dts
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -28,7 +28,7 @@
 			m25p80@0 {
 				#address-cells = <1>;
 				#size-cells = <1>;
-				compatible = "mx25l6405d";
+				compatible = "jedec,spi-nor";
 				reg = <0 0>;
 				linux,modalias = "m25p80", "mx25l6405d";
 				spi-max-frequency = <10000000>;
commit b72722ae171cfd9924a481f88ba377543b713fa1
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Wed Aug 31 12:33:13 2016 +0200

    fix in dts, wrong name compatible string
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit 1c5f34583369b06c5345f74550b7056de2b240b0)

diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
index 8b4c260..0951b5a 100644
--- a/target/linux/ramips/dts/BR-6478AC-V2.dts
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -14,7 +14,7 @@
 /include/ "mt7620a.dtsi"
 
 / {
-	compatible = "BR-6478AC-V2", "ralink,mt7620a-soc";
+	compatible = "edimax,br-6478ac-v2", "ralink,mt7620a-soc";
 	model = "Edimax BR-6478ACV2";
 
 	chosen {
commit 1a0b201045c4fd03458feaae07cb730d446e4485
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Thu Oct 6 12:49:23 2016 +0200

    update from oPENWRT forum, need author
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit ed77ae35eb477c52df09aa6552165ae89598469c)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 460253c..48126f2 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -74,6 +74,12 @@ bc2)
 br-6425)
 	set_wifi_led "$board:orange:wlan"
 	;;
+br-6478ac-v2)
+	ucidef_set_led_default "power" "POWER" "$board:white:power" "1"
+	ucidef_set_led_default "wan" "WAN LED" "$board:blue:wan" "1"
+	set_wifi_led "$board:blue:wlan"
+	set_usb_led "$board:blue:usb"
+	;;
 broadway)
 	set_usb_led "$board:red:diskmounted"
 	set_wifi_led "$board:red:wps_active"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 6783576..8a9cb47 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -154,6 +154,14 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
 		;;
+
+    br-6478ac-v2)
+	//    ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+		ucidef_set_interface_lan "eth0.1"
+		ucidef_add_switch "switch1" \
+			"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
+		;;
+
 	cf-wr800n|\
 	ex2700)
 		ucidef_add_switch "switch0" \
@@ -282,6 +290,11 @@ ramips_setup_macs()
 		lan_mac=$(cat /sys/class/net/eth0/address)
 		wan_mac=$(mtd_get_mac_binary devdata 7)
 		;;
+    br-6478ac-v2)
+		lan_mac=$(cat /sys/class/net/eth0/address)
+		wan_mac=$(cat /sys/class/net/eth0.2/address)
+		//wan_mac=$(mtd_get_mac_binary devdata 7)
+		;;
 	cy-swr1100|\
 	dir-645)
 		lan_mac=$(mtd_get_mac_ascii nvram lanmac)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 0c5abb2..c19ab08 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -33,6 +33,9 @@ get_status_led() {
 	xdxrn502j)
 		status_led="$board:green:power"
 		;;
+    br-6478ac-v2)
+		status_led="$board:white:power"
+		;;
 	a5-v11|\
 	cs-qr10|\
 	d105|\
diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
index 0951b5a..b32a7df 100644
--- a/target/linux/ramips/dts/BR-6478AC-V2.dts
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -18,10 +18,16 @@
 	model = "Edimax BR-6478ACV2";
 
 	chosen {
-                bootargs = "console=ttyS0,57600";
+			bootargs = "console=ttyS0,57600";
 	};
 
 	palmbus@10000000 {
+		gpio1: gpio@638 {
+			satus = "okay";
+		};
+		gpio2: gpio@660 {
+			status = "okay";
+		};
 			spi@b00 {
 			status = "okay";
 
@@ -74,6 +80,14 @@
 		};
 	};
 
+	usbphy: usbphy {
+		compatible = "mediatek,mt7620-usbphy";
+		#phy-cells = <1>;
+		//    resets = <&rstctrl 22 &rstctrl 25>;
+		resets = <&rstctrl 22 &rstctrl 19>;
+		reset-names = "host", "device";
+	};
+ 
 	ethernet@10100000 {
 		status = "okay";
 		mtd-mac-address = <&factory 0x28>;
@@ -138,14 +152,14 @@
 
 		reset {
 			label = "reset";
-			gpios = <&gpio0 1 0>;
-			linux,code = <0x198>;
+			gpios = <&gpio0 12 1>;
+			linux,code = <0x101>;
 		};
 
 		wps {
 			label = "wps";
-			gpios = <&gpio0 2 0>;
-			linux,code = <0x211>;
+			gpios = <&gpio0 1 1>;
+			linux,code = <0x100>;
 		};
 	};
 
@@ -153,13 +167,20 @@
 		compatible = "gpio-leds";
 
 		power {
-			label = "br-6478ac-v2:green:power";
-			gpios = <&gpio0 10 1>;
+			label = "br-6478ac-v2:white:power";
+			gpios = <&gpio0 11 1>;
 		};
-
 		wan {
-			label = "br-6478ac-v2:green:wps";
-			gpios = <&gpio0 12 1>;
+			label = "br-6478ac-v2:blue:wan";
+			gpios = <&gpio0 7 1>;
+		};
+		wlan {
+            		label = "br-6478ac-v2:blue:wlan";
+			gpios = <&gpio0 10 1>;
+		};
+		usb {
+			label = "br-6478ac-v2:blue:usb";
+			gpios = <&gpio0 14 1>;
 		};
 	};
 
@@ -169,10 +190,14 @@
 
 	ehci@101c0000 {
 		status = "okay";
+		interrupt-parent = <&intc>;
+		interrupts = <18>;
 	};
 
 	ohci@101c1000 {
 		status = "okay";
+		interrupt-parent = <&intc>;
+		interrupts = <18>;
 	};
 };
 
commit be7a5d4f45b8090cf39da90840d19dcf0cbf68cc
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Mon Oct 10 06:33:31 2016 +0200

    change Image size
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit 19652a6a2f07f804ffbcf254779ae1a56e7eddf7)

diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index b7ca97f..9454865 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -419,10 +419,10 @@ define Device/br-6478ac-v2
   DEVICE_TITLE := Edimax BR-6478AC-V2
   BLOCKSIZE := 4k
   IMAGES += factory.bin
-  IMAGE_SIZE := $(ralink_default_fw_size_8M)
+  IMAGE_SIZE := 7616k
   IMAGE/sysupgrade.bin := \
 	append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
-	seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
+	seama -m "dev=/dev/mtdblock/5" -m "type=firmware" | \
 	pad-rootfs | check-size $$$$(IMAGE_SIZE)
   IMAGE/factory.bin := \
 	append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
commit 195015bf6b19e1c4f822afc4fdf2513fa380c262
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Mon Oct 10 06:46:00 2016 +0200

    add rohan
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit 3813cdf50cf50312845d99158125f4b759f02e5b)

diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
index b32a7df..14cc054 100644
--- a/target/linux/ramips/dts/BR-6478AC-V2.dts
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -2,7 +2,8 @@
  * Device Tree file for the Edimax BR-6478AC V2
  * based on Linksys E1700
  *
- * Copyright (C) 2016 Hasn Ulli Kroll <ulli.kroll@googlemail.com>
+ * Copyright (C) 2016 Rohan Murch <rohan.murch@gmail.com>
+ * Copyright (C) 2016 Hans Ulli Kroll <ulli.kroll@googlemail.com>
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2.  This program is licensed "as is" without any
commit 57ab022f3d3aaccbeab94ca95bedb00cba3aa4ca
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Mon Oct 10 17:42:33 2016 +0200

    fix mac address
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit 3713190ded352690ba4dadf9c08460808d7f91fe)

diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
index 14cc054..dc49d6d 100644
--- a/target/linux/ramips/dts/BR-6478AC-V2.dts
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -39,31 +39,31 @@
 				reg = <0 0>;
 				linux,modalias = "m25p80", "mx25l6405d";
 				spi-max-frequency = <10000000>;
-	
+
 				partition@0 {
 					label = "u-boot";
 					reg = <0x0 0x30000>;
 					read-only;
 				};
-	
+
 				partition@30000 {
 					label = "u-boot-env";
 					reg = <0x30000 0x10000>;
 					read-only;
 				};
-	
+
 				factory: partition@40000 {
 					label = "factory";
 					reg = <0x40000 0x10000>;
 					read-only;
 				};
-	
+
 				partition@50000 {
 					label = "cimage";
 					reg = <0x50000 0x20000>;
 					read-only;
 				};
-	
+
 				partition@70000 {
 	                                label = "firmware";
 	                                reg = <0x00070000 0x00790000>;
@@ -88,10 +88,10 @@
 		resets = <&rstctrl 22 &rstctrl 19>;
 		reset-names = "host", "device";
 	};
- 
+
 	ethernet@10100000 {
 		status = "okay";
-		mtd-mac-address = <&factory 0x28>;
+		mtd-mac-address = <&factory 0x4>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
@@ -144,7 +144,7 @@
 	wmac@10180000 {
 		ralink,mtd-eeprom = <&factory 0>;
 	};
-	
+
 	gpio-keys-polled {
 		compatible = "gpio-keys-polled";
 		#address-cells = <1>;
@@ -202,4 +202,4 @@
 	};
 };
 
-	
+
commit c1e3abd23e7b9e479fe0befc2472431e10524538
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Mon Oct 10 19:02:17 2016 +0200

    add more gpios
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit 308d1fd214eb25823ce1b88aa0e4dd45d01cb6cd)

diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
index dc49d6d..9fb6575 100644
--- a/target/linux/ramips/dts/BR-6478AC-V2.dts
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -74,10 +74,10 @@
 
 	pinctrl {
 		state_default: pinctrl0 {
-		gpio {
-			ralink,group = "i2c", "uartf";
-			ralink,function = "gpio";
-		};
+			gpio {
+				ralink,group = "i2c", "uartf", "wdt", "pa", "ephy", "nd_sd", "wled";
+				ralink,function = "gpio";
+			};
 		};
 	};
 
commit ad587c0868f957d5535bfad37fed3978457499c2
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Tue Oct 11 20:40:01 2016 +0200

    ass 5ghz mac
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit c2fd19ad18b5c25ec49e2370c55ed40f1ae038d5)

diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
index 9fb6575..5426b42 100644
--- a/target/linux/ramips/dts/BR-6478AC-V2.dts
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -187,6 +187,15 @@
 
 	pcie@10140000 {
 		status = "okay";
+		pcie-bridge {
+			mt76@0,0 {
+				reg = <0x0000 0 0 0 0>;
+				device_type = "pci";
+				mediatek,mtd-eeprom = <&factory 0x8000>;
+				mediatek,2ghz = <0>;
+			};
+		};
+
 	};
 
 	ehci@101c0000 {
commit cf11599d082187f99f10da38dfd6844c1532f232
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Tue Oct 11 21:10:31 2016 +0200

    update fix reset button
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit 025f12b538493e1a5dfe3af398c81573fb3e8f5c)

diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
index 5426b42..1044131 100644
--- a/target/linux/ramips/dts/BR-6478AC-V2.dts
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -153,14 +153,8 @@
 
 		reset {
 			label = "reset";
-			gpios = <&gpio0 12 1>;
-			linux,code = <0x101>;
-		};
-
-		wps {
-			label = "wps";
-			gpios = <&gpio0 1 1>;
-			linux,code = <0x100>;
+			gpios = <&gpio0 2 1>;
+			linux,code = <0x198>;
 		};
 	};
 
commit f51ece4199d0805920a8fd09f422860aa198cfef
Author: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Date:   Wed Oct 12 19:19:39 2016 +0200

    fix portmap on switch but no GBits/s on lan and dts rewrite
    
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    (cherry picked from commit 87a3b8fe350028ba19ad35803808be5ce2d2cb44)

diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts
index 1044131..ac870cc 100644
--- a/target/linux/ramips/dts/BR-6478AC-V2.dts
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -22,129 +22,6 @@
 			bootargs = "console=ttyS0,57600";
 	};
 
-	palmbus@10000000 {
-		gpio1: gpio@638 {
-			satus = "okay";
-		};
-		gpio2: gpio@660 {
-			status = "okay";
-		};
-			spi@b00 {
-			status = "okay";
-
-			m25p80@0 {
-				#address-cells = <1>;
-				#size-cells = <1>;
-				compatible = "jedec,spi-nor";
-				reg = <0 0>;
-				linux,modalias = "m25p80", "mx25l6405d";
-				spi-max-frequency = <10000000>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0 0x30000>;
-					read-only;
-				};
-
-				partition@30000 {
-					label = "u-boot-env";
-					reg = <0x30000 0x10000>;
-					read-only;
-				};
-
-				factory: partition@40000 {
-					label = "factory";
-					reg = <0x40000 0x10000>;
-					read-only;
-				};
-
-				partition@50000 {
-					label = "cimage";
-					reg = <0x50000 0x20000>;
-					read-only;
-				};
-
-				partition@70000 {
-	                                label = "firmware";
-	                                reg = <0x00070000 0x00790000>;
-				};
-			};
-		};
-	};
-
-	pinctrl {
-		state_default: pinctrl0 {
-			gpio {
-				ralink,group = "i2c", "uartf", "wdt", "pa", "ephy", "nd_sd", "wled";
-				ralink,function = "gpio";
-			};
-		};
-	};
-
-	usbphy: usbphy {
-		compatible = "mediatek,mt7620-usbphy";
-		#phy-cells = <1>;
-		//    resets = <&rstctrl 22 &rstctrl 25>;
-		resets = <&rstctrl 22 &rstctrl 19>;
-		reset-names = "host", "device";
-	};
-
-	ethernet@10100000 {
-		status = "okay";
-		mtd-mac-address = <&factory 0x4>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
-
-		port@5 {
-			status = "okay";
-			mediatek,fixed-link = <1000 1 1 1>;
-			phy-mode = "rgmii";
-		};
-
-		mdio-bus {
-			status = "okay";
-
-			phy0: ethernet-phy@0 {
-				reg = <0>;
-				phy-mode = "rgmii";
-			};
-
-			phy1: ethernet-phy@1 {
-				reg = <1>;
-				phy-mode = "rgmii";
-			};
-
-			phy2: ethernet-phy@2 {
-				reg = <2>;
-				phy-mode = "rgmii";
-			};
-
-			phy3: ethernet-phy@3 {
-				reg = <3>;
-				phy-mode = "rgmii";
-			};
-
-			phy4: ethernet-phy@4 {
-				reg = <4>;
-				phy-mode = "rgmii";
-			};
-
-			phy1f: ethernet-phy@1f {
-				reg = <0x1f>;
-				phy-mode = "rgmii";
-			};
-		};
-	};
-
-	gsw@10110000 {
-		mediatek,port4 = "gmac";
-		mediatek,mt7530 = <1>;
-	};
-
-	wmac@10180000 {
-		ralink,mtd-eeprom = <&factory 0>;
-	};
-
 	gpio-keys-polled {
 		compatible = "gpio-keys-polled";
 		#address-cells = <1>;
@@ -179,30 +56,141 @@
 		};
 	};
 
-	pcie@10140000 {
-		status = "okay";
-		pcie-bridge {
-			mt76@0,0 {
-				reg = <0x0000 0 0 0 0>;
-				device_type = "pci";
-				mediatek,mtd-eeprom = <&factory 0x8000>;
-				mediatek,2ghz = <0>;
-			};
+	usbphy: usbphy {
+		compatible = "mediatek,mt7620-usbphy";
+		#phy-cells = <1>;
+		resets = <&rstctrl 22 &rstctrl 25>;
+		reset-names = "host", "device";
+	};
+
+};
+
+&spi0 {
+	status = "okay";
+
+	m25p80@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0 0>;
+		linux,modalias = "m25p80", "mx25l6405d";
+		spi-max-frequency = <10000000>;
+
+		partition@0 {
+			label = "u-boot";
+			reg = <0x0 0x30000>;
+			read-only;
+		};
+
+		partition@30000 {
+			label = "u-boot-env";
+			reg = <0x30000 0x10000>;
+			read-only;
+		};
+
+		factory: partition@40000 {
+			label = "factory";
+			reg = <0x40000 0x10000>;
+			read-only;
 		};
 
+		partition@50000 {
+			label = "cimage";
+			reg = <0x50000 0x20000>;
+			read-only;
+		};
+
+		partition@70000 {
+			label = "firmware";
+			reg = <0x00070000 0x00790000>;
+		};
 	};
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		gpio {
+			ralink,group = "i2c", "uartf", "wdt", "pa", "ephy", "nd_sd", "wled";
+			ralink,function = "gpio";
+		};
+	};
+};
 
-	ehci@101c0000 {
+&ethernet{
+	status = "okay";
+	mtd-mac-address = <&factory 0x4>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+	mediatek,portmap = "wllll";
+
+	port@5 {
 		status = "okay";
-		interrupt-parent = <&intc>;
-		interrupts = <18>;
+		mediatek,fixed-link = <1000 1 1 1>;
+		phy-mode = "rgmii";
 	};
 
-	ohci@101c1000 {
+	mdio-bus {
 		status = "okay";
-		interrupt-parent = <&intc>;
-		interrupts = <18>;
+
+		phy0: ethernet-phy@0 {
+			reg = <0>;
+			phy-mode = "rgmii";
+		};
+
+		phy1: ethernet-phy@1 {
+			reg = <1>;
+			phy-mode = "rgmii";
+		};
+
+		phy2: ethernet-phy@2 {
+			reg = <2>;
+			phy-mode = "rgmii";
+		};
+
+		phy3: ethernet-phy@3 {
+			reg = <3>;
+			phy-mode = "rgmii";
+		};
+
+		phy4: ethernet-phy@4 {
+			reg = <4>;
+			phy-mode = "rgmii";
+		};
+
+		phy1f: ethernet-phy@1f {
+			reg = <0x1f>;
+			phy-mode = "rgmii";
+		};
 	};
 };
 
+&gsw {
+	mediatek,port4 = "gmac";
+	mediatek,mt7530 = <1>;
+};
 
+&wmac {
+	ralink,mtd-eeprom = <&factory 0>;
+};
+
+&pcie {
+	status = "okay";
+
+	pcie0 {
+		mt76@0,0 {
+			reg = <0x0000 0 0 0 0>;
+			device_type = "pci";
+			mediatek,mtd-eeprom = <&factory 0x8000>;
+			mediatek,2ghz = <0>;
+		};
+	};
+
+};
+
+&ehci {
+	status = "okay";
+};
+
+&ohci {
+	status = "okay";
+};