<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>hi Maintainer and All,</div><div><br></div><div>We are an open source hardware team come from china, and we developed an open source route board using MT7620A soc. In order to support this new board officially, we plan to sumbit the special code for our prodcut to openwrt branch.</div><div><br></div><div>This is the first time to summbit code, maybe there is some error although read the wiki carefully, appreciat your commants. Thanks in advance.</div><div><br></div><div>The following is the detailed information for this path. Beside that, I attached the patch file in mail although the wiki doesn't suggest using this way.</div><div>I use the Git to clone the latest code and do change on it. All the code has been tested carefully.</div><div><br></div><div><b>Patch Information:</b></div><div>This patch used to support new route board "MicroWRT". It's an open source hardware and use the MT7620a SOC. It has a 16M flash and 64M 16bit DDR2 RAM. You can use most interface, such as i2c, SPI, i2s and PCIe. Besides that there are three expansion borad to combine with the core board. For detailed infomation, you can refer to our webpage: https://www.microduino.cc/wiki/index.php?title=Main_Page</div><div><br></div><div>In this path, changed one existing file "/target/linux/ramips/image/Makefile" which used to define the microWRT build.</div><div><br></div><div>Two new file are introduced.</div><div>/target/linux/ramips/dts/MicroWRT.dts. This is the dts file for board "MicroWRT"</div><div>/target/linux/ramips/mt7620/profiles/microwrt.mk. This is the file to define the profile, then you can choose microwrt in "Target profile" configuartion.</div><div><br></div><div><br></div><div><b>Patch Code:</b></div><div><b>changed file</b></div><div>===================================</div><div>diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile</div><div>index 743f7b4..ce0733d 100644</div><div>--- a/target/linux/ramips/image/Makefile</div><div>+++ b/target/linux/ramips/image/Makefile</div><div>@@ -865,7 +865,7 @@ Image/Build/Profile/XIAOMI-MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1)</div><div> Image/Build/Profile/ZTE-Q7=$(call BuildFirmware/Default8M/$(1),$(1),zte-q7,ZTE-Q7)</div><div> Image/Build/Profile/ZBT-WA05=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wa05,ZBT-WA05)</div><div> Image/Build/Profile/ArcherC20i=$(call BuildFirmware/Tplink/$(1),$(1),ArcherC20i,ArcherC20i)</div><div>-</div><div>+Image/Build/Profile/MicroWRT=$(call BuildFirmware/Default16M/$(1),$(1),microwrt,MicroWRT)</div><div> </div><div> ifeq ($(SUBTARGET),mt7620)</div><div> define Image/Build/Profile/Default</div><div>@@ -895,6 +895,7 @@ define Image/Build/Profile/Default</div><div>        $(call Image/Build/Profile/ZTE-Q7,$(1))</div><div>        $(call Image/Build/Profile/ZBT-WA05,$(1))</div><div>        $(call Image/Build/Profile/ArcherC20i,$(1))</div><div>+       $(call Image/Build/Profile/MicroWRT,$(1))</div><div> endef</div><div> endif</div><div><br></div><div><b>New file /target/linux/ramips/dts/MicroWRT.dts</b></div><div>===================================================</div><div>+/dts-v1/;</div><div><br></div><div>+/include/ "mt7620a.dtsi"</div><div><br></div><div>+/ {</div><div>+        compatible = "microwrt", "ralink,mt7620a-soc";</div><div>+        model = "MicroWRT";</div><div>+</div><div>+        palmbus@10000000 {</div><div>+                gpio0: gpio@600 {</div><div>+                        status = "okay";</div><div>+                };</div><div>+                gpio1: gpio@638 {</div><div>+                        status = "okay";</div><div>+                };</div><div>+                gpio2: gpio@660 {</div><div>+                        status = "okay";</div><div>+                };</div><div>+                gpio3: gpio@688 {</div><div>+                        status = "okay";</div><div>+                };</div><div>+</div><div>+                spi@b00 {</div><div>+                        status = "okay";</div><div>+</div><div>+                        m25p80@0 {</div><div>+                                #address-cells = <1>;</div><div>+                                #size-cells = <1>;</div><div>+                                compatible = "mx25l12805d";</div><div>+                                reg = <0 0>;</div><div>+                                linux,modalias = "m25p80", "w25q128";</div><div>+                                spi-max-frequency = <10000000>;</div><div>+</div><div>+                                partition@0 {</div><div>+                                        label = "u-boot";</div><div>+                                        reg = <0x0 0x20000>;</div><div>+                                        read-only;</div><div>+                                };</div><div>+</div><div>+                                partition@20000 {</div><div>+                                        label = "u-boot-env";</div><div>+                                        reg = <0x20000 0x10000>;</div><div>+                                        read-only;</div><div>+                                };</div><div>+</div><div>+                                factory: partition@30000 {</div><div>+                                        label = "factory";</div><div>+                                        reg = <0x30000 0x10000>;</div><div>+                                        read-only;</div><div>+                                };</div><div>+</div><div>+                                partition@40000 {</div><div>+                                        label = "firmware";</div><div>+                                        reg = <0x40000 0xfb0000>;</div><div>+                                };</div><div>+                        };</div><div>+                };</div><div>+        };</div><div>+</div><div>+        pinctrl {</div><div>+                state_default: pinctrl0 {</div><div>+                        default {</div><div>+                                ralink,group = "i2c", "spi refclk", "rgmii1";</div><div>+                                ralink,function = "gpio";</div><div>+                        };</div><div>+                };</div><div>+        };</div><div>+</div><div>+        ehci@101c0000 {</div><div>+                status = "okay";</div><div>+        };</div><div>+</div><div>+        ohci@101c1000 {</div><div>+                status = "okay";</div><div>+        };</div><div>+</div><div>+        ethernet@10100000 {</div><div>+                pinctrl-names = "default";</div><div>+                pinctrl-0 = <&ephy_pins>;</div><div>+</div><div>+                mtd-mac-address = <&factory 0x4>;</div><div>+                ralink,port-map = "llllw";</div><div>+        };</div><div>+</div><div>+        gsw@10110000 {</div><div>+                ralink,port4 = "ephy";</div><div>+        };</div><div>+</div><div>+        wmac@10180000 {</div><div>+                ralink,mtd-eeprom = <&factory 0>;</div><div>+        };</div><div>+</div><div>+        pcie@10140000 {</div><div>+                status = "okay";</div><div>+        };</div><div>+</div><div>+        gpio-keys-polled {</div><div>+                compatible = "gpio-keys-polled";</div><div>+                #address-cells = <1>;</div><div>+                #size-cells = <0>;</div><div>+                poll-interval = <20>;</div><div>+                s1 {</div><div>+                        label = "reset";</div><div>+                        gpios = <&gpio0 1 1>;</div><div>+                        linux,code = <0x198>;</div><div>+                };</div><div>+                s2 {</div><div>+                        label = "wps";</div><div>+                        gpios = <&gpio0 2 1>;</div><div>+                        linux,code = <0x211>;</div><div>+                };</div><div>+        };</div><div>+};</div><div><br></div><div><b>New file  /target/linux/ramips/mt7620/profiles/microwrt.mk</b></div><div>=============================================================</div><div>+   define Profile/MicroWRT</div><div>+       NAME:=MicroWRT</div><div>+       PACKAGES:=\</div><div>+           kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci \</div><div>+           kmod-mt76</div><div>+   endef</div><div>+</div><div>+   define Profile/MicroWRT/Description</div><div>+       Support for MicroWRT</div><div>+   endef</div><div>+   $(eval $(call Profile,MicroWRT))</div><div><br></div><div>Appreciate your responsed!</div><div><br></div><div>Thanks,</div><div>Jason</div><div><br></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>