<div dir="ltr">Sorry I forgot to edit the title.This is a router with MT7620a SoC so it belongs to ramips target.<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-31 19:38 GMT+08:00 郭传鈜 <span dir="ltr"><<a href="mailto:gch981213@gmail.com" target="_blank">gch981213@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ZTE Q7 is a wireless router with SD Card,USB,1 ethernet port and a battery.<br>
I can,t find any information about this router on ZTE's website.<br>
But I found this : <a href="http://en.cctairmobi.com/plus/list.php?tid=40" target="_blank">http://en.cctairmobi.com/plus/list.php?tid=40</a><br>
This router is the same as ZTE Q7 and later I found that both routers are made by the same company:-D<br>
<br>
This patch adds support for it.<br>
Because there is only one port,I disabled VLAN and use eth0 as lan port.<br>
I could only create a sysupgrade firmware because I don't know how the orignal webpage check the uploaded image:-(<br>
Signed-off-by: 郭传鈜 <<a href="mailto:gch981213@gmail.com">gch981213@gmail.com</a>><br>
<br>
---<br>
 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +<br>
 .../linux/ramips/base-files/etc/board.d/02_network |   1 +<br>
 target/linux/ramips/base-files/etc/diag.sh         |   3 +<br>
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +<br>
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 +<br>
 target/linux/ramips/dts/ZTE-Q7.dts                 | 111 +++++++++++++++++++++<br>
 target/linux/ramips/image/Makefile                 |   2 +<br>
 7 files changed, 124 insertions(+)<br>
 create mode 100644 target/linux/ramips/dts/ZTE-Q7.dts<br>
<br>
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds<br>
index bfe1c0c..56ba3b7 100755<br>
--- a/target/linux/ramips/base-files/etc/board.d/01_leds<br>
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds<br>
@@ -237,6 +237,9 @@ case $board in<br>
                set_usb_led "lenovo:blue:usb"<br>
                set_wifi_led "lenovo:blue:wifi"<br>
                ;;<br>
+       zte-q7)<br>
+               set_wifi_led "zte:blue:status"<br>
+               ;;<br>
 esac<br>
<br>
 board_config_flush<br>
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network<br>
index 89d1681..d4ec19d 100755<br>
--- a/target/linux/ramips/base-files/etc/board.d/02_network<br>
+++ b/target/linux/ramips/base-files/etc/board.d/02_network<br>
@@ -46,6 +46,7 @@ ramips_setup_interfaces()<br>
        3g150b | \<br>
        3g300m | \<br>
        w150m | \<br>
+       zte-q7 | \<br>
        all0256n | \<br>
        all5002 | \<br>
        all5003 | \<br>
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh<br>
index 50b6ff2..5301593 100644<br>
--- a/target/linux/ramips/base-files/etc/diag.sh<br>
+++ b/target/linux/ramips/base-files/etc/diag.sh<br>
@@ -224,6 +224,9 @@ get_status_led() {<br>
        y1s)<br>
                status_led="lenovo:blue:power"<br>
                ;;<br>
+       zte-q7)<br>
+               status_led="zte:red:status"<br>
+               ;;<br>
        esac<br>
 }<br>
<br>
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh<br>
index 4527414..fc6eb37 100755<br>
--- a/target/linux/ramips/base-files/lib/ramips.sh<br>
+++ b/target/linux/ramips/base-files/lib/ramips.sh<br>
@@ -379,6 +379,9 @@ ramips_board_detect() {<br>
        *"ZBT WR8305RT")<br>
                name="wr8305rt"<br>
                ;;<br>
