[OpenWrt-Devel] [PATCH v2 02/25] ramips: fix Zbtlink ZBT-WR8305RT board name

Piotr Dymacz pepe2k at gmail.com
Wed Aug 5 14:30:03 EDT 2015


There is another Zbtlink board (ZBT-WA05) supported in ramips target, so use the same naming scheme for ZBT-WR8305RT board and its dts file.

Signed-off-by: Piotr Dymacz <pepe2k at gmail.com>
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   8 +-
 .../linux/ramips/base-files/etc/board.d/02_network |   2 +-
 target/linux/ramips/base-files/etc/diag.sh         |   4 +-
 target/linux/ramips/base-files/lib/ramips.sh       |   4 +-
 .../ramips/base-files/lib/upgrade/platform.sh      |   2 +-
 target/linux/ramips/dts/WR8305RT.dts               | 117 ---------------------
 target/linux/ramips/dts/ZBT-WR8305RT.dts           | 117 +++++++++++++++++++++
 target/linux/ramips/image/Makefile                 |   4 +-
 8 files changed, 129 insertions(+), 129 deletions(-)
 delete mode 100644 target/linux/ramips/dts/WR8305RT.dts
 create mode 100644 target/linux/ramips/dts/ZBT-WR8305RT.dts

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 c6bfd7e..bb990c9 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -245,10 +245,10 @@ case $board in
 		ucidef_set_led_default "power" "power" "oy:green:power" "1"
 		set_wifi_led "oy:green:wifi"
 		;;
-	wr8305rt)
-		ucidef_set_led_default "power" "power" "wr8305rt:sys" "1"
-		set_usb_led "wr8305rt:usb"
-		set_wifi_led "wr8305rt:wifi"
+	zbt-wr8305rt)
+		ucidef_set_led_default "power" "power" "zbt-wr8305rt:sys" "1"
+		set_usb_led "zbt-wr8305rt:usb"
+		set_wifi_led "zbt-wr8305rt:wifi"
 		;;
 	wt1520)
 		set_wifi_led "rt2800pci-phy0::radio"
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 da1854a..42447d4 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -228,7 +228,7 @@ ramips_setup_interfaces()
 		ucidef_add_switch_vlan "switch0" "2" "6t"
 		;;
 
-	wr8305rt)
+	zbt-wr8305rt)
 		ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
 		ucidef_add_switch "switch0" "1" "1"
 		ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4 6t"
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index e63f0df..019bbbb 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -196,8 +196,8 @@ get_status_led() {
 	wr512-3gn)
 		status_led="wr512:green:wps"
 		;;
-	wr8305rt)
-		status_led="wr8305rt:sys"
+	zbt-wr8305rt)
+		status_led="zbt-wr8305rt:sys"
 		;;
 	whr-300hp2 | \
 	whr-600d | \
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 7db6d37..436ed09 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -406,8 +406,8 @@ ramips_board_detect() {
 	*"OY-0001")
 		name="oy-0001"
 		;;
