aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-04-22 08:08:51 +0000
committerJohn Crispin <john@openwrt.org>2014-04-22 08:08:51 +0000
commitcd5f3584e2c2044c2cd53d723350a8d02b227aff (patch)
tree3095f0a68cfbd8e96d0a23d86608057aba1302fd /target
parent4f3c74011048239eb5c37a2740c428b59d161387 (diff)
downloadupstream-cd5f3584e2c2044c2cd53d723350a8d02b227aff.tar.gz
upstream-cd5f3584e2c2044c2cd53d723350a8d02b227aff.tar.bz2
upstream-cd5f3584e2c2044c2cd53d723350a8d02b227aff.zip
ramips: Add support for the 7Links PX-4885 wireless router.
The 7Links PX-4885 is a small battery-powered wireless router. It is based on a RT5350F WiSoC and features one ethernet port and one USB port. It is a Hame MPR-A1 clone, except it has different GPIOs, a different battery and more RAM (32 MB). This patch adds a profile for this board, the corresponding device tree file and the adequate base-files changes (incl. sysupgrade). Signed-off-by: Hugo Grostabussiat <bonstra@bonstra.fr.eu.org> SVN-Revision: 40554
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/diag.sh3
-rw-r--r--target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom1
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/01_leds4
-rw-r--r--target/linux/ramips/base-files/lib/preinit/06_set_iface_mac1
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh1
-rw-r--r--target/linux/ramips/dts/PX4885.dts90
-rw-r--r--target/linux/ramips/image/Makefile3
-rw-r--r--target/linux/ramips/rt305x/profiles/sevenlinks.mk20
9 files changed, 126 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 122587232f..075562af02 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -92,6 +92,9 @@ get_status_led() {
pwh2004)
status_led="pwh2004:green:power"
;;
+ px4885)
+ status_led="7links:orange:wifi"
+ ;;
rt-n15)
status_led="rt-n15:blue:power"
;;
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 5906e686a2..906c7ba174 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
@@ -93,6 +93,7 @@ case "$FIRMWARE" in
omni-emb | \
omni-emb-hpm | \
psr-680w | \
+ px4885 | \
rt-n15 | \
rt-n56u | \
sl-r7205 | \
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 17d8c97719..74ba0ba63e 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -129,6 +129,10 @@ case $board in
ucidef_set_led_netdev "eth" "ETH" "emb:green:eth" "eth0"
set_wifi_led "emb:green:wifi"
;;
+ px4885)
+ set_wifi_led "7links:orange:wifi"
+ set_usb_led "7links:blue:storage"
+ ;;
sl-r7205)
set_wifi_led "rt2800pci-phy0::radio"
;;
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 d2dc00f8bc..7ff6e3d5e6 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
@@ -74,6 +74,7 @@ preinit_set_mac_address() {
nbg-419n |\
omni-emb |\
omni-emb-hpm |\
+ px4885 |\
tew-691gr |\
tew-692gr |\
w306r-v20 |\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 913e65cb90..7f221f807d 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -13,6 +13,9 @@ ramips_board_detect() {
machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)
case "$machine" in
+ *"7Links PX-4885")
+ name="px4885"
+ ;;
*"8devices Carambola")
name="carambola"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 616516bf5f..d8098b2a66 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -62,6 +62,7 @@ platform_check_image() {
omni-emb | \
omni-emb-hpm | \
psr-680w | \
+ px4885 | \
rp-n53 | \
rt-g32-b1 | \
rt-n10-plus | \
diff --git a/target/linux/ramips/dts/PX4885.dts b/target/linux/ramips/dts/PX4885.dts
new file mode 100644
index 0000000000..0dcafc4b46
--- /dev/null
+++ b/target/linux/ramips/dts/PX4885.dts
@@ -0,0 +1,90 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+ compatible = "PX4885", "ralink,rt5350-soc";
+ model = "7Links PX-4885";
+
+ palmbus@10000000 {
+ spi@b00 {
+ status = "okay";
+ m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mx25l3205d";
+ reg = <0 0>;
+ linux,modalias = "m25p80", "mx25l3205d";
+ spi-max-frequency = <10000000>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "devdata";
+ reg = <0x20000 0x20000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+ };
+
+ pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "jtag", "uartf";
+ ralink,function = "gpio";
+ };
+ };
+ };
+
+ ethernet@10100000 {
+ mtd-mac-address = <&factory 0x2e>;
+ };
+
+ esw@10110000 {
+ ralink,portmap = <0x3f>;
+ };
+
+ wmac@10180000 {
+ ralink,mtd-eeprom = <&factory 0>;
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 1>;
+ linux,code = <0x198>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ orange {
+ label = "7links:orange:wifi";
+ gpios = <&gpio0 18 1>;
+ };
+ blue {
+ label = "7links:blue:storage";
+ gpios = <&gpio0 19 1>;
+ };
+ };
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 26386bf05c..19932f6fe1 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -448,6 +448,8 @@ Image/Build/Profile/PSR-680W=$(call BuildFirmware/Default4M/$(1),$(1),psr-680w,P
Image/Build/Profile/PWH2004=$(call BuildFirmware/Default8M/$(1),$(1),pwh2004,PWH2004)
+Image/Build/Profile/PX4885=$(call BuildFirmware/Default4M/$(1),$(1),px4885,PX4885)
+
Image/Build/Profile/RTG32B1=$(call BuildFirmware/Default4M/$(1),$(1),rt-g32-b1,RT-G32-B1)
Image/Build/Profile/RTN10PLUS=$(call BuildFirmware/Default4M/$(1),$(1),rt-n10-plus,RT-N10-PLUS)
@@ -585,6 +587,7 @@ define Image/Build/Profile/Default
$(call Image/Build/Profile/OMNI-EMB,$(1))
$(call Image/Build/Profile/PSR-680W,$(1))
$(call Image/Build/Profile/PWH2004,$(1))
+ $(call Image/Build/Profile/PX4885,$(1))
$(call Image/Build/Profile/RTG32B1,$(1))
$(call Image/Build/Profile/RTN10PLUS,$(1))
$(call Image/Build/Profile/RT-N13U,$(1))
diff --git a/target/linux/ramips/rt305x/profiles/sevenlinks.mk b/target/linux/ramips/rt305x/profiles/sevenlinks.mk
new file mode 100644
index 0000000000..424d16a796
--- /dev/null
+++ b/target/linux/ramips/rt305x/profiles/sevenlinks.mk
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/PX4885
+ NAME:=7Links PX-4885
+ PACKAGES:=\
+ kmod-usb-core kmod-usb-rt305x-dwc_otg kmod-usb2 kmod-usb-ohci \
+ kmod-ledtrig-usbdev kmod-leds-gpio
+endef
+
+define Profile/PX4885/Description
+ Package set for 7Links PX-4885 wireless router.
+endef
+
+$(eval $(call Profile,PX4885))
+