@
ivyswen 这个patch 你可以参考下
Index: target/linux/ramips/dts/RY-01.dts
===================================================================
--- target/linux/ramips/dts/RY-01.dts (revision 0)
+++ target/linux/ramips/dts/RY-01.dts (revision 0)
@@ -0,0 +1,130 @@
+/dts-v1/;
+
+/include/ "mt7620n.dtsi"
+
+/ {
+ compatible = "xcloud,ry-01", "ralink,mt7620n-soc";
+ model = "XCloud RY-01";
+
+ palmbus@10000000 {
+ gpio0: gpio@600 {
+ status = "okay";
+ };
+
+ gpio2: gpio@660 {
+ status = "okay";
+ };
+
+ gpio3: gpio@688 {
+ status = "okay";
+ };
+
+ spi@b00 {
+ status = "okay";
+
+ m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #compatible = "mx25l6405d";
+ compatible = "w25q128";
+ reg = <0 0>;
+ linux,modalias = "m25p80", "w25q128";
+ spi-max-frequency = <10000000>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+ };
+
+ ehci@101c0000 {
+ status = "okay";
+ };
+
+ ohci@101c1000 {
+ status = "okay";
+ };
+
+ ethernet@10100000 {
+ mtd-mac-address = <&factory 0x4>;
+ ralink,port-map = "wllll";
+ };
+
+ wmac@10180000 {
+ ralink,mtd-eeprom = <&factory 0>;
+ };
+
+ pinctrl {
+ state_default: pinctrl0 {
+ default {
+ ralink,group = "ephy", "wled";
+ ralink,function = "gpio";
+ };
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ wan {
+ label = "xcloud:red:wan";
+ gpios = <&gpio2 0 1>;
+ };
+ lan4 {
+ label = "xcloud:red:lan4";
+ gpios = <&gpio2 1 1>;
+ };
+ lan3 {
+ label = "xcloud:red:lan3";
+ gpios = <&gpio2 2 1>;
+ };
+ lan2 {
+ label = "xcloud:red:lan2";
+ gpios = <&gpio2 3 1>;
+ };
+ lan1 {
+ label = "xcloud:red:lan1";
+ gpios = <&gpio2 3 1>;
+ };
+ air {
+ label = "xcloud:red:air";
+ 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>;
+ };
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 1>;
+ linux,code = <0x211>;
+ };
+ };
+};
Index: target/linux/ramips/mt7620/profiles/
xcloud-ry-01.mk===================================================================
--- target/linux/ramips/mt7620/profiles/
xcloud-ry-01.mk (revision 0)
+++ target/linux/ramips/mt7620/profiles/
xcloud-ry-01.mk (revision 0)
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2011
OpenWrt.org+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/XCloud-RY-01
+ NAME:=XCloud RY 01
+ PACKAGES:=\
+ kmod-usb-core kmod-usb2 kmod-usb-ohci \
+ kmod-ledtrig-usbdev
+endef
+
+define Profile/Default/Description
+ Support for XCloud RY 01
+endef
+$(eval $(call Profile,XCloud-RY-01))
Property changes on: target/linux/ramips/mt7620/profiles/
xcloud-ry-01.mk___________________________________________________________________
Added: svn:executable
+ *
Index: target/linux/ramips/base-files/etc/board.d/01_leds
===================================================================
--- target/linux/ramips/base-files/etc/board.d/01_leds (revision 44550)
+++ target/linux/ramips/base-files/etc/board.d/01_leds (working copy)
@@ -202,6 +202,11 @@
set_wifi_led "asus:blue:air"
set_usb_led "asus:blue:usb"
;;
+ ry-01)
+ ucidef_set_led_default "power" "power" "xcloud:red:power" "1"
+ set_wifi_led "xcloud:red:wifi"
+ set_usb_led "xcloud:red:usb"
+ ;;
rp-n53)
ucidef_set_led_netdev "eth" "Network" "asus:white:back" "eth0"
set_wifi_led "asus:blue:wifi"
Index: target/linux/ramips/base-files/etc/board.d/02_network
===================================================================
--- target/linux/ramips/base-files/etc/board.d/02_network (revision 44550)
+++ target/linux/ramips/base-files/etc/board.d/02_network (working copy)
@@ -154,6 +154,7 @@
f5d8235-v2 | \
hg255d | \
rt-n14u | \
+ ry-01 | \
wrtnode | \
wt3020 | \
ur-326n4g | \
Index: target/linux/ramips/base-files/lib/
ramips.sh===================================================================
--- target/linux/ramips/base-files/lib/
ramips.sh (revision 44550)
+++ target/linux/ramips/base-files/lib/
ramips.sh (working copy)
@@ -172,6 +172,9 @@
*"Asus RT-N14U")
name="rt-n14u"
;;
+ *"XCloud RY-01")
+ name="ry-01"
+ ;;
*"Asus RT-N13U")
name="rt-n13u"
;;
Index: target/linux/ramips/base-files/lib/upgrade/
platform.sh===================================================================
--- target/linux/ramips/base-files/lib/upgrade/
platform.sh (revision 44550)
+++ target/linux/ramips/base-files/lib/upgrade/
platform.sh (working copy)
@@ -78,6 +78,7 @@
rt-n10-plus | \
rt-n13u | \
rt-n14u | \
+ ry-01 | \
rt-n15 | \
rt-n56u | \
rut5xx | \
Index: target/linux/ramips/image/Makefile
===================================================================
--- target/linux/ramips/image/Makefile (revision 44550)
+++ target/linux/ramips/image/Makefile (working copy)
@@ -858,6 +858,7 @@
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/RY-01=$(call BuildFirmware/Default16M/$(1),$(1),ry-01,RY-01)
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)
@@ -887,12 +888,12 @@
$(call Image/Build/Profile/MLWG2,$(1))
$(call Image/Build/Profile/WMR300,$(1))
$(call Image/Build/Profile/RT-N14U,$(1))
+ $(call Image/Build/Profile/RY-01,$(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/ZBT-WA05,$(1))
- $(call Image/Build/Profile/ArcherC20i,$(1))
endef
endif