+       *"ZTE Q7")<br>
+               name="zte-q7"<br>
+               ;;<br>
        *"Lenovo Y1")<br>
                name="y1"<br>
                ;;<br>
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>
index fffbe72..a5773b5 100755<br>
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>
@@ -114,6 +114,7 @@ platform_check_image() {<br>
        xiaomi-miwifi-mini |\<br>
        y1 |\<br>
        y1s |\<br>
+       zte-q7 |\<br>
        zbt-wa05)<br>
                [ "$magic" != "27051956" ] && {<br>
                        echo "Invalid image type."<br>
diff --git a/target/linux/ramips/dts/ZTE-Q7.dts b/target/linux/ramips/dts/ZTE-Q7.dts<br>
new file mode 100644<br>
index 0000000..9efc35e<br>
--- /dev/null<br>
+++ b/target/linux/ramips/dts/ZTE-Q7.dts<br>
@@ -0,0 +1,111 @@<br>
+/dts-v1/;<br>
+<br>
+/include/ "mt7620a.dtsi"<br>
+<br>
+/ {<br>
+       compatible = "ZTE-Q7", "ralink,mt7620a-soc";<br>
+       model = "ZTE Q7";<br>
+<br>
+       palmbus@10000000 {<br>
+<br>
+               gpio0: gpio@600 {<br>
+                       status = "okay";<br>
+               };<br>
+<br>
+               gpio1: gpio@638 {<br>
+                       status = "okay";<br>
+               };<br>
+<br>
+               spi@b00 {<br>
+                       status = "okay";<br>
+<br>
+                       m25p80@0 {<br>
+                               #address-cells = <1>;<br>
+                               #size-cells = <1>;<br>
+                               compatible = "en25q64";<br>
+                               reg = <0 0>;<br>
+                               linux,modalias = "m25p80", "en25q64";<br>
+                               spi-max-frequency = <10000000>;<br>
+<br>
+                               partition@0 {<br>
+                                       label = "u-boot";<br>
+                                       reg = <0x0 0x30000>;<br>
+                                       read-only;<br>
+                               };<br>
+<br>
+                               partition@30000 {<br>
+                                       label = "u-boot-env";<br>
+                                       reg = <0x30000 0x10000>;<br>
+                                       read-only;<br>
+                               };<br>
+<br>
+                               factory: partition@40000 {<br>
+                                       label = "factory";<br>
+                                       reg = <0x40000 0x10000>;<br>
+                                       read-only;<br>
+                               };<br>
+<br>
+                               partition@50000 {<br>
+                                       label = "firmware";<br>
+                                       reg = <0x50000 0x7b0000>;<br>
+                               };<br>
+                       };<br>
+               };<br>
+       };<br>
+<br>
+       pinctrl {<br>
+               state_default: pinctrl0 {<br>
+                       gpio {<br>
+                               ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";<br>
+                               ralink,function = "gpio";<br>
+                       };<br>
+               };<br>
+       };<br>
+<br>
+       ethernet@10100000 {<br>
+               pinctrl-names = "default";<br>
+               pinctrl-0 = <&ephy_pins>;<br>
+               mtd-mac-address = <&factory 0x4>;<br>
+               ralink,port-map = "wllll";<br>
+       };<br>
+<br>
+       wmac@10180000 {<br>
+               ralink,mtd-eeprom = <&factory 0>;<br>
+       };<br>
+<br>
+       sdhci@10130000 {<br>
+               status = "okay";<br>
+       };<br>
+<br>
+       ehci@101c0000 {<br>
+               status = "okay";<br>
+       };<br>
+<br>
+       ohci@101c1000 {<br>
+               status = "okay";<br>
+       };<br>
+<br>
+       gpio-leds {<br>
+               compatible = "gpio-leds";<br>
+               statred {<br>
+                       label = "zte:red:status";<br>
+                       gpios = <&gpio0 13 1>;<br>
+               };<br>
+               statblue {<br>
+                       label = "zte:blue:status";<br>
+                       gpios = <&gpio0 9 1>;<br>
+               };<br>
+       };<br>
+<br>
+       gpio-keys-polled {<br>
+               compatible = "gpio-keys-polled";<br>
+               #address-cells = <1>;<br>
+               #size-cells = <0>;<br>
+               poll-interval = <20>;<br>
+               reset {<br>
+                       label = "reset";<br>
+                       gpios = <&gpio1 2 1>;<br>
+                       linux,code = <0x198>;<br>
+               };<br>
+       };<br>
+};<br>
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile<br>
index 45ae3a5..bc1fe181 100644<br>
--- a/target/linux/ramips/image/Makefile<br>
+++ b/target/linux/ramips/image/Makefile<br>
@@ -862,6 +862,7 @@ Image/Build/Profile/WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),wr8305rt,W<br>
 Image/Build/Profile/WRTNODE=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode,WRTNODE)<br>
 Image/Build/Profile/WT3020=$(call BuildFirmware/PorayDualSize/$(1),$(1),wt3020,WT3020)<br>
 Image/Build/Profile/XIAOMI-MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1),xiaomi-miwifi-mini,XIAOMI-MIWIFI-MINI)<br>
+Image/Build/Profile/ZTE-Q7=$(call BuildFirmware/Default8M/$(1),$(1),zte-q7,ZTE-Q7)<br>
 Image/Build/Profile/ZBT-WA05=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wa05,ZBT-WA05)<br>
 Image/Build/Profile/ArcherC20i=$(call BuildFirmware/Tplink/$(1),$(1),ArcherC20i,ArcherC20i)<br>
<br>
@@ -891,6 +892,7 @@ define Image/Build/Profile/Default<br>
        $(call Image/Build/Profile/WRTNODE,$(1))<br>
        $(call Image/Build/Profile/WT3020,$(1))<br>
        $(call Image/Build/Profile/XIAOMI-MIWIFI-MINI,$(1))<br>
+       $(call Image/Build/Profile/ZTE-Q7,$(1))<br>
        $(call Image/Build/Profile/ZBT-WA05,$(1))<br>
        $(call Image/Build/Profile/ArcherC20i,$(1))<br>
 endef<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.0<br>
<br>
</font></span></blockquote></div><br></div>