<div dir="ltr">Hi!<div><br><div>    I'm sorry for the crazy mistake in the previous patch.This time I've asked <span style="font-size:14px">Jason to test the firmware before giving me the patch.Everything works fine now :-)</span></div></div><div><span style="font-size:14px">I wonder if this patch could be accepted because I'm planning to send another patch for a new device and I don't know if the new patch should be based on the source with this patch applied or not.</span></div><div><span style="font-size:14px">    Best regards.</span></div><div><span style="font-size:14px">    Guo Chuanhong</span></div><div><span style="font-size:14px"><br></span></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-06 17:13 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">From: 盛凯 <<a href="mailto:shengkai81@gmail.com" target="_blank">shengkai81@gmail.com</a>><br>
<br>
Sorry,Sheng Kai told me that the flash layout is wrong in his previous patch-_-!!<br>
<br>
From: 盛凯 <<a href="mailto:shengkai81@gmail.com" target="_blank">shengkai81@gmail.com</a>><br>
<br>
v3:fix flash layout and change model name<br>
v2:fix space issues<br>
<br>
MicroWRT is an wireless router with 2 USB,1 ethernet port. It<br>
has a 16M flash and 64M DDR2 RAM. You can use most interface, such as<br>
i2c, SPI, i2s and PCIe. Besides that there are three expansion borad to<br>
combine with the core board. The detailed information, please refer to<br>
<a href="https://www.microduino.cc/wiki/index.php?title=Main_Page" target="_blank">https://www.microduino.cc/wiki/index.php?title=Main_Page</a><br>
<br>
This patch adds support for it.<br>
Because there is only one port,so disabled VLAN and use eth0 as lan<br>
port. and only a power LED control by power pin.<br>
Signed-off-by: 盛凯 <<a href="mailto:shengkai81@gmail.com" target="_blank">shengkai81@gmail.com</a>><br>
---<br>
 .../linux/ramips/base-files/etc/board.d/02_network |   1 +<br>
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +<br>
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 +<br>
 target/linux/ramips/dts/MicroWRT.dts               | 107 +++++++++++++++++++++<br>
 target/linux/ramips/image/Makefile                 |   3 +<br>
 target/linux/ramips/mt7620/profiles/<a href="http://microwrt.mk" target="_blank">microwrt.mk</a>    |   9 ++<br>
 6 files changed, 124 insertions(+)<br>
 create mode 100644 target/linux/ramips/dts/MicroWRT.dts<br>
 create mode 100644 target/linux/ramips/mt7620/profiles/<a href="http://microwrt.mk" target="_blank">microwrt.mk</a><br>
<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 d4ec19d..24e1ba8 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>
@@ -45,6 +45,7 @@ ramips_setup_interfaces()<br>
<br>
        3g150b | \<br>
        3g300m | \<br>
+       microwrt | \<br>
        w150m | \<br>
        zte-q7 | \<br>
        all0256n | \<br>
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh<br>
index fc6eb37..dffa832 100755<br>
--- a/target/linux/ramips/base-files/lib/ramips.sh<br>
+++ b/target/linux/ramips/base-files/lib/ramips.sh<br>
@@ -202,6 +202,9 @@ ramips_board_detect() {<br>
        *"Planex MZK-750DHP")<br>
                name="mzk-750dhp"<br>
                ;;<br>
