From: "Yong-hyu, Ban" <perillam...@gentoo.moe>

Signed-off-by: Yong-hyu, Ban <perillam...@gentoo.moe>
---
 .../linux/ramips/base-files/etc/board.d/02_network |   1 +
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ramips/dts/W2914NSV2.dts              | 126 +++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                |   8 ++
 5 files changed, 139 insertions(+)
 create mode 100644 target/linux/ramips/dts/W2914NSV2.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index e2a2f94..52289a4 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -86,6 +86,7 @@ ramips_setup_interfaces()
        sap-g3200u3|\
        sk-wb8|\
        vr500|\
+       w2914nsv2|\
        wf-2881|\
        witi|\
        wl-wn575a3|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 2560eb7..dbfb650 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -583,6 +583,9 @@ ramips_board_detect() {
        *"YK1")
                name="youku-yk1"
                ;;
+       *"W2914NS v2")
+               name="w2914nsv2"
+               ;;
        *)
                name="generic"
                ;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 7f161f5..169e0ff 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -131,6 +131,7 @@ platform_check_image() {
        vocore|\
        vr500|\
        w150m|\
+       w2914nsv2|\
        w306r-v20|\
        w502u|\
        wf-2881|\
diff --git a/target/linux/ramips/dts/W2914NSV2.dts 
b/target/linux/ramips/dts/W2914NSV2.dts
new file mode 100644
index 0000000..fd50e4e
--- /dev/null
+++ b/target/linux/ramips/dts/W2914NSV2.dts
@@ -0,0 +1,126 @@
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+       model = "WeVO W2914NS v2";
+
+       memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x8000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,57600";
+       };
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+
+               reset {
+                       label = "reset";
+                       gpios = <&gpio0 29 1>;
+                       linux,code = <KEY_RESTART>;
+               };
+
+               wps {
+                       label = "wps";
+                       gpios = <&gpio0 18 1>;
+                       linux,code = <KEY_WPS_BUTTON>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               usb {
+                       label = "w2914nsv2:green:usb";
+                       gpios = <&gpio0 27 1>;
+               };
+       };
+};
+
+
+&sdhci {
+       status = "okay";
+};
+
+&xhci {
+       status = "okay";
+};
+
+&spi0 {
+       status = "okay";
+
+       m25p80@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "mx25l12805d";
+               reg = <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>;
+               };
+
+               partition@50000 {
+                       label = "firmware";
+                       reg = <0x50000 0xfb0000>;
+               };
+       };
+};
+
+&pcie {
+       status = "okay";
+
+       pcie0 {
+               mt76x2e@0,0 {
+                       reg = <0x0000 0 0 0 0>;
+                       device_type = "pci";
+                       mediatek,mtd-eeprom = <&factory 0x0000>;
+                       mediatek,5ghz = <0>;
+               };
+       };
+
+       pcie1 {
+               mt7603e@1,0 {
+                       reg = <0x0000 0 0 0 0>;
+                       device_type = "pci";
+                       mediatek,mtd-eeprom = <&factory 0x8000>;
+                       mediatek,2ghz = <0>;
+               };
+       };
+};
+
+&ethernet {
+       mtd-mac-address = <&factory 0xe000>;
+};
+
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "wdt", "rgmii2", "jtag", "mdio";
+                       ralink,function = "gpio";
+               };
+       };
+};
diff --git a/target/linux/ramips/image/mt7621.mk 
b/target/linux/ramips/image/mt7621.mk
index 116d092..b61f4a2 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -199,6 +199,14 @@ define Device/rb750gr3
 endef
 TARGET_DEVICES += rb750gr3
 
+define Device/w2914nsv2
+  DTS := W2914NSV2
+  IMAGE_SIZE := $(ralink_default_fw_size_16M)
+  DEVICE_TITLE := WeVO W2914NS v2
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 
kmod-mt76
+endef
+TARGET_DEVICES += w2914nsv2
+
 # FIXME: is this still needed?
 define Image/Prepare
 #define Build/Compile
-- 
2.10.2


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to