ramips: Basic support for the AsiaRF RT5350 based AWM002 module and evaluation board.
authorJohn Crispin <john@openwrt.org>
Wed, 24 Jul 2013 08:54:41 +0000 (08:54 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 24 Jul 2013 08:54:41 +0000 (08:54 +0000)
Basic support for the AsiaRF RT5350 based AWM002 module and evaluation board.
http://www.asiarf.com/Smallest-Tiny-Ralink-802-11n-Wireless-AP-Router-Module-Board-AWM002-product-view-375.html

Signed-off-by Jon Smirl <jonsmirl@gmail.com>

SVN-Revision: 37521

12 files changed:
target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
target/linux/ramips/base-files/etc/uci-defaults/02_network
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/base-files/lib/upgrade/platform.sh
target/linux/ramips/dts/AWM002-4M.dtsi [new file with mode: 0644]
target/linux/ramips/dts/AWM002-8M.dtsi [new file with mode: 0644]
target/linux/ramips/dts/AWM002-EVB-4M.dts [new file with mode: 0644]
target/linux/ramips/dts/AWM002-EVB-8M.dts [new file with mode: 0644]
target/linux/ramips/dts/AWM002.dtsi [new file with mode: 0644]
target/linux/ramips/image/Makefile
target/linux/ramips/rt305x/profiles/asiarf.mk [new file with mode: 0644]

index 469811e..b3ca002 100644 (file)
@@ -61,6 +61,7 @@ case "$FIRMWARE" in
        all5002 | \
        all5003 | \
        argus-atp52b | \
+       awm002-evb | \
        bc2 | \
        br6425 | \
        broadway | \
index 9a8cab8..2d833b3 100755 (executable)
@@ -41,6 +41,7 @@ ramips_setup_interfaces()
        all0256n | \
        all5002 | \
        all5003 | \
+       awm002-evb | \
        broadway | \
        wnce2001)
                ucidef_add_switch "switch0" "1" "0"
index bd1dac0..6f153aa 100644 (file)
@@ -55,6 +55,7 @@ preinit_set_mac_address() {
        all0256n |\
        all5002 |\
        all5003 |\
+       awm002-evb |\
        carambola |\
        dir-615-h1 |\
        fonera20n |\
index 22c9885..cb6c10f 100755 (executable)
@@ -46,6 +46,9 @@ ramips_board_detect() {
        *"Argus ATP-52B")
                name="argus-atp52b"
                ;;
+       *"AsiaRF AWM002-EVB")
+               name="awm002-evb"
+               ;;
        *"BR6524N")
                name="br6524n"
                ;;
