ramips: add support for dir810l and asus rp-n53
authorJohn Crispin <john@openwrt.org>
Wed, 14 Aug 2013 18:15:35 +0000 (18:15 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 14 Aug 2013 18:15:35 +0000 (18:15 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37780

target/linux/ramips/base-files/etc/uci-defaults/01_leds
target/linux/ramips/base-files/etc/uci-defaults/02_network
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/base-files/lib/upgrade/platform.sh
target/linux/ramips/dts/DIR-810L.dts [new file with mode: 0644]
target/linux/ramips/dts/RP-N53.dts [new file with mode: 0644]
target/linux/ramips/image/Makefile

index 7f69231da9b3703a4d88b2f48346975ff22b8fae..7bec16f49103b5955ca56aefabc180e1b8a2ff81 100755 (executable)
@@ -74,6 +74,9 @@ case $board in
        dir-620-d1)
                set_wifi_led "d-link:green:wifi"
                ;;
+       dir-810l)
+               ucidef_set_led_default "power" "POWER" "dlink:green:power" "1"
+               ;;
        esr-9753)
                set_wifi_led "rt2800pci-phy0::radio"
                ;;
@@ -135,6 +138,10 @@ case $board in
        wnce2001)
                set_wifi_led "netgear:green:wlan"
                ;;
+       rp-n53)
+               ucidef_set_led_netdev "eth" "Network" "asus:white:back" "eth0"
+               set_wifi_led "asus:blue:wifi"
+               ;;
 esac
 
 ucidef_commit_leds
index ef13e364a51bccad6ea3f0c149299f520ce6ff4b..441d3393cfdca6b10667f8c2a2d42a93f60d7824 100755 (executable)
@@ -197,7 +197,8 @@ ramips_setup_macs()
 
        rt-n13u | \
        hg255d  | \
-       fonera20n)
+       fonera20n |
+       dir-810l)
                lan_mac=$(mtd_get_mac_binary factory 40)
                wan_mac=$(macaddr_add "$lan_mac" 1)
                ;;
index 858a8092e7ad52a0fc6c1d3670767c4197de5bfc..3ec44d2fffc2b942191c6508131dd90bb0a8825b 100755 (executable)
@@ -88,6 +88,9 @@ ramips_board_detect() {
        *"DIR-645")
                name="dir-645"
                ;;
+       *"DIR-810L")
+               name="dir-810l"
+               ;;
        *"DAP-1350")
                name="dap-1350"
                ;;
@@ -166,6 +169,9 @@ ramips_board_detect() {
        *"PWH2004")
                name="pwh2004"
                ;;
+       *"Asus RP-N53")
+               name="rp-n53"
+               ;;
        *"RT-G32 B1")
                name="rt-g32-b1"
                ;;