-	*"ZBT WR8305RT")
-		name="wr8305rt"
+	*"Zbtlink ZBT-WR8305RT")
+		name="zbt-wr8305rt"
 		;;
 	*"ZTE Q7")
 		name="zte-q7"
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 8221997..1021123 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -116,7 +116,7 @@ platform_check_image() {
 	wnce2001 | \
 	wr512-3gn |\
 	wr6202 |\
-	wr8305rt |\
+	zbt-wr8305rt |\
 	wrtnode |\
 	oy-0001 |\
 	wt1520 |\
diff --git a/target/linux/ramips/dts/WR8305RT.dts b/target/linux/ramips/dts/WR8305RT.dts
deleted file mode 100644
index 1f3c345..0000000
--- a/target/linux/ramips/dts/WR8305RT.dts
+++ /dev/null
@@ -1,117 +0,0 @@
-/dts-v1/;
-
-/include/ "mt7620n.dtsi"
-
-/ {
-	compatible = "wr8305rt", "ralink,mt7620n-soc";
-	model = "ZBT WR8305RT";
-
-	palmbus at 10000000 {
-		gpio1: gpio at 638 {
-			status = "okay";
-		};
-
-		gpio3: gpio at 688 {
-			status = "okay";
-		};
-
-		spi at b00 {
-			status = "okay";
-
-			m25p80 at 0 {
-				#address-cells = <1>;
-				#size-cells = <1>;
-				compatible = "mx25l6405d";
-				reg = <0 0>;
-				linux,modalias = "m25p80", "en25q64";
-				spi-max-frequency = <10000000>;
-
-				partition at 0 {
-					label = "u-boot";
-					reg = <0x0 0x30000>;
-					read-only;
-				};
-
-				partition at 30000 {
-					label = "u-boot-env";
-					reg = <0x30000 0x10000>;
-					read-only;
-				};
-
-				factory: partition at 40000 {
-					label = "factory";
-					reg = <0x40000 0x10000>;
-					read-only;
-				};
-
-				partition at 50000 {
-					label = "firmware";
-					reg = <0x50000 0x7b0000>;
-				};
-			};
-		};
-	};
-
-	ehci at 101c0000 {
-		status = "okay";
-	};
-
-	ohci at 101c1000 {
-		status = "okay";
-	};
-
-	ethernet at 10100000 {
-		mtd-mac-address = <&factory 0x4>;
-		ralink,port-map = "llllw";
-	};
-
-	wmac at 10180000 {
-		ralink,mtd-eeprom = <&factory 0>;
-	};
-
-	pinctrl {
-		state_default: pinctrl0 {
-			ephy {
-				ralink,group = "ephy";
-				ralink,function = "ephy";
-			};
-
-			default {
-				ralink,group = "i2c", "uartf", "spi refclk", "wled";
-				ralink,function = "gpio";
-			};
-		};
-	};
-
-	gpio-leds {
-		compatible = "gpio-leds";
-
-		sys {
-			label = "wr8305rt:sys";
-			gpios = <&gpio1 14 1>;
-		};
-
-		lan {
-			label = "wr8305rt:usb";
-			gpios = <&gpio1 15 1>;
-		};
-
-		wifi {
-			label = "wr8305rt:wifi";
-			gpios = <&gpio3 0 1>;
-		};
-	};
-
-	gpio-keys-polled {
-		compatible = "gpio-keys-polled";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		poll-interval = <20>;
-
-		reset {
-			label = "reset";
-			gpios = <&gpio0 1 1>;
-			linux,code = <0x198>;
-		};
-	};
-};
diff --git a/target/linux/ramips/dts/ZBT-WR8305RT.dts b/target/linux/ramips/dts/ZBT-WR8305RT.dts
new file mode 100644
index 0000000..8c56c15
--- /dev/null
+++ b/target/linux/ramips/dts/ZBT-WR8305RT.dts
@@ -0,0 +1,117 @@
+/dts-v1/;
+
+/include/ "mt7620n.dtsi"
+
+/ {
+	compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc";
+	model = "Zbtlink ZBT-WR8305RT";
+
+	palmbus at 10000000 {
+		gpio1: gpio at 638 {
+			status = "okay";
+		};
+
+		gpio3: gpio at 688 {
+			status = "okay";
+		};
+
+		spi at b00 {
+			status = "okay";
+
+			m25p80 at 0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "mx25l6405d";
+				reg = <0 0>;
+				linux,modalias = "m25p80", "en25q64";
+				spi-max-frequency = <10000000>;
+
+				partition at 0 {
+					label = "u-boot";
+					reg = <0x0 0x30000>;
+					read-only;
+				};
+
+				partition at 30000 {
+					label = "u-boot-env";
+					reg = <0x30000 0x10000>;
+					read-only;
+				};
+
+				factory: partition at 40000 {
+					label = "factory";
+					reg = <0x40000 0x10000>;
+					read-only;
+				};
+
+				partition at 50000 {
+					label = "firmware";
+					reg = <0x50000 0x7b0000>;
+				};
+			};
+		};
+	};
+
+	ehci at 101c0000 {
+		status = "okay";
+	};
+
+	ohci at 101c1000 {
+		status = "okay";
+	};
+
+	ethernet at 10100000 {
+		mtd-mac-address = <&factory 0x4>;
+		ralink,port-map = "llllw";
+	};
+
+	wmac at 10180000 {
+		ralink,mtd-eeprom = <&factory 0>;
+	};
+
+	pinctrl {
+		state_default: pinctrl0 {
+			ephy {
+				ralink,group = "ephy";
+				ralink,function = "ephy";
+			};
+
+			default {
+				ralink,group = "i2c", "uartf", "spi refclk", "wled";
+				ralink,function = "gpio";
+			};
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		sys {
+			label = "zbt-wr8305rt:sys";
+			gpios = <&gpio1 14 1>;
+		};
+
+		lan {
+			label = "zbt-wr8305rt:usb";
+			gpios = <&gpio1 15 1>;
+		};
+
+		wifi {
+			label = "zbt-wr8305rt:wifi";
+			gpios = <&gpio3 0 1>;
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 1 1>;
+			linux,code = <0x198>;
+		};
+	};
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 409ff26..6071ae7 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -876,12 +876,12 @@ Image/Build/Profile/MLW221=$(call BuildFirmware/Default16M/$(1),$(1),mlw221,MLW2
 Image/Build/Profile/MLWG2=$(call BuildFirmware/Default16M/$(1),$(1),mlwg2,MLWG2)
 Image/Build/Profile/WMR300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR300)
 Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U)
-Image/Build/Profile/WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),wr8305rt,WR8305RT)
 Image/Build/Profile/WRTNODE=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode,WRTNODE)
 Image/Build/Profile/WT3020=$(call BuildFirmware/PorayDualSize/$(1),$(1),wt3020,WT3020)
 Image/Build/Profile/XIAOMI-MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1),xiaomi-miwifi-mini,XIAOMI-MIWIFI-MINI)
 Image/Build/Profile/ZTE-Q7=$(call BuildFirmware/Default8M/$(1),$(1),zte-q7,ZTE-Q7)
 Image/Build/Profile/ZBT-WA05=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wa05,ZBT-WA05)
