From 7bfab6e308a54d4fc2b99d9f80b4a4cd735de5b1 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 25 Apr 2013 19:02:53 +0000 Subject: ramips: Add Alpha ASL-26555 support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This board uses a TrendChip SOC with its own RAM/Flash for ADSL support. We know both SOCs are connected through ethernet and use some kind of protocol for UART communication, but due to the lack of GPL sources we couldn't get it to work. For this reason the network is configured only for LAN. There are two versions (Chile 8MB and Spain 16MB). Wiki: http://wiki.openwrt.org/toh/alpha/asl26555 Signed-off-by: Esteban Benito Signed-off-by: Álvaro Fernández Rojas Patchwork: http://patchwork.openwrt.org/patch/3571/ Acked-by: John Crispin SVN-Revision: 36433 --- target/linux/ramips/base-files/etc/diag.sh | 3 +++ .../ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom | 1 + target/linux/ramips/base-files/etc/uci-defaults/01_leds | 6 ++++++ target/linux/ramips/base-files/etc/uci-defaults/02_network | 10 ++++++++++ target/linux/ramips/base-files/lib/preinit/06_set_iface_mac | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 +++ target/linux/ramips/base-files/lib/upgrade/platform.sh | 1 + 7 files changed, 25 insertions(+) (limited to 'target/linux/ramips/base-files') diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index a82e1ce..1970ae0 100755 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -15,6 +15,9 @@ get_status_led() { argus-atp52b) status_led="argus-atp52b:green:run" ;; + asl26555) + status_led="asl26555:green:power" + ;; br6524n) status_led="edimax: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 5cd9313..538047b 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 @@ -30,6 +30,7 @@ board=$(ramips_board_name) case "$FIRMWARE" in "soc_wmac.eeprom") case $board in + asl26555 | \ dir-300-b1 | \ dir-600-b1 | \ dir-600-b2 | \ 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 cfe5c62..ec03188 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds @@ -35,6 +35,12 @@ case $board in ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8" set_wifi_led "rt2800pci-phy0::radio" ;; + asl26555) + ucidef_set_led_default "power" "POWER" "asl26555:green:power" "1" + ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0" + set_wifi_led "asl26555:green:wlan" + set_usb_led "asl26555:green:3g" + ;; bc2) set_usb_led "bc2:blue:usb" ;; 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 49c4f7f..b3d87d2 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -63,6 +63,12 @@ ramips_setup_interfaces() ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ;; + asl26555) + ucidef_set_interface_lan "eth0.1" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t" + ;; + dir-645) ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" "1" "1" @@ -176,6 +182,10 @@ ramips_setup_macs() wan_mac=$(macaddr_add "$lan_mac" 1) ;; + asl26555) + lan_mac=$(mtd_get_mac_binary devdata 16388) + ;; + w306r-v20) lan_mac=$(mtd_get_mac_binary factory 4) wan_mac=$(macaddr_add "$lan_mac" 5) 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 d0309fd..7becaf7 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 @@ -34,6 +34,7 @@ preinit_set_mac_address() { mac=$(macaddr_setbit_la "$mac") ifconfig eth0 hw ether $mac 2>/dev/null ;; + asl26555 |\ dir-300-b1 |\ dir-300-b2 |\ dir-600-b1) diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 24823f6..c1355bc 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -66,6 +66,9 @@ ramips_board_detect() { *"Asus WL-330N3G") name="wl-330n3g" ;; + *"Alpha ASL26555") + name="asl26555" + ;; *"Aztech HW550-3G") name="hw550-3g" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 8954559..15c0007 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -22,6 +22,7 @@ platform_check_image() { all0239-3g | \ all0256n | \ all5002 | \ + asl26555 | \ bc2 | \ broadway | \ carambola | \ -- cgit v1.1