index e85beada3935a2d532996a2458d2c35513204983..4545af009ced47ca7f3a834d257d0bcb03714014 100755 (executable)
@@ -36,6 +36,7 @@ platform_check_image() {
        dir-615-d | \
        dir-620-a1 | \
        dir-620-d1 | \
+       dir-810l | \
        dap-1350 | \
        esr-9753 | \
        f7c027 | \
@@ -56,6 +57,7 @@ platform_check_image() {
        omni-emb | \
        omni-emb-hpm | \
        psr-680w | \
+       rp-n53 | \
        rt-g32-b1 | \
        rt-n10-plus | \
        rt-n15 | \
diff --git a/target/linux/ramips/dts/DIR-810L.dts b/target/linux/ramips/dts/DIR-810L.dts
new file mode 100644 (file)
index 0000000..193771b
--- /dev/null
@@ -0,0 +1,127 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+       compatible = "dlink,dir-810l", "ralink,mt7620a-soc";
+       model = "D-Link DIR-810L";
+
+       palmbus@10000000 {
+               sysc@0 {
+                       ralink,pinmux = "spi", "uartlite", "ephy";
+                       ralink,gpiomux = "jtag", "mdio", "rgmii1", "rgmii1", "i2c", "wled";
+                       ralink,uartmux = "gpio";
+                       ralink,wdtmux = <1>;
+               };
+
+               gpio0: gpio@600 {
+                       status = "okay";
+               };
+
+               spi@b00 {
+                       status = "okay";
+               
+                       m25p80@0 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "mx25l6405d";
+                               reg = <0 0>;
+                               linux,modalias = "m25p80";
+                               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;
+                               };
+
+                               factory5g: partition@50000 {
+                                       label = "factory5g";
+                                       reg = <0x50000 0x10000>;
+                                       read-only;
+                               };
+
+                               partition@60000 {
+                                       label = "Wolf_Config";
+                                       reg = <0x60000 0x10000>;
+                                       read-only;
+                               };
+
+                               partition@70000 {
+                                       label = "MyDlink";
+                                       reg = <0x70000 0x80000>;
+                                       read-only;
+                               };
+
+                               partition@e0000 {
+                                       label = "Jffs2";
+                                       reg = <0xe0000 0x80000>;
+                                       read-only;
+                               };
+
+                               partition@170000 {
+                                       label = "firmware";
+                                       reg = <0x170000 0x690000>;
+                               };
+                       };
+               };
+       };
+
+       ethernet@10100000 {
+               status = "okay";
+       };
+
+       gsw@10110000 {
+               status = "okay";
+               ralink,port4 = "ephy";
+       };
+
+       pcie@10140000 {
+               status = "okay";
+       };
+
+       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 = <0x100>;
+               };
+               wps {
+                       label = "wps";
+                       gpios = <&gpio0 2 1>;
+                       linux,code = <0x100>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               power {
+                       label = "dlink:green:power";
+                       gpios = <&gpio0 9 0>;
+               };
+               internet {
+                       label = "asus:yellow:internet";
+                       gpios = <&gpio0 12 0>;
+               };
+               status {
+                       label = "asus:internet:status";
+                       gpios = <&gpio0 13 0>;
+               };
+       };
+};
diff --git a/target/linux/ramips/dts/RP-N53.dts b/target/linux/ramips/dts/RP-N53.dts
new file mode 100644 (file)
index 0000000..d48bb08
--- /dev/null
@@ -0,0 +1,149 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+       compatible = "asus,rp-n53", "ralink,mt7620a-soc";
+       model = "Asus RP-N53";
+
+       chosen {
+               bootargs = "console=ttyS0,57600";
+       };
+
+       palmbus@10000000 {
+               sysc@0 {
+                       ralink,pinmux = "spi", "uartlite", "wled", "ephy", "i2c";
+                       ralink,gpiomux = "jtag", "mdio", "rgmii1", "rgmii1";
+                       ralink,uartmux = "gpio";
+                       ralink,wdtmux = <1>;
+               };
+
+               gpio0: gpio@600 {
+                       status = "okay";
+               };
+
+               gpio1: gpio@638 {
+                       status = "okay";
+               };
+
+               i2c@900 {
+                       status = "okay";
+               };
+
+               spi@b00 {
+                       status = "okay";
+               
+                       m25p80@0 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "mx25l6405d";
+                               reg = <0 0>;
+                               linux,modalias = "m25p80";
+                               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 0x7b0000>;
+                               };
+                       };
+               };
+       };
+
+       codec {
+               compatible = "ralink,mt7620-audio";
+       };
+
+       ethernet@10100000 {
+               status = "okay";
+       };
+
+       gsw@10110000 {
+               status = "okay";
+               ralink,port4 = "ephy";
+       };
+
+       pcie@10140000 {
+               status = "okay";
+       };
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+               touch {
+                       label = "touch";
+                       gpios = <&gpio1 0 1>;
+                       linux,code = <0x100>;
+               };
+               wps {
+                       label = "wps";
+                       gpios = <&gpio1 1 1>;
+                       linux,code = <0x100>;
+               };
+               reset {
+                       label = "reset";
+                       gpios = <&gpio1 2 1>;
+                       linux,code = <0x100>;
+               };
+               audio {
+                       label = "audio";
+                       gpios = <&gpio1 3 0>;
+                       linux,code = <0x101>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               backlight {
+                       label = "asus:white:back";
+                       gpios = <&gpio1 4 1>;
+               };
+               wifi0 {
+                       label = "asus:blue:5g3";
+                       gpios = <&gpio1 5 1>;
+               };
+               wifi1 {
+                       label = "asus:blue:5g2";
+                       gpios = <&gpio1 6 1>;
+               };
+               wifi2 {
+                       label = "asus:blue:5g1";
+                       gpios = <&gpio1 7 1>;
+               };
+               wifi3 {
+                       label = "asus:blue:wifi";
+                       gpios = <&gpio1 8 1>;
+               };
+               wifi4 {
+                       label = "asus:blue:2g1";
+                       gpios = <&gpio1 9 1>;
+               };
+               wifi5 {
+                       label = "asus:blue:2g2";
+                       gpios = <&gpio1 10 1>;
+               };
+               wifi6 {
+                       label = "asus:blue:2g3";
+                       gpios = <&gpio1 11 1>;
+               };
+       };
+};
index 3e82432144b6a83a39be83f368aab683d766bcd0..ccae6bee77d35d02ecb55241a2ff9b01c6dbec93 100644 (file)
@@ -585,11 +585,16 @@ endif
 
 Image/Build/Profile/MT7620a=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a,MT7620a)
 Image/Build/Profile/MT7620a_MT7610e=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_mt7610e,MT7620a_MT7610e)
+Image/Build/Profile/RP-N53=$(call BuildFirmware/Default8M/$(1),$(1),rp_n53,RP-N53)
+dlink810l_mtd_size=6881280
+Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l,DIR-810L,$(dlink810l_mtd_size))
 
 ifeq ($(SUBTARGET),mt7620a)
 define Image/Build/Profile/Default
        $(call Image/Build/Profile/MT7620a,$(1))
        $(call Image/Build/Profile/MT7620a_MT7610e,$(1))
+       $(call Image/Build/Profile/RP-N53,$(1))
+       $(call Image/Build/Profile/DIR-810L,$(1))
 endef
 endif