index 3513ff4..ef2aa99 100755 (executable)
@@ -24,6 +24,7 @@ platform_check_image() {
        all5002 | \
        all5003 | \
        asl26555 | \
+       awm002-evb | \
        bc2 | \
        broadway | \
        carambola | \
diff --git a/target/linux/ramips/dts/AWM002-4M.dtsi b/target/linux/ramips/dts/AWM002-4M.dtsi
new file mode 100644 (file)
index 0000000..a506b69
--- /dev/null
@@ -0,0 +1,18 @@
+/dts-v1/;
+
+/include/ "AWM002.dtsi"
+
+/ {
+       compatible = "AWM002", "ralink,rt5350-soc";
+       model = "AsiaRF AWM002";
+
+       palmbus@10000000 {
+
+               spi@b00 {
+                       m25p80@0 {
+                               compatible = "mx25l3205d";
+                               linux,modalias = "m25p80", "mx25l3205d";
+                       };
+               };
+       };
+};
diff --git a/target/linux/ramips/dts/AWM002-8M.dtsi b/target/linux/ramips/dts/AWM002-8M.dtsi
new file mode 100644 (file)
index 0000000..d4cc7de
--- /dev/null
@@ -0,0 +1,18 @@
+/dts-v1/;
+
+/include/ "AWM002.dtsi"
+
+/ {
+       compatible = "AWM002", "ralink,rt5350-soc";
+       model = "AsiaRF AWM002";
+
+       palmbus@10000000 {
+
+               spi@b00 {
+                       m25p80@0 {
+                               compatible = "mx25l6405d";
+                               linux,modalias = "m25p80", "mx25l6405d";
+                       };
+               };
+       };
+};
diff --git a/target/linux/ramips/dts/AWM002-EVB-4M.dts b/target/linux/ramips/dts/AWM002-EVB-4M.dts
new file mode 100644 (file)
index 0000000..61b2d76
--- /dev/null
@@ -0,0 +1,40 @@
+/dts-v1/;
+
+/include/ "AWM002-4M.dtsi"
+
+/ {
+       model = "AsiaRF AWM002 EVB";
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               tx {
+                       label = "awm002-evb:green:tx";
+                       gpios = <&gpio0 15 1>;
+               };
+               rx {
+                       label = "awm002-evb:green:rx";
+                       gpios = <&gpio0 16 1>;
+               };
+               wps {
+                       label = "awm002-evb:green:wps";
+                       gpios = <&gpio0 21 1>;
+               };
+       };
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+               reset_wps {
+                       label = "reset_wps";
+                       gpios = <&gpio0 0 1>;
+                       linux,code = <0x198>;
+               };
+               mode {
+                       label = "mode";
+                       gpios = <&gpio0 21 1>;
+                       linux,code = <0x32>;
+               };
+       };
+};
diff --git a/target/linux/ramips/dts/AWM002-EVB-8M.dts b/target/linux/ramips/dts/AWM002-EVB-8M.dts
new file mode 100644 (file)
index 0000000..dd1ce4c
--- /dev/null
@@ -0,0 +1,40 @@
+/dts-v1/;
+
+/include/ "AWM002-8M.dtsi"
+
+/ {
+       model = "AsiaRF AWM002 EVB";
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               tx {
+                       label = "awm002-evb:green:tx";
+                       gpios = <&gpio0 15 1>;
+               };
+               rx {
+                       label = "awm002-evb:green:rx";
+                       gpios = <&gpio0 16 1>;
+               };
+               wps {
+                       label = "awm002-evb:green:wps";
+                       gpios = <&gpio0 21 1>;
+               };
+       };
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+               reset_wps {
+                       label = "reset_wps";
+                       gpios = <&gpio0 0 1>;
+                       linux,code = <0x198>;
+               };
+               mode {
+                       label = "mode";
+                       gpios = <&gpio0 21 1>;
+                       linux,code = <0x32>;
+               };
+       };
+};
diff --git a/target/linux/ramips/dts/AWM002.dtsi b/target/linux/ramips/dts/AWM002.dtsi
new file mode 100644 (file)
index 0000000..5fe2faa
--- /dev/null
@@ -0,0 +1,87 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+       compatible = "AWM002", "ralink,rt5350-soc";
+       model = "AsiaRF AWM002";
+
+       palmbus@10000000 {
+               sysc@0 {
+                       ralink,pinmux = "spi", "uartlite", "jtag", "mdio", "sdram", "rgmii";
+                       ralink,gpiomux = "i2c";
+                       ralink,uartmux = "gpio";
+                       ralink,wdtmux = <1>;
+               };
+
+               gpio0: gpio@600 {
+                       status = "okay";
+               };
+
+               spi@b00 {
+                       status = "okay";
+                       m25p80@0 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               reg = <0 0>;
+                               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 0x1fb0000>;
+                               };
+                       };
+               };
+       };
+
+       ethernet@10100000 {
+               status = "okay";
+       };
+
+       esw@10110000 {
+               status = "okay";
+               ralink,portmap = <0x3f>;
+       };
+
+       wmac@10180000 {
+               status = "okay";
+       };
+
+       ehci@101c0000 {
+               status = "okay";
+       };
+
+       ohci@101c1000 {
+               status = "okay";
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               ld1 {
+                       label = "asiarf:green:ld1";
+                       gpios = <&gpio0 0 1>;
+               };
+               ld2 {
+                       label = "asiarf:green:ld2";
+                       gpios = <&gpio0 1 1>;
+               };
+       };
+};
index dcae848..0aa84ac 100644 (file)
@@ -281,6 +281,8 @@ define BuildFirmware/ASL26555/initramfs
 endef
 Image/Build/Profile/ASL26555=$(call BuildFirmware/ASL26555/$(1),$(1),asl26555,ASL26555)
 
+Image/Build/Profile/AWM002-EVB=$(call BuildFirmware/DefaultDualSize/$(1),$(1),awm002-evb,AWM002-EVB)
+
 Image/Build/Profile/BC2=$(call BuildFirmware/Default8M/$(1),$(1),bc2,BC2)
 
 broadway_mtd_size=7929856
@@ -448,6 +450,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/ALL5003,$(1))
        $(call Image/Build/Profile/ARGUS_ATP52B,$(1))
        $(call Image/Build/Profile/ASL26555,$(1))
+       $(call Image/Build/Profile/AWM002-EVB,$(1))
        $(call Image/Build/Profile/BC2,$(1))
        $(call Image/Build/Profile/BROADWAY,$(1))
        $(call Image/Build/Profile/CARAMBOLA,$(1))
diff --git a/target/linux/ramips/rt305x/profiles/asiarf.mk b/target/linux/ramips/rt305x/profiles/asiarf.mk
new file mode 100644 (file)
index 0000000..aa25db5
--- /dev/null
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/AWM002-EVB
+       NAME:=AsiaRF AWM002-EVB
+       PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev \
+       kmod-i2c-core kmod-i2c-gpio
+endef
+
+define Profile/AWM002-EVB/Description
+       Package set for AsiaRF AWM002 Evaluation Board
+endef
+
+$(eval $(call Profile,AWM002-EVB))