Add Wireless Support for GR7000 There is an issue though, the Ralink Wireless EEPROM exist as a file in the original rootfs, it is not found in its own partition but can be found as a bin file in the /tmp/ directory. My approach is to use the file and carve up a new Wireless Partition called "board_config" and modify Ralink EEPROM Script function to find and extract the partition Fix Network Support, this Lantiq does not have XDSL so add a bypass to the DSL calling function just for this board Mac Address can only be found by using uboot_config information DTS Fixes -Both USB Ports are now working -The original partitions are defined wrongly the size is 8MB -The uboot_config partition is at the end of the flash not the second partition tested by using the saveenv function
There are some issues with the switch but it is not a driver issue TX Packets and RX Packets can be seen in the MiB swconfig dev switch show so I suspect it is a network config issue. Signed-off-by: Lim Guo Wei <alphasp...@gmail.com> --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -41,6 +41,9 @@ case "$FIRMWARE" in ARV7525PW) rt2x00_eeprom_extract "board_config" 1040 512 0 ;; + GR7000) + rt2x00_eeprom_extract "board_config" 0 512 0 + ;; *) rt2x00_eeprom_die "board $board is not supported yet" ;; --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network @@ -128,8 +128,12 @@ DGN3500*) ;; GR7000) - ucidef_set_interface_wan "eth0" - uci set network.lan.ifname='' + lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) + wan_mac=$(macaddr_add "$lan_mac" 3) + ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4" + ucidef_add_switch_vlan "switch0" "2" "0t 5" ;; H201L) @@ -167,13 +171,23 @@ BTHOMEHUBV2B) ;; esac -[ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload" +board=$(lantiq_board_id) + +case "$board" in -if [ -n "$(grep "system type.*: VR9" /proc/cpuinfo)" ]; then - set_vdsl_modem "$annex" "/lib/firmware/vdsl.bin" "av" "ptm" -else - set_adsl_modem "$annex" "/lib/firmware/adsl.bin" -fi +GR7000) + ;; + +*) + [ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload" + + if [ -n "$(grep "system type.*: VR9" /proc/cpuinfo)" ]; then + set_vdsl_modem "$annex" "/lib/firmware/vdsl.bin" "av" "ptm" + else + set_adsl_modem "$annex" "/lib/firmware/adsl.bin" + fi + ;; +esac [ -n "$lan_mac" ] && ucidef_set_interface_macaddr lan $lan_mac [ -n "$wan_mac" ] && ucidef_set_interface_macaddr wan $wan_mac --- a/target/linux/lantiq/base-files/etc/uci-defaults/03_wireless-wps +++ b/target/linux/lantiq/base-files/etc/uci-defaults/03_wireless-wps @@ -8,7 +8,7 @@ set_wps() { board=$(lantiq_board_id) case $board in -WBMR) +WBMR|GR7000) config_load wireless config_foreach set_wps wifi-iface uci commit wireless --- a/target/linux/lantiq/dts/GR7000.dts +++ b/target/linux/lantiq/dts/GR7000.dts @@ -18,7 +18,7 @@ nor-boot@0 { compatible = "lantiq,nor"; bank-width = <2>; - reg = <0 0x0 0x2000000>; + reg = <0 0x0 0x800000>; #address-cells = <1>; #size-cells = <1>; @@ -29,16 +29,24 @@ }; partition@20000 { - label = "uboot_env"; - reg = <0x20000 0x10000>; + label = "firmware"; + reg = <0x20000 0x7b0000>; + }; + + partition@7e0000 { + label = "board_config"; + reg = <0x7e0000 0x10000>; read-only; }; - partition@30000 { - label = "firmware"; - reg = <0x30000 0x7d0000>; + partition@7f0000 { + label = "uboot_env"; + reg = <0x7f0000 0x10000>; + read-only; }; + }; + }; gpio: pinmux@E100B10 { @@ -72,6 +80,13 @@ ifxhcd@E101000 { status = "okay"; + gpios = <&gpio 5 0 + &gpio 14 0>; + lantiq,portmask = <0x3>; + }; + + etop@E180000 { + phy-mode = "rgmii"; }; pci@E105400 { @@ -89,6 +104,11 @@ }; }; + ralink_eep { + compatible = "ralink,eeprom"; + ralink,eeprom = "RT2860.eeprom"; + }; + gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; --- a/target/linux/lantiq/xway/profiles/aztech.mk +++ b/target/linux/lantiq/xway/profiles/aztech.mk @@ -2,6 +2,7 @@ define Profile/GR7000 NAME:=Aztech GR7000 PACKAGES:= \ kmod-ltq-deu-ar9 kmod-ltq-hcd-ar9 \ + kmod-rt2800-pci wpad \ swconfig endef $(eval $(call Profile,GR7000)) _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel