Excuse the delay, please find below the 2x patches to bring the LEDE git source up to date. I stuffed up committing only the DTS file first (first patch) then commited all the other files (2nd patch).
0001-add-new-target-for-Edimax-BR-6478AC-V2.patch
From f09df373db93030fddfdc7ae8ec437adc3310ea2 Mon Sep 17 00:00:00 2001
From: "R.Murch" <rohan.murch@gmail.com>
Date: Wed, 28 Sep 2016 09:46:34 +1000
Subject: [PATCH] add new target for Edimax BR-6478AC V2
---
target/linux/ramips/dts/BR-6478AC-V2.dts | 322 +++++++++++++++++++++++++++++++
1 file changed, 322 insertions(+)
create mode 100644 target/linux/ramips/dts/BR-6478AC-V2.dts
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..db5cc42
--- /dev/null
+++ b/target/linux/ramips/dts/BR-6478AC-V2.dts
@@ -0,0 +1,322 @@
+/*
+ * 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 = "edimax,br-6478ac-v2", "ralink,mt7620a-soc";
+ model = "Edimax BR-6478ACV2";
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ palmbus@10000000 {
+ gpio1: gpio@638 {
+ status = "okay";
+ };
+ gpio2: gpio@660 {
+ status = "okay";
+ };
+ // enable-gpios = <&gpio0 19>;
+
+ // i2c: i2c@900 {
+ // 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 = "kernel";
+ reg = <0x70000 0x140000>;
+ };
+ partition@1B0000 {
+ label = "rootfs";
+ reg = <0x1B0000 0x650000>;
+ };
+ partition2@70000 {
+ label = "firmware";
+ reg = <0x70000 0x790000>;
+ };
+
+ };
+ };
+
+ uartlite@c00 {
+ status = "okay";
+ compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a"; // palmchip bk-3103
+ reg = <0xc00 0x100>;
+ resets = <&rstctrl 19>;
+ reset-names = "uartl";
+ interrupt-parent = <&intc>;
+ interrupts = <12>;
+ reg-shift = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&uartlite_pins>;
+ };
+
+ };
+
+
+ pinctrl {
+ state_default: pinctrl0 {
+ // enable-gpios = <&gpio0 19>;
+ gpio {
+ ralink,group = "i2c", "uartf";
+ // ralink,group = "i2c", "uartf", "gpio";
+ /// ralink,group = "i2c", "uartf", "pa";
+ // ralink,group = "uartf", "pa";
+ ralink,function = "gpio";
+ };
+ /// i2c {
+ /// ralink,group = "i2c";
+ /// ralink,function = "i2c";
+ /// };
+ // pa {
+ // ralink,group = "pa";
+ // ralink,function = "pa";
+ // };
+ };
+ };
+
+
+ usbphy: usbphy {
+ compatible = "mediatek,mt7620-usbphy";
+ // compatible = "ralink,mt7620a-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>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+ mediatek,portmap = "wllll";
+
+ 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>;
+ //// ralink,eeprom = "soc_wmac.eeprom";
+ // ralink,eeprom = "rt2x00pci_1_0.eeprom";
+ };
+
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 12 1>;
+ // linux,code = <0x198>;
+ linux,code = <0x101>;
+ };
+ // wps {
+ // label = "wps";
+ // gpios = <&gpio0 1 1>;
+ // // linux,code = <0x211>;
+ // linux,code = <0x100>;
+ // };
+
+ };
+
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ power {
+ label = "br-6478ac-v2:white:power";
+ gpios = <&gpio0 11 1>; // edimax wps
+ };
+ wan {
+ label = "br-6478ac-v2:blue:wan";
+ gpios = <&gpio0 7 1>; // edimax power
+ };
+ wlan {
+ label = "br-6478ac-v2:blue:wlan";
+ gpios = <&gpio0 10 1>; // edimax wireless_aband
+ };
+ usb {
+ label = "br-6478ac-v2:blue:usb";
+ gpios = <&gpio0 14 1>; // edimax wireless_gband
+ };
+ //wifi { // unused smd led pad on pcb
+ // label = "br-6478ac-v2:blue:wifi";
+ // gpios = <&gpio1 1 1>; // edimax wireless, gpio25
+ //};
+
+ };
+
+
+ pcie@10140000 {
+ status = "okay";
+ pcie-bridge {
+ // reg = <0x0000 0 0 0 0>;
+ // #address-cells = <3>;
+ // #size-cells = <2>;
+ // device_type = "pci";
+ status = "okay";
+ // wmac@0,0 { // strange mac: 9c:99:35:9b:b1:be not 74:da:38:68:45:c7
+ // ralink,5ghz = <0>;
+ // compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604";
+ // reg = < 0x10000 0 0 0 0 >;
+ // ralink,eeprom = "rt2x00pci_1_0.eeprom";
+ // };
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ device_type = "pci";
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ mediatek,2ghz = <0>;
+ };
+ };
+ };
+
+ ehci@101c0000 {
+ status = "okay";
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+ };
+
+ ohci@101c1000 {
+ status = "okay";
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+ };
+
+ /* Unclear if this is the correct gpio setup; the USB ports are
+ unpopulated on a stock BR-6475nD, even though the hardware exists
+ and the headers are there. */
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+ enable-gpios = <&gpio0 19>;
+/*
+ // pa_pe/pa pins 18,19,20,21
+ gpio18 {
+ gpio-export,name="gpio18";
+ gpio-export,output=<0>;
+ gpios = <&gpio0 18 0>;
+ };
+ usb {
+ gpio-export,name="usb";
+ gpio-export,output=<0>;
+ gpios = <&gpio0 19 0>;
+ };
+ gpio20 {
+ gpio-export,name="gpio20";
+ gpio-export,output=<0>;
+ gpios = <&gpio0 20 0>;
+ };
+ gpio21 {
+ gpio-export,name="gpio21";
+ gpio-export,output=<0>;
+ gpios = <&gpio0 21 0>;
+ };
+*/
+/*
+ gpio0 {
+ gpio-export,name="gpio0";
+ gpio-export,output=<0>;
+ gpios = <&gpio0 0 0>;
+ };
+ gpio1 {
+ gpio-export,name="gpio1";
+ gpio-export,output=<0>;
+ gpios = <&gpio0 1 0>;
+ };
+ gpio2 {
+ gpio-export,name="gpio2";
+ gpio-export,output=<0>;
+ gpios = <&gpio0 2 0>;
+ };
+*/
+
+ };
+
+};
+
--
1.8.3.1
0001-add-new-target-for-Edimax-Br-6478ac_v2-2-2.patch
From 0bbb7e59f245e6d88cf7c5a06758374ed82a7e4a Mon Sep 17 00:00:00 2001
From: "R.Murch" <rohan.murch@gmail.com>
Date: Wed, 28 Sep 2016 09:50:01 +1000
Subject: [PATCH] add new target for Edimax Br-6478ac_v2 2/2
---
target/linux/ramips/base-files/etc/board.d/01_leds | 6 ++++++
target/linux/ramips/base-files/etc/board.d/02_network | 15 +++++++++++++++
target/linux/ramips/base-files/etc/diag.sh | 3 +++
target/linux/ramips/base-files/lib/ramips.sh | 3 +++
target/linux/ramips/image/mt7620.mk | 8 ++++++++
5 files changed, 35 insertions(+)
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 97c405d..0e693a1 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 675dcc9..137644d 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -157,10 +157,18 @@ ramips_setup_interfaces()
wr6202)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
;;
+ br-6478ac-v2|\
br-6475nd)
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" \
@@ -284,6 +292,13 @@ 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|\
dch-m225)
lan_mac=$(mtd_get_mac_ascii factory lanmac)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 969594d..419775a 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -35,6 +35,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/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 98bc68c..b2ab445 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"
;;
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 003fc70..6cab316 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -404,3 +404,11 @@ define Device/dch-m225
DEVICE_PACKAGES := kmod-mt76
endef
TARGET_DEVICES += dch-m225
+
+define Device/br-6478ac-v2
+ DTS := BR-6478AC-V2
+ IMAGE_SIZE := $(ralink_default_fw_size_8M)
+ DEVICE_TITLE := Edimax BR-6478-AC V2
+ DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
+endef
+TARGET_DEVICES += br-6478ac-v2
--
1.8.3.1
Please excuse some commented out sections in the DTS, I have recently discovered the "PA" group of gpio (18,19,20,21) which seem to control the antenna selection and rf power amplifiers. Still testing that and GPIO's to find something to power up the usb port. i2c port does not seem to be used, so am also testing gpio1 and gpio2 to see if connnected to anything on the pcb.
Can confirm the mt7612e is now working in AP/Master mode ok, although at 40mhz bandwidth not 80mhz.