ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
set_wifi_led "rt2800pci-phy0::radio"
;;
+ ar670w|\
+ ar725w|\
awapn2403)
set_wifi_led "rt2800soc-phy0::radio"
;;
- ar725w)
- set_wifi_led "rt2800soc-phy0::radio"
- ;;
asl26555)
ucidef_set_led_default "power" "POWER" "asl26555:green:power" "1"
ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
--- /dev/null
+/dts-v1/;
+
+/include/ "rt2880.dtsi"
+
+/ {
+ compatible = "AR670W", "ralink,rt2880-soc";
+ model = "Airlink101 AR670W";
+
+ palmbus@300000 {
+ gpio0: gpio@600 {
+ status = "okay";
+ };
+ };
+
+ pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "spi", "uartlite";
+ ralink,function = "gpio";
+ };
+ };
+ };
+
+ ethernet@400000 {
+ status = "okay";
+ mtd-mac-address = <&factory 0x2004>;
+
+ port@0 {
+ phy-handle = <&phy0>;
+ phy-mode = "mii";
+ };
+
+ mdio-bus {
+ status = "okay";
+ phy0: ethernet-phy@0 {
+ phy-mode = "mii";
+ reg = <0>;
+ };
+ };
+ };
+
+ wmac@480000 {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x2000>;
+ };
+
+ cfi@bdc00000 {
+ compatible = "cfi-flash";
+ reg = <0xbc400000 0x800000>;
+
+ bank-width = <2>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ u-boot@0 {
+ reg = <0x0 0x30000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ factory: factory@30000 {
+ reg = <0x30000 0x10000>;
+ label = "factory";
+ read-only;
+ };
+
+ firmware@40000 {
+ reg = <0x40000 0x3c0000>;
+ label = "firmware";
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ status {
+ label = "ar670w:green:power";
+ gpios = <&gpio0 7 1>;
+ };
+
+ wpsblue {
+ label = "ar670w:blue:wps";
+ gpios = <&gpio0 13 1>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <100>;
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 1>;
+ linux,code = <0x211>;
+ };
+ reset {
+ label = "reset";
+ gpios = <&gpio0 9 1>;
+ linux,code = <0x198>;
+ };
+ };
+};
endef
BuildFirmware/Gemtek/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3))
+# Airlink101 AR670W -- LZMA without uImage header
+define BuildFirmware/AR670W/squashfs
+ $(call PatchKernelLzmaDtb,$(2),$(3),$(5))
+
+ $(eval output_name=$(IMG_PREFIX)-$(2)-$(1)-$(if $(4),$(4),sysupgrade).bin)
+ $(eval factory_name=$(IMG_PREFIX)-$(2)-$(1)-factory.bin)
+
+ ( dd if=$(KDIR)/vmlinux-$(2).bin.lzma bs=65536 \
+ conv=sync; dd if=$(KDIR)/root.$(1) ) > $(KDIR)/$(output_name)
+
+ $(call prepare_generic_squashfs,$(KDIR)/$(output_name))
+
+ if [ `stat -c%s "$(KDIR)/$(output_name)"` \
+ -gt $(ralink_default_fw_size_4M) ]; then \
+ echo "Warning: $(KDIR)/$(output_name) is too big" >&2; \
+ else \
+ mkwrgimg -i $(KDIR)/$(output_name) \
+ -d "/dev/mtdblock/2" \
+ -s "wrgn16a_airlink_ar670w" \
+ -o $(BIN_DIR)/$(factory_name); \
+ $(CP) $(KDIR)/$(output_name) $(BIN_DIR)/$(output_name); \
+ fi
+endef
+
#
# RT288X Profiles
#
+Image/Build/Profile/AR670W=$(call BuildFirmware/AR670W/$(1),$(1),ar670w,AR670W)
+
Image/Build/Profile/AR725W=$(call BuildFirmware/Gemtek/$(1),$(1),ar725w,AR725W)
# 0x790000
ifeq ($(SUBTARGET),rt288x)
define Image/Build/Profile/Default
+ $(call Image/Build/Profile/AR670W,$(1))
$(call Image/Build/Profile/AR725W,$(1))
$(call Image/Build/Profile/F5D8235V1,$(1))
$(call Image/Build/Profile/RTN15,$(1))