+Image/Build/Profile/ZBT-WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wr8305rt,ZBT-WR8305RT)
 Image/Build/Profile/ArcherC20i=$(call BuildFirmware/Tplink/$(1),$(1),ArcherC20i,ArcherC20i)
 microwrt_mtd_size=16515072
 Image/Build/Profile/MicroWRT=$(call BuildFirmware/CustomFlash/$(1),$(1),microwrt,MicroWRT,$(microwrt_mtd_size))
@@ -910,12 +910,12 @@ define Image/Build/Profile/Default
 	$(call Image/Build/Profile/MLWG2,$(1))
 	$(call Image/Build/Profile/WMR300,$(1))
 	$(call Image/Build/Profile/RT-N14U,$(1))
-	$(call Image/Build/Profile/WR8305RT,$(1))
 	$(call Image/Build/Profile/WRTNODE,$(1))
 	$(call Image/Build/Profile/WT3020,$(1))
 	$(call Image/Build/Profile/XIAOMI-MIWIFI-MINI,$(1))
 	$(call Image/Build/Profile/ZTE-Q7,$(1))
 	$(call Image/Build/Profile/ZBT-WA05,$(1))
+	$(call Image/Build/Profile/ZBT-WR8305RT,$(1))
 	$(call Image/Build/Profile/ArcherC20i,$(1))
 	$(call Image/Build/Profile/MicroWRT,$(1))
 endef
-- 
2.4.6
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list