OpenWrt Forum Archive

Topic: Support for Ralink RT3052 Router (Aztech HW550-3G) - No Ethernet Yet

The content of this topic has been archived on 5 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

We have been working on adding support for the Aztech HW550-3G router (Ralink RT3052F SoC ramips).  It's a relatively new board with nice features: 384 MHz, 32 MB SDRAM, 8 MB flash, Ralink 2T2R Wireless N, 5 port 10/100 PHY + Gigabit MAC, USB 2.0 OTG, etc.  It is similar to other RT3052 routers such as the Fonera 2.0n, Buffalo WHR-G300N, D-Link DIR-615 Rev D1, Belkin F5D8235v2 and ASUS RT-N13U... most of which already have initial board support in OpenWrt (with functional ethernet and wifi, USB is a WIP).

I have a patch for initial board support (which I submitted to the developer mailing list - see below).  OpenWrt is running well with this patch, however we can't get the ethernet LAN/WAN to work.  Wireless works fine.

I believe the problem is the embedded switch (ramips_esw) is not properly initialized and/or configured.  The ethernet interface (eth0) appears to come up fine, but no connectivity with the switch and PHY LAN/WAN (see ifconfig below).

See this thread for the patch:
https://lists.openwrt.org/pipermail/ope … 09924.html

Any help, advice or suggestions is much appreciated.

Thanks,
Layne

Here is the serial at startup with outputs for ifconfig, cpuinfo, swconfig, etc:

U-Boot 1.1.3 (Dec 14 2008 - 16:34:00)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fac000
flash_protect ON: from 0xBF000000 to 0xBF02006F
protect on 0
protect on 1
protect on 2
protect on 3
protect on 4
protect on 5
protect on 6
protect on 7
protect on 8
protect on 9
flash_protect ON: from 0xBF030000 to 0xBF03FFFF
protect on 10
============================================
Ralink UBoot Version: 3.2
--------------------------------------------
ASIC 3052_MP2 (Port5<->None)
DRAM COMPONENT: 128Mbits
DRAM BUS: 32BIT
Total memory: 32 MBytes
Date:Dec 14 2008  Time:16:34:00
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

 ##### The CPU freq = 384 MHZ ####

 SDRAM bus set to 32 bit
 SDRAM size =32 Mbytes

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   9: Load Boot Loader code then write to Flash via TFTP.
 0

3: System Boot system code via Flash.
## Booting image at bf050000 ...
   Image Name:   MIPS OpenWrt Linux-2.6.36.4
   Created:      2011-03-03   0:32:13 UTC

 System Control Status = 0x00440000
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    816520 Bytes = 797.4 kB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32

Starting kernel ...

