<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br>From: Tom Deng <2579131212@qq.com><br> <br>Adding support for OY-0001 Wireless Router.<br>OY-0001 is a wireless router made by oyewifi.com. Below is the details:<br>MT7620A, 128MB DDR2, 16MB FLASH, SD Slot, USB 2.0, 4 x LAN + 1 x WAN.<br>Signed-off-by: Tom Deng <2579131212@qq.com><br>---<br>diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh<br>index 74b8867..35a64dd 100755<br>--- a/target/linux/ramips/base-files/etc/diag.sh<br>+++ b/target/linux/ramips/base-files/etc/diag.sh<br>@@ -186,6 +186,9 @@ get_status_led() {<br>     f7c027)<br>         status_led="belkin:orange:status"<br>         ;;<br>+    oy-0001)<br>+        status_led="oy:green:wifi"<br>+        ;;<br>     na930)<br>         status_led="na930:blue:power"<br>         ;;<br>diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds b/target/linux/ramips/base-files/etc/uci-defaults/01_leds<br>index 5d6ed2b..265525a 100755<br>--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds<br>+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds<br>@@ -199,6 +199,10 @@ case $board in<br>         set_wifi_led "zbtlink:blue:air"<br>         set_usb_led "zbtlink:blue:usb"<br>         ;;<br>+    oy-0001)<br>+        ucidef_set_led_default "power" "power" "oy:green:power" "1"<br>+        set_wifi_led "oy:green:wifi"<br>+        ;;<br>     wr8305rt)<br>         ucidef_set_led_default "power" "power" "wr8305rt:sys" "1"<br>         set_usb_led "wr8305rt:usb"<br>diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network<br>index c3ea489..b847a1b 100755<br>--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network<br>+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network<br>@@ -104,6 +104,7 @@ ramips_setup_interfaces()<br>     dir-615-h1 | \<br>     hlk-rm04 | \<br>     mzk-w300nh2 | \<br>+    oy-0001 | \<br>     mzk-750dhp)<br>         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"<br>         ucidef_add_switch "switch0" "1" "1"<br>@@ -221,6 +222,11 @@ ramips_setup_macs()<br>         wan_mac=$(mtd_get_mac_binary devdata 7)<br>         ;;<br> <br>+    oy-0001)<br>+        lan_mac=$(mtd_get_mac_binary factory 40)<br>+        wan_mac=$(mtd_get_mac_binary factory 46)<br>+        ;;<br>+<br>     w306r-v20)<br>         lan_mac=$(cat /sys/class/net/eth0/address)<br>         wan_mac=$(macaddr_add "$lan_mac" 5)<br>diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh<br>index fd03423..f95adc5 100755<br>--- a/target/linux/ramips/base-files/lib/ramips.sh<br>+++ b/target/linux/ramips/base-files/lib/ramips.sh<br>@@ -325,6 +325,9 @@ ramips_board_detect() {<br>     *"Zbtlink ZBT-WA05")<br>         name="zbt-wa05"<br>         ;;<br>+    *"OY-0001")<br>+        name="oy-0001"<br>+        ;;<br>     *"ZBT WR8305RT")<br>         name="wr8305rt"<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 ba69a89..ad35f9d 100755<br>--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>@@ -96,6 +96,7 @@ platform_check_image() {<br>     wmr300 |\<br>     wr8305rt |\<br>     wrtnode |\<br>+    oy-0001 |\<br>     x5 |\<br>     x8 |\<br>     zbt-wa05 |\<br>diff --git a/target/linux/ramips/dts/OY-0001.dts b/target/linux/ramips/dts/OY-0001.dts<br>new file mode 100644<br>index 0000000..48b7099<br>--- /dev/null<br>+++ b/target/linux/ramips/dts/OY-0001.dts<br>@@ -0,0 +1,123 @@<br>+/dts-v1/;<br>+<br>+/include/ "mt7620a.dtsi"<br>+<br>+/ {<br>+    compatible = "ralink,mt7620a-soc";<br>+    model = "OY-0001";<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 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 0xfb0000>;<br>+                };<br>+<br>+            };<br>+        };<br>+    };<br>+<br>+    pinctrl {<br>+        state_default: pinctrl0 {<br>+            gpio {<br>+                ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";<br>+                ralink,function = "gpio";<br>+            };<br>+        };<br>+    };<br>+<br>+    ethernet@10100000 {<br>+        pinctrl-names = "default";<br>+        pinctrl-0 = <&ephy_pins>;<br>+<br>+        ralink,port-map = "llllw";<br>+    };<br>+<br>+    gsw@10110000 {<br>+        ralink,port4 = "ephy";<br>+    };<br>+<br>+    wmac@10180000 {<br>+        ralink,mtd-eeprom = <&factory 0>;<br>+    };<br>+<br>+    gpio-leds {<br>+        compatible = "gpio-leds";<br>+        powerled {<br>+            label = "oy:green:power";<br>+            gpios = <&gpio0 9 1>;<br>+        };<br>+        wifiled {<br>+            label = "oy:green:wifi";<br>+            gpios = <&gpio3 0 1>;<br>+        };<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>+    pcie@10140000 {<br>+        status = "okay";<br>+    };<br>+<br>+    gpio-keys-polled {<br>+        compatible = "gpio-keys-polled";<br>+        #address-cells = <1>;<br>+        #size-cells = <0>;<br>+        poll-interval = <20>;<br>+        s1 {<br>+            label = "reset";<br>+            gpios = <&gpio0 1 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 86200ab..73ad961 100644<br>--- a/target/linux/ramips/image/Makefile<br>+++ b/target/linux/ramips/image/Makefile<br>@@ -724,6 +724,7 @@ Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l<br> na930_mtd_size=20971520<br> Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size))<br> Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP)<br>+Image/Build/Profile/OY-0001=$(call BuildFirmware/Default16M/$(1),$(1),oy-0001,OY-0001)<br> Image/Build/Profile/Y1=$(call BuildFirmware/Default16M/$(1),$(1),Lenovo-y1,Y1)<br> Image/Build/Profile/Y1S=$(call BuildFirmware/Default16M/$(1),$(1),Lenovo-y1s,Y1S)<br> <br>@@ -740,6 +741,7 @@ define Image/Build/Profile/Default<br>     $(call Image/Build/Profile/WHR1166D,$(1))<br>     $(call Image/Build/Profile/MZK-750DHP,$(1))<br>     $(call Image/Build/Profile/NA930,$(1))<br>+    $(call Image/Build/Profile/OY-0001,$(1))<br>     $(call Image/Build/Profile/Y1,$(1))<br>     $(call Image/Build/Profile/Y1S,$(1))<br> endef<br><br>                                     </div></body>
</html>