- added support for sysupgrade
- fixed missing tab in makefile

current support status
ethernet        works
usb             works
leds defined    asus:blue:[power|lan|wan|usb] (wifi led unreachable?)
buttons         reset, wps
uart            not tested
i2c             not tested
---
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ramips/dts/RT-N14U.dts                | 110 +++++++++++++++++++++
 target/linux/ramips/image/Makefile                 |   2 +
 4 files changed, 116 insertions(+)
 create mode 100644 target/linux/ramips/dts/RT-N14U.dts

diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 972f415..d62002e 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -127,6 +127,9 @@ ramips_board_detect() {
        *"La Fonera 2.0N")
                name="fonera20n"
                ;;
+       *"Asus RT-N14U")
+               name="rt-n14u"
+               ;;
        *"Asus RT-N13U")
                name="rt-n13u"
                ;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 6836e16..babeaf2 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -63,6 +63,7 @@ platform_check_image() {
        rp-n53 | \
        rt-g32-b1 | \
        rt-n10-plus | \
+       rt-n14u | \
        rt-n15 | \
        rt-n56u | \
        sl-r7205 | \
diff --git a/target/linux/ramips/dts/RT-N14U.dts 
b/target/linux/ramips/dts/RT-N14U.dts
new file mode 100644
index 0000000..9e33b30
--- /dev/null
+++ b/target/linux/ramips/dts/RT-N14U.dts
@@ -0,0 +1,110 @@
+/dts-v1/;
+
+/include/ "mt7620n.dtsi"
+
+/ {
+       compatible = "asus,rt-n14u", "ralink,mt7620n-soc";
+       model = "Asus RT-N14U";
+
+       palmbus@10000000 {
+               gpio2: gpio@660 {
+                       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";
+       };
+
+       pinctrl {
+               state_default: pinctrl0 {
+                       default {
+                               ralink,group = "i2c", "ephy";
+                               ralink,function = "gpio";
+                       };
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               wan {
+                       label = "asus:blue:wan";
+                       gpios = <&gpio2 0 1>;
+               };
+               lan {
+                       label = "asus:blue:lan";
+                       gpios = <&gpio2 1 1>;
+               };
+               usb {
+                       label = "asus:blue:usb";
+                       gpios = <&gpio2 2 1>;
+               };
+               power {
+                       label = "asus:blue:power";
+                       gpios = <&gpio2 3 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>;
+               };
+       };
+};
diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index 32047cc..d600dca 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -640,10 +640,12 @@ endif
 #
 
 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)
 
 ifeq ($(SUBTARGET),mt7620n)
 define Image/Build/Profile/Default
        $(call Image/Build/Profile/WMR300,$(1))
+       $(call Image/Build/Profile/RT-N14U,$(1))
 endef
 endif
 
-- 
1.8.5.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to