ramips: Add Alpha ASL-26555 support.
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 <estebanjbs@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Patchwork: http://patchwork.openwrt.org/patch/3571/ Acked-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36433 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
a5c6468744
commit
77dd775839
|
@ -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"
|
||||
;;
|
||||
|
|
|
@ -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 | \
|
||||
|
|
|
@ -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"
|
||||
;;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -66,6 +66,9 @@ ramips_board_detect() {
|
|||
*"Asus WL-330N3G")
|
||||
name="wl-330n3g"
|
||||
;;
|
||||
*"Alpha ASL26555")
|
||||
name="asl26555"
|
||||
;;
|
||||
*"Aztech HW550-3G")
|
||||
name="hw550-3g"
|
||||
;;
|
||||
|
|
|
@ -22,6 +22,7 @@ platform_check_image() {
|
|||
all0239-3g | \
|
||||
all0256n | \
|
||||
all5002 | \
|
||||
asl26555 | \
|
||||
bc2 | \
|
||||
broadway | \
|
||||
carambola | \
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
/dts-v1/;
|
||||
|
||||
/include/ "rt3050.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "ASL26555", "ralink,rt3050-soc";
|
||||
model = "Alpha ASL26555";
|
||||
|
||||
palmbus@10000000 {
|
||||
sysc@0 {
|
||||
ralink,pinmux = "spi", "mdio", "uartlite", "sdram", "rgmii";
|
||||
ralink,gpiomux = "i2c", "jtag";
|
||||
ralink,uartmux = "gpio";
|
||||
ralink,wdtmux = <1>;
|
||||
};
|
||||
|
||||
gpio0: gpio@600 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
spi@b00 {
|
||||
status = "okay";
|
||||
m25p80@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "s25sl12801";
|
||||
reg = <0 0>;
|
||||
linux,modalias = "m25p80", "s25sl12801";
|
||||
spi-max-frequency = <10000000>;
|
||||
|
||||
partition@0 {
|
||||
label = "uboot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
partition@30000 {
|
||||
label = "uboot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
partition@50000 {
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xf80000>;
|
||||
};
|
||||
partition@fd0000 {
|
||||
label = "cert";
|
||||
reg = <0xfd0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
partition@fe0000 {
|
||||
label = "langpack";
|
||||
reg = <0xfe0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
partition@ff0000 {
|
||||
label = "devdata";
|
||||
reg = <0xff0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ethernet@10100000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
esw@10110000 {
|
||||
status = "okay";
|
||||
ralink,portmap = <0x1e>;
|
||||
};
|
||||
|
||||
wmac@10180000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
otg@101c0000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gpio-keys-polled {
|
||||
compatible = "gpio-keys-polled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
poll-interval = <20>;
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio0 10 0>;
|
||||
linux,code = <0x198>;
|
||||
};
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio0 12 0>;
|
||||
linux,code = <0x211>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
eth {
|
||||
label = "asl26555:green:eth";
|
||||
gpios = <&gpio0 0 1>;
|
||||
};
|
||||
wan-red {
|
||||
label = "asl26555:red:wan";
|
||||
gpios = <&gpio0 1 0>;
|
||||
};
|
||||
wan-green {
|
||||
label = "asl26555:green:wan";
|
||||
gpios = <&gpio0 2 0>;
|
||||
};
|
||||
wlan {
|
||||
label = "asl26555:green:wlan";
|
||||
gpios = <&gpio0 7 0>;
|
||||
};
|
||||
power-green {
|
||||
label = "asl26555:green:power";
|
||||
gpios = <&gpio0 8 0>;
|
||||
};
|
||||
power-red {
|
||||
label = "asl26555:red:power";
|
||||
gpios = <&gpio0 9 0>;
|
||||
};
|
||||
3g-green {
|
||||
label = "asl26555:green:3g";
|
||||
gpios = <&gpio0 14 1>;
|
||||
};
|
||||
3g-red {
|
||||
label = "asl26555:red:3g";
|
||||
gpios = <&gpio0 17 1>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -0,0 +1,133 @@
|
|||
/dts-v1/;
|
||||
|
||||
/include/ "rt3050.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "ASL26555", "ralink,rt3050-soc";
|
||||
model = "Alpha ASL26555";
|
||||
|
||||
palmbus@10000000 {
|
||||
sysc@0 {
|
||||
ralink,pinmux = "spi", "mdio", "uartlite", "sdram", "rgmii";
|
||||
ralink,gpiomux = "i2c", "jtag";
|
||||
ralink,uartmux = "gpio";
|
||||
ralink,wdtmux = <1>;
|
||||
};
|
||||
|
||||
gpio0: gpio@600 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
spi@b00 {
|
||||
status = "okay";
|
||||
m25p80@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "s25sl064p";
|
||||
reg = <0 0>;
|
||||
linux,modalias = "m25p80", "s25sl064p";
|
||||
spi-max-frequency = <10000000>;
|
||||
|
||||
partition@0 {
|
||||
label = "uboot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
partition@30000 {
|
||||
label = "devdata";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
partition@40000 {
|
||||
label = "rgdb";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
partition@50000 {
|
||||
label = "firmware";
|
||||
reg = <0x50000 0x790000>;
|
||||
};
|
||||
partition@7e0000 {
|
||||
label = "cert";
|
||||
reg = <0x7e0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
partition@7f0000 {
|
||||
label = "langpack";
|
||||
reg = <0x7f0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ethernet@10100000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
esw@10110000 {
|
||||
status = "okay";
|
||||
ralink,portmap = <0x1e>;
|
||||
};
|
||||
|
||||
wmac@10180000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
otg@101c0000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gpio-keys-polled {
|
||||
compatible = "gpio-keys-polled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
poll-interval = <20>;
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio0 10 0>;
|
||||
linux,code = <0x198>;
|
||||
};
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio0 12 0>;
|
||||
linux,code = <0x211>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
eth {
|
||||
label = "asl26555:green:eth";
|
||||
gpios = <&gpio0 0 1>;
|
||||
};
|
||||
wan-red {
|
||||
label = "asl26555:red:wan";
|
||||
gpios = <&gpio0 1 0>;
|
||||
};
|
||||
wan-green {
|
||||
label = "asl26555:green:wan";
|
||||
gpios = <&gpio0 2 0>;
|
||||
};
|
||||
wlan {
|
||||
label = "asl26555:green:wlan";
|
||||
gpios = <&gpio0 7 0>;
|
||||
};
|
||||
power-green {
|
||||
label = "asl26555:green:power";
|
||||
gpios = <&gpio0 8 0>;
|
||||
};
|
||||
power-red {
|
||||
label = "asl26555:red:power";
|
||||
gpios = <&gpio0 9 0>;
|
||||
};
|
||||
3g-green {
|
||||
label = "asl26555:green:3g";
|
||||
gpios = <&gpio0 14 1>;
|
||||
};
|
||||
3g-red {
|
||||
label = "asl26555:red:3g";
|
||||
gpios = <&gpio0 17 1>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -269,6 +269,18 @@ Image/Build/Profile/ALL5002=$(call BuildFirmware/CustomFlash/$(1),$(1),all5002,A
|
|||
argus_atp52b_mtd_size=7995392
|
||||
Image/Build/Profile/ARGUS_ATP52B=$(call BuildFirmware/CustomFlash/$(1),$(1),argus_atp52b,ARGUS_ATP52B,$(argus_atp52b_mtd_size))
|
||||
|
||||
asl26555_8mb_mtd_size=7929856
|
||||
asl26555_16mb_mtd_size=16252928
|
||||
define BuildFirmware/ASL26555/squashfs
|
||||
$(call BuildFirmware/CustomFlash/$(1),$(1),$(2)-8M,$(3)-8M,$(asl26555_8mb_mtd_size))
|
||||
$(call BuildFirmware/CustomFlash/$(1),$(1),$(2)-16M,$(3)-16M,$(asl26555_16mb_mtd_size))
|
||||
endef
|
||||
define BuildFirmware/ASL26555/initramfs
|
||||
$(call BuildFirmware/OF/initramfs,$(1),$(2)-8M,$(3)-8M)
|
||||
$(call BuildFirmware/OF/initramfs,$(1),$(2)-16M,$(3)-16M)
|
||||
endef
|
||||
Image/Build/Profile/ASL26555=$(call BuildFirmware/ASL26555/$(1),$(1),asl26555,ASL26555)
|
||||
|
||||
Image/Build/Profile/BC2=$(call BuildFirmware/Default8M/$(1),$(1),bc2,BC2)
|
||||
|
||||
broadway_mtd_size=7929856
|
||||
|
@ -425,6 +437,7 @@ define Image/Build/Profile/Default
|
|||
$(call Image/Build/Profile/ALL0256N,$(1))
|
||||
$(call Image/Build/Profile/ALL5002,$(1))
|
||||
$(call Image/Build/Profile/ARGUS_ATP52B,$(1))
|
||||
$(call Image/Build/Profile/ASL26555,$(1))
|
||||
$(call Image/Build/Profile/BC2,$(1))
|
||||
$(call Image/Build/Profile/BROADWAY,$(1))
|
||||
$(call Image/Build/Profile/CARAMBOLA,$(1))
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# Copyright (C) 2013 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
define Profile/ASL26555
|
||||
NAME:=Alpha ASL26555
|
||||
PACKAGES:=\
|
||||
kmod-usb-core kmod-usb-rt305x-dwc_otg \
|
||||
kmod-ledtrig-usbdev
|
||||
endef
|
||||
|
||||
define Profile/ASL26555/Description
|
||||
Package set for Alpha ASL26555
|
||||
endef
|
||||
|
||||
$(eval $(call Profile,ASL26555))
|
Loading…
Reference in New Issue