diff mbox series

[OpenWrt-Devel] ath79: add WLAN, Ethernet-Switch with LAN/WAN and Status LED to Dorin

Message ID 20180605145648.82214-1-cc@80211.de
State Accepted
Delegated to: John Crispin
Headers show
Series [OpenWrt-Devel] ath79: add WLAN, Ethernet-Switch with LAN/WAN and Status LED to Dorin | expand

Commit Message

Catrinel Catrinescu June 5, 2018, 2:56 p.m. UTC
Signed-off-by: Catrinel Catrinescu <cc@80211.de>
---
 target/linux/ath79/base-files/etc/board.d/02_network     |  5 +++++
 target/linux/ath79/base-files/etc/diag.sh                |  3 +++
 target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts | 13 +++++++------
 3 files changed, 15 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
index a9eeb5b455..e6ef47240f 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -14,6 +14,11 @@  ath79_setup_interfaces()
 		ucidef_set_interface_lan "eth0"
 		;;
 
+	"embeddedwireless,dorin")
+		ucidef_add_switch "switch0" \
+			"0@eth0" "1:wan" "2:lan:3" "3:lan:2"
+		;;
+
 	"glinet,ar150")
 		ucidef_set_interfaces_lan_wan "eth1" "eth0"
 		;;
diff --git a/target/linux/ath79/base-files/etc/diag.sh b/target/linux/ath79/base-files/etc/diag.sh
index b18463413a..0a5011a7ae 100644
--- a/target/linux/ath79/base-files/etc/diag.sh
+++ b/target/linux/ath79/base-files/etc/diag.sh
@@ -12,6 +12,9 @@  get_status_led() {
 	"avm,fritz300e")
 		status_led="${boardname}:green:power"
 		;;
+	"embeddedwireless,dorin")
+		status_led="dorin:green:status"
+		;;
 	"glinet,ar150")
 		status_led="gl-ar150:orange:wlan"
 		;;
diff --git a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
index 4b204b7561..4c2e0ac8cb 100644
--- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
+++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
@@ -111,20 +111,21 @@ 
 	status = "okay";
 
 	mtd-mac-address = <&art 0x1002>;
+	mtd-mac-address-increment = <(0x40)>;	/* ToDo: mac[3] instead of mac[5] */
 
 	fixed-link {
 		speed = <1000>;
 		full-duplex;
 	};
 
-	gmac-config {
-		device = <&gmac>;
-
-		switch-phy-addr-swap = <1>;
-		switch-phy-swap = <1>;
-	};
 };
 
 &mdio1 {
 	status = "okay";
 };
+
+&wmac {
+	status = "okay";
+	mtd-cal-data = <&art 0x1000>;
+	mtd-mac-address = <&art 0x1002>;
+};