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 469811eb2bad9541035bb2dfd1701df7c912c020..b3ca002d0947f1a42c24e67b72d11c6174469a9c 100644 (file)
@@ -61,6 +61,7 @@ case "$FIRMWARE" in
        all5002 | \
        all5003 | \
        argus-atp52b | \
+       awm002-evb | \
        bc2 | \
        br6425 | \
        broadway | \
index 9a8cab8eee75237b79c1792410e4d3bcf59f422d..2d833b31a6a2edaece21391e98de945eab353106 100755 (executable)
@@ -41,6 +41,7 @@ ramips_setup_interfaces()
        all0256n | \
        all5002 | \
        all5003 | \
+       awm002-evb | \
        broadway | \
        wnce2001)
                ucidef_add_switch "switch0" "1" "0"
index bd1dac0dee36f712098c747a1970cdf7e235b7b9..6f153aac46673a25dedad6f2b7d6d6aa43b6efc2 100644 (file)
@@ -55,6 +55,7 @@ preinit_set_mac_address() {
        all0256n |\
        all5002 |\
        all5003 |\
+       awm002-evb |\
        carambola |\
        dir-615-h1 |\
        fonera20n |\
index 22c9885f390983dd387656de069dd53825c2582a..cb6c10f76fd152bca3c559e7a3d97d33656044f8 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 3513ff4196b49683b7ea2ce8281d424267948b06..ef2aa9969078a73bc1150fc8061fba0cb3fff72c 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 dcae8482c634244fa9f75d0ee6f53b88acc481ec..0aa84ac151c60894851a9c5180cf722f2d5252fc 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))