diff options
-rw-r--r-- | target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom | 1 | ||||
-rwxr-xr-x | target/linux/ramips/base-files/etc/uci-defaults/02_network | 1 | ||||
-rw-r--r-- | target/linux/ramips/base-files/lib/preinit/06_set_iface_mac | 1 | ||||
-rwxr-xr-x | target/linux/ramips/base-files/lib/ramips.sh | 3 | ||||
-rwxr-xr-x | target/linux/ramips/base-files/lib/upgrade/platform.sh | 1 | ||||
-rw-r--r-- | target/linux/ramips/dts/AWM002-4M.dtsi | 18 | ||||
-rw-r--r-- | target/linux/ramips/dts/AWM002-8M.dtsi | 18 | ||||
-rw-r--r-- | target/linux/ramips/dts/AWM002-EVB-4M.dts | 40 | ||||
-rw-r--r-- | target/linux/ramips/dts/AWM002-EVB-8M.dts | 40 | ||||
-rw-r--r-- | target/linux/ramips/dts/AWM002.dtsi | 87 | ||||
-rw-r--r-- | target/linux/ramips/image/Makefile | 3 | ||||
-rw-r--r-- | target/linux/ramips/rt305x/profiles/asiarf.mk | 18 |
12 files changed, 231 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index 469811eb2b..b3ca002d09 100644 --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -61,6 +61,7 @@ case "$FIRMWARE" in all5002 | \ all5003 | \ argus-atp52b | \ + awm002-evb | \ bc2 | \ br6425 | \ broadway | \ diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network index 9a8cab8eee..2d833b31a6 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -41,6 +41,7 @@ ramips_setup_interfaces() all0256n | \ all5002 | \ all5003 | \ + awm002-evb | \ broadway | \ wnce2001) ucidef_add_switch "switch0" "1" "0" diff --git a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac index bd1dac0dee..6f153aac46 100644 --- a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac +++ b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac @@ -55,6 +55,7 @@ preinit_set_mac_address() { all0256n |\ all5002 |\ all5003 |\ + awm002-evb |\ carambola |\ dir-615-h1 |\ fonera20n |\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 22c9885f39..cb6c10f76f 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -46,6 +46,9 @@ ramips_board_detect() { *"Argus ATP-52B") name="argus-atp52b" ;; + *"AsiaRF AWM002-EVB") + name="awm002-evb" + ;; *"BR6524N") name="br6524n" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 3513ff4196..ef2aa99690 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -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 index 0000000000..a506b69a14 --- /dev/null +++ b/target/linux/ramips/dts/AWM002-4M.dtsi @@ -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 index 0000000000..d4cc7de80c --- /dev/null +++ b/target/linux/ramips/dts/AWM002-8M.dtsi @@ -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 index 0000000000..61b2d76b32 --- /dev/null +++ b/target/linux/ramips/dts/AWM002-EVB-4M.dts @@ -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 index 0000000000..dd1ce4cf54 --- /dev/null +++ b/target/linux/ramips/dts/AWM002-EVB-8M.dts @@ -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 index 0000000000..5fe2faade8 --- /dev/null +++ b/target/linux/ramips/dts/AWM002.dtsi @@ -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>; + }; + }; +}; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index dcae8482c6..0aa84ac151 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -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 index 0000000000..aa25db5121 --- /dev/null +++ b/target/linux/ramips/rt305x/profiles/asiarf.mk @@ -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)) |