+       *"Microduino MicroWRT")<br>
+               name="microwrt"<br>
+               ;;<br>
        *"NBG-419N")<br>
                name="nbg-419n"<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 a5773b5..17b456b 100755<br>
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>
@@ -60,6 +60,7 @@ platform_check_image() {<br>
        m2m | \<br>
        m3 | \<br>
        m4 | \<br>
+       microwrt | \<br>
        mlw221 | \<br>
        mlwg2 | \<br>
        mofi3500-3gn | \<br>
diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts<br>
new file mode 100644<br>
index 0000000..9500b14<br>
--- /dev/null<br>
+++ b/target/linux/ramips/dts/MicroWRT.dts<br>
@@ -0,0 +1,107 @@<br>
+/dts-v1/;<br>
+<br>
+/include/ "mt7620a.dtsi"<br>
+<br>
+/ {<br>
+       compatible = "microwrt", "ralink,mt7620a-soc";<br>
+       model = "Microduino MicroWRT";<br>
+<br>
+       chosen {<br>
+               bootargs = "console=ttyS0,115200";<br>
+       };<br>
+<br>
+       palmbus@10000000 {<br>
+               gpio2: gpio@660 {<br>
+                       status = "okay";<br>
+               };<br>
+<br>
+               gpio3: gpio@688 {<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 = "w25q128";<br>
+                               reg = <0 0>;<br>
+                               linux,modalias = "m25p80", "w25q128";<br>
+                               spi-max-frequency = <10000000>;<br>
+<br>
+                               partition@0 {<br>
+                                       label = "u-boot";<br>
+                                       reg = <0x0 0x20000>;<br>
+                                       read-only;<br>
+                               };<br>
+<br>
+                               partition@20000 {<br>
+                                       label = "u-boot-env";<br>
+                                       reg = <0x20000 0x10000>;<br>
+                                       read-only;<br>
+                               };<br>
+<br>
+                               factory: partition@30000 {<br>
+                                       label = "factory";<br>
+                                       reg = <0x30000 0x10000>;<br>
+                                       read-only;<br>
+                               };<br>
+<br>
+                               partition@40000 {<br>
+                                       label = "firmware";<br>
+                                       reg = <0x40000 0xfc0000>;<br>
+                               };<br>
+                       };<br>
+               };<br>
+       };<br>
+<br>
+       ehci@101c0000 {<br>
+               status = "okay";<br>
+       };<br>
+<br>
+       ohci@101c1000 {<br>
+               status = "okay";<br>
+       };<br>
+<br>
+       pcie@10140000 {<br>
+               status = "okay";<br>
+       };<br>
+<br>
+       ethernet@10100000 {<br>
+               pinctrl-names = "default";<br>
+               pinctrl-0 = <&ephy_pins>;<br>
+               mtd-mac-address = <&factory 0x4>;<br>
+               ralink,port-map = "llllw";<br>
+       };<br>
+<br>
+       wmac@10180000 {<br>
+               ralink,mtd-eeprom = <&factory 0>;<br>
+       };<br>
+<br>
+       pinctrl {<br>
+               state_default: pinctrl0 {<br>
+                       default {<br>
+                               ralink,group = "wled", "i2c", "wdt", "uartf";<br>
+                               ralink,function = "gpio";<br>
+                       };<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 = <&gpio0 1 1>;<br>
+                       linux,code = <0x198>;<br>
+               };<br>
+               wps {<br>
+                       label = "wps";<br>
+                       gpios = <&gpio0 2 1>;<br>
+                       linux,code = <0x211>;<br>
+               };<br>
+       };<br>
+   };<br>
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile<br>
index 743f7b4..e6b5112 100644<br>
--- a/target/linux/ramips/image/Makefile<br>
+++ b/target/linux/ramips/image/Makefile<br>
@@ -865,6 +865,8 @@ Image/Build/Profile/XIAOMI-MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1)<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>
+microwrt_mtd_size=16515072<br>
+Image/Build/Profile/MicroWRT=$(call BuildFirmware/CustomFlash/$(1),$(1),microwrt,MicroWRT,$(microwrt_mtd_size))<br>
<br>
<br>
 ifeq ($(SUBTARGET),mt7620)<br>
@@ -895,6 +897,7 @@ define Image/Build/Profile/Default<br>
        $(call Image/Build/Profile/ZTE-Q7,$(1))<br>
        $(call Image/Build/Profile/ZBT-WA05,$(1))<br>
        $(call Image/Build/Profile/ArcherC20i,$(1))<br>
+       $(call Image/Build/Profile/MicroWRT,$(1))<br>
 endef<br>
 endif<br>
<br>
diff --git a/target/linux/ramips/mt7620/profiles/<a href="http://microwrt.mk" target="_blank">microwrt.mk</a> b/target/linux/ramips/mt7620/profiles/<a href="http://microwrt.mk" target="_blank">microwrt.mk</a><br>
new file mode 100644<br>
index 0000000..38213ac<br>
--- /dev/null<br>
+++ b/target/linux/ramips/mt7620/profiles/<a href="http://microwrt.mk" target="_blank">microwrt.mk</a><br>
@@ -0,0 +1,9 @@<br>
+define Profile/MicroWRT<br>
+       NAME:=Microduino MicroWRT<br>
+       PACKAGES:= kmod-usb-core kmod-usb2 kmod-usb-ohci<br>
+endef<br>
+<br>
+define Profile/MicroWRT/Description<br>
+               Package set compatible with MicroWRT<br>
+endef<br>
+$(eval $(call Profile,MicroWRT))<br>
<span><font color="#888888">--<br>
2.1.0<br>
<br>
</font></span></blockquote></div><br></div></div>