Linux version 2.6.36.4 (ledwards@OpenSuSE) (gcc version 4.3.3 (GCC) ) #1 Wed Mar 2 18:31:29 CST 2011
bootconsole [early0] enabled
CPU revision is: 0001964c (MIPS 24Kc)
Ralink RT3052   id:1 rev:2 running at 384.00 MHz
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line:  board=HW550-3G mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro2
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
Writing ErrCtl register=0002da90
Readback ErrCtl register=0002da90
Memory: 30000k/32768k available (1910k kernel code, 2768k reserved, 321k data, 144k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:48
console [ttyS1] enabled, bootconsole disabled
console [ttyS1] enabled, bootconsole disabled
Calibrating delay loop... 255.59 BogoMIPS (lpj=1277952)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
MIPS: machine is Aztech HW550-3G
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
msgmni has been set to 58
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
physmap platform flash device: 00800000 at bf000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022cb
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.1.
number of CFI chips: 1
6 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 6 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000030000 : "u-boot"
0x000000030000-0x000000040000 : "u-boot-env"
0x000000040000-0x000000050000 : "factory"
0x000000050000-0x000000120000 : "kernel"
0x000000120000-0x000000800000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=380000, len=480000
0x000000380000-0x000000800000 : "rootfs_data"
0x000000050000-0x000000800000 : "firmware"
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
Freeing unused kernel memory: 144k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
switching to jffs2
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
- init -

Please press Enter to activate this console. Compat-wireless backport release: compat-wireless-2011-01-31-4-g3
Backport based on wireless-testing.git master-2011-02-07
device eth0.1 entered promiscuous mode
device eth0 entered promiscuous mode
br-lan: port 1(eth0.1) entering forwarding state
br-lan: port 1(eth0.1) entering forwarding state
br-lan: received packet on eth0.1 with own address as source address
cfg80211: Calling CRDA to update world regulatory domain
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
cfg80211: World regulatory domain updated:
cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (471 buckets, 1884 max)
i2c /dev entries driver
ramips-wdt: timeout value 60 must be 0 < timeout < 33


BusyBox v1.17.3 (2011-02-20 22:19:19 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 ATTITUDE ADJUSTMENT (bleeding edge, r25643) ----------
  * 1/4 oz Vodka      Pour all ingredents into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------

root@OpenWrt:/# cat /proc/cpuinfo
system type             : Ralink RT3052   id:1 rev:2
machine                 : Aztech HW550-3G
processor               : 0
cpu model               : MIPS 24Kc V4.12
BogoMIPS                : 255.59
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
ASEs implemented        : mips16
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "factory"
mtd3: 000d0000 00010000 "kernel"
mtd4: 006e0000 00010000 "rootfs"
mtd5: 00480000 00010000 "rootfs_data"
mtd6: 007b0000 00010000 "firmware"

root@OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.4M      2.4M         0 100% /rom
tmpfs                    14.7M     68.0K     14.7M   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock5            4.5M    272.0K      4.2M   6% /overlay
mini_fo:/overlay          2.4M      2.4M         0 100% /

root@OpenWrt:/# free
              total         used         free       shared      buffers
  Mem:        30144        14616        15528            0         1712
 Swap:            0            0            0
Total:        30144        14616        15528

root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:210 (210.0 B)  TX bytes:402 (402.0 B)

eth0      Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:177 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:230 (230.0 B)  TX bytes:70323 (68.6 KiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:230 (230.0 B)  TX bytes:656 (656.0 B)

eth0.2    Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:69597 (67.9 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@OpenWrt:/# swconfig dev eth0 show
Failed to connect to the switch

root@OpenWrt:/# ls /dev
console             mtd4                network_throughput
cpu_dma_latency     mtd4ro              null
full                mtd5                ppp
kmsg                mtd5ro              ptmx
log                 mtd6                pts
mem                 mtd6ro              random
mtd0                mtdblock0           shm
mtd0ro              mtdblock1           tty
mtd1                mtdblock2           ttyS0
mtd1ro              mtdblock3           ttyS1
mtd2                mtdblock4           urandom
mtd2ro              mtdblock5           watchdog
mtd3                mtdblock6           zero
mtd3ro              network_latency

(Last edited by LinkZ on 9 Mar 2011, 01:01)

I managed to get the ethernet working by reverting the ramips eth/esw drivers (target/linux/ramips/files/drivers/net) to SVN r24328 (svn up -r 24328).  I haven't investigated further to see what the real problem is yet.  I got the hint from the D-Link DIR-615 support post:

https://forum.openwrt.org/viewtopic.php … 81&p=4

Anyone know more about this issue with the ramips eth/esw drivers?

Thanks,
Layne

Here's a patch to fix the VLANs on the HW550-3G.  Without it, only 3 LAN ports will work and no WAN.  Apparently the VLANs are hard-coded or derived somehow in the ramips_esw driver... and the defaults are incorrect for the HW550-3G.  There is currently no support for swconfig in ramips.  This is just a hack for HW550-3G, but it will work until we get swconfig support.

Index: target/linux/ramips/files/drivers/net/ramips_esw.c
===================================================================
--- target/linux/ramips/files/drivers/net/ramips_esw.c    (revision 24328)
+++ target/linux/ramips/files/drivers/net/ramips_esw.c    (working copy)
@@ -115,8 +115,12 @@
     rt305x_sysc_wr(0x0, 0x670); //GPIO41-GPIO50 output low
 
     /* set default vlan */
-    ramips_esw_wr(0x2001, 0x50);
-    ramips_esw_wr(0x504f, 0x70);
+    ramips_esw_wr(0x2001, 0x50);    // VLAN Identifier: VLAN 0 = ethx.1; VLAN 1 = ethx.2
+    ramips_esw_wr(0x003f, 0xe4);    // Enable VLAN Double Tag
+    ramips_esw_wr(0x1002, 0x40);
+    ramips_esw_wr(0x1001, 0x44);
+    ramips_esw_wr(0x1001, 0x48);
+    ramips_esw_wr(0x415e, 0x70);    // VLAN Member Ports: VLAN 0 = 1 2 3 4 6*; VLAN 1 = 0 6*
 
     return 0;
 }

The patch in the following ticket fixes ethernet for the Aztech HW550-3G (i.e. instead of reverting to SVN r24328).  You will still need to hard-code the VLANs though, until there is swconfig support in ramips_esw.

https://dev.openwrt.org/ticket/9071

Hi

Just wondering if anyone's got an img that we can use to get openwrt running on this board?

Have a Belkin F5D8235 which we want to install on.

Many thanks

Jenny

Hi, I just got this router and I'd like to test OpenWrt on it. Can you please provide me some hints on how to compile/install the OpenWrt on it? this is the first time I perform this operation and I don't know how to start or where to get informations...
Thank you in advance smile

how do you flash on hw550-3g? serial cable is mandatory?

The web interface will not accept the image, so you must flash manually from the CLI using sysupgrade or mtd.  Or you can use a serial cable and flash from u-boot.

Regards,
Layne

Need help here!!! Bricked the firmware while updating. What kind of cable needed to connect to serial?

Hi,

alright, being careless i have fried my bootloader and bricked the device - most probably for good. There's not really much to find about the de-bricking the unit, so if anybody has a clue on how to proceed with the JTAG'ing, especially software wise, kindly support. I guess I am not alone, reading previous posts.

I have taken a closeup of the board here: http://imageshack.us/photo/my-images/14/cimg2329dt.jpg/. In the lower right corner of the board is what appears to be the 14 pin JTAG interface. I will do some more researching, any hint, help or support would be awesome....

Thanks!!

Hi All,
Is there an image for the ASUS DSL-N13 ADSL router ?? it has a ralink processor same as above with 4 mb ram and 32 mb ram

# cat /proc/cpuinfo
system type             : Ralink SoC
processor               : 0
cpu model               : MIPS 24K V4.12
BogoMIPS                : 212.99
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes
ASEs implemented        : mips16 dsp
VCED exceptions         : not available
VCEI exceptions         : not available

Hi folks. Week ago I succesfully flashed my DIR-300 rev.B3 with custom firmware has been built from trunk. It works like a charm but except switch 'cause I missed kmod's for RT305x switch and now have only eth0, eth0.1, eth0.2 (swconfig dev eth0 help reports "Failed to connect to the switch"). Now I have only ssh access to the box, and it will take several hours to go into the place where device installed. Thus I tried to build appropriate modules (swconfig.ko, rtl8366_smi.ko, rtl8366s.ko, rtl8366rb.ko) and load them into running kernel but it took no effect. Does it mean hardware issue or m.b. switch only could be initialized while kernel boots up and reflashing proper image will help?
Thanks in advance.

123serge123 wrote:

There exists patch http://patchwork.openwrt.org/patch/2159/ for support of rt305x internal switch. And current vlan 1,2 are hardcoded in driver.

Thanks for the patch, will try it this weekend. I'd already thought to hardcode my vlans but it's a way of last resort I'd better like to avoid smile

That's what I need, it works. I reflashed it via emergency room 'cause after sysupgrade with new image I couldn't connect to the device.

The discussion might have continued from here.