Topic: AR8316 Switch Support

Could someone summarize the current status of support/development for the Atheros 8316 Gigbit Ethernet switch? I understand these are used in both the RB-450G and the RouterStation Pro and as a new RouterStation Pro owner I'm interested in doing what I can to get support for this switch.

Re: AR8316 Switch Support

I assume that the silence means no one has any idea about what's going on. Is there some way I could assist a developer in getting AR8316 support? Someone I could contact about it?

Re: AR8316 Switch Support

I am also interested in driver support for the Routerstation Pro. If someone could provide some initial direction I would be happy to push forward with the development.

Re: AR8316 Switch Support

I tried emailing Felix who wrote the 8216 (non-gigabit) Atheros switch driver to see how I could help and received no response. I'm not really a developer but I'm willing to do what I can to support getting the 8316 switch supported (it is also used in the Routerboard 450G and a couple other devices). I thinking that one possibility would be to see if Atheros is willing to release the SDK to someone who could work on the switch control software. An example of the driver for the 8216 switch can be found at https://dev.openwrt.org/browser/trunk/target/linux/generic-2.6/files/drivers/net/phy/ar8216.h and I would imagine the 8316 would be fairly similar.

5 (edited by mtadeu 2009-11-08 23:49:46)

Re: AR8316 Switch Support

Maybe the Unex guys can help us: the RNRA-83 uses 8326 and the OS is linux based.
This link have an simplified block diagram
http://www.unex.com.tw/product/rnra-83
the ftp.unex.com.tw have some (old) drivers. I not see the new RNRA-83.

6 (edited by russo. 2009-12-08 00:05:07)

Re: AR8316 Switch Support

check out this thread on the RB450G, i posted a patch that i got from MikroTik which should give us some support.

https://forum.openwrt.org/viewtopic.php?id=22759

Re: AR8316 Switch Support

I googled a bit, and found the following other devices have the ar8316:

* D-Link DIR-655 RevB
  Not linux based
* TRENDNet TEW 673GR
  Not out yet, therefore no firmware/sources to get.
* CC&C WA-6208-V1/V2
  According to ToH, but these devices do not exist on the manufacturer's homepage.

The following device does not seem to have it, despite some claims in (p)reviews:
* D-Link DIR-825 RevB
the gpl source .config contains the line
    CONFIG_RTL8366SR_PHY=y
which suggests its an realtek switch, and the ag7100_mod.ko contains many rtl*-symbols.

I really hope we'll find a router with the chip and a linux firmware, so we get at least a binary module. With a binary module somebody could sacrifice himself and reverse engineer it for others to implement.

Re: AR8316 Switch Support

KanjiMonster, i can't imagine that it will be completely binary. I reckon we just need some documentation from atheros and then it will just be a matter of adjusting the existing ar8216 implementation.

Re: AR8316 Switch Support

Any progress on the  ar8316 chip support ?  anyone ?
If I had the tech-docs for the chip  I'd give it a shot myself.

Jay

Re: AR8316 Switch Support

i got some documentation (under NDA) from Atheros, I'm seeing what can be done with it. I'm still not completely sure if there is enough documentation for what needs to be done. I haven't had a chance to look at it in detail. I got some GPL snippet's from Atheros also, which i reckon i could upload somewhere, but i want to consult with someone before i get in trouble wink

Unfortunately, I'm also not entirely sure how much i will need to change in the 8216 driver, but definately looks like the 8316 is VERY similar to the 8216. I'm out over the holidays, I hope to start playing around a bit more in the new year.

Re: AR8316 Switch Support

Russo;

Excellent;  drop me a note if you need a hand ... and once you've figured out what you can and can not say given the NDA.
If there a contact at  Atheros that I could email to get myself under the same NDA ?   That may help speed things along.

Cheers

Jay

Re: AR8316 Switch Support

Russo,

excellent news, let me know if you need some help, I have some spare RB450G ready to test.

Re: AR8316 Switch Support

lorenzo.allegrucci wrote:

Russo,

excellent news, let me know if you need some help, I have some spare RB450G ready to test.

Do we have any news from this?

14 (edited by russo. 2010-01-13 12:12:05)

Re: AR8316 Switch Support

I have some exams to study for in mid-Feb, afterwards KanjiMonster and I will attempt to work on this. He has an RS Pro, i have an RB450G. Unfortunately the 450G still suffers from the interface initialization issues, that prevent it from bringing up even the non-switched interface. Hopefully this can be solved by looking at what the RS Pro does, or taking a look at Mikrotik's FW.

From what I've seen so far it seems like the ar8216 module just needs to be expanded to support gigabit speeds and rgmii, so far it looks like everything is doable, we just need some free time wink

Edit: s/ar8216 interface/ar8216 module

Re: AR8316 Switch Support

russo. wrote:

I have some exams to study for in mid-Feb, afterwards KanjiMonster and I will attempt to work on this. He has an RS Pro, i have an RB450G. Unfortunately the 450G still suffers from the interface initialization issues, that prevent it from bringing up even the non-switched interface. Hopefully this can be solved by looking at what the RS Pro does, or taking a look at Mikrotik's FW.

From what I've seen so far it seems like the ar8216 module just needs to be expanded to support gigabit speeds and rgmii, so far it looks like everything is doable, we just need some free time wink

Edit: s/ar8216 interface/ar8216 module

I have one 450G on my hand, but I do not own the AR8316 datasheet. Is it possible to create a header file now based on the datasheet on your hand so that I can debug on my platform with it?

Re: AR8316 Switch Support

If any tests need to be done, contact me plz, i got two 450g´s and i´m in need to get those running on owrt wink

Re: AR8316 Switch Support

s3ns1 wrote:

If any tests need to be done, contact me plz, i got two 450g´s and i´m in need to get those running on owrt wink

Congrats, great collaboration!

Re: AR8316 Switch Support

Russo,

Who did you contact at Atheros to get the NDA?

I would like to contact them about the same issue ;-)

Thanks,
rabinnh

Re: AR8316 Switch Support

I have one RouterStation Pro as well and SmartBits. Russo, let me know if you need my help on testing. Thanks

Re: AR8316 Switch Support

I would also be willing to supply 1 - 2 RouterStation Pro units to help support this development. I would also be willing to work on this development if someone gave me some initial direction.

Re: AR8316 Switch Support

paulCutler wrote:

I would also be willing to supply 1 - 2 RouterStation Pro units to help support this development. I would also be willing to work on this development if someone gave me some initial direction.

I didn't understand sth. If this development project  complete with success, the 3 swithc ports will work as separrate lan interfaces, or they will continue to work as switch-vlan?

Re: AR8316 Switch Support

A little more info; I have both an RS Pro and a RB450G. 

The RS Pro initializes the AR8316 in Redboot first thing:

+                                                                               
AR8316 PHY found on MAC0                                                       
AR8316 PHY found on MAC1                                                       
Ethernet eth0: MAC address 00:15:6d:c1:3b:fb                                   
IP: 192.168.1.20/255.255.255.0, Gateway: 0.0.0.0                               
Default server: 0.0.0.0                                                         
                                                                               
RedBoot(tm) bootstrap and debug environment [ROMRAM]                           
Ubiquiti Networks certified release, version 0.9.00318M.0905121200 - built 12:09
                                                                               
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.                       
                                                                               
Board: Ubiquiti RouterStation PRO                                               
Arch: ar7100pro                                                               
  RAM: 0x80000000-0x88000000, [0x8003bf00-0x87fe1000] available                 
Flash: 0xbf000000-0xc0000000, in 256 blocks of 0x00010000 bytes each           
== Executing boot script in 1.000 seconds - enter ^C to abort 

OpenWrt then mostly works.

The same OpenWrt image does not work on the RB450G, even though the hardware is virtually identical because (apparently), Mikrotik's RouterBoot initializes the hardware differently and then RouterOS must do some stuff on its own.

When you use network boot to boot the RB450G, RouterBoot seems to configure the switch for DHCP and off you go.  What we need for the RB450G is to figure out what the initialization code is that sets the switch in a state so that OpenWrt can run with it.

Re: AR8316 Switch Support

bekiaris wrote:
paulCutler wrote:

I would also be willing to supply 1 - 2 RouterStation Pro units to help support this development. I would also be willing to work on this development if someone gave me some initial direction.

I didn't understand sth. If this development project  complete with success, the 3 swithc ports will work as separrate lan interfaces, or they will continue to work as switch-vlan?

As far as I know chipset AR7161 has only two ethernet interfaces by it selfs -- eth0 and eth1. RB450G (and RB750G too) has AR7161 chip and AR8316 integrated into one board. eth0 is directly connected to Eth1/PoE of RB450G and eth1 is connected with internal port of the AR8316. So in a best case we can get only two real ethernet interfaces or one real and 4 vlan'ed ports or several vlans or etc.

At this time switch does not work in openwrt. So we can not use eth1 at all.

Re: AR8316 Switch Support

Just to clarify a little (this is my understanding, please let me know if I am wrong)... the switch works (RouterStation Pro at least) you just can not manage the switch. In my system with the RouterStation Pro all of the ports that are exposed from the switch work and they operate like a dumb switch is connected to the eth1 interface. If you check the status of the eth1 interface it always states that it is 'up', because it is connected to the AR8316 switch. You can not get the status of the external ports because we can not access the ship.

I think that we would like to be able to configure the switch so that we can read back the status of the individual ports as well as provide the ability to configure the features of the chip (VLANs and such). In openwrt we could then map these VLAN interfaces to make it appear that they are 'real' ports instead of switched ports.

Re: AR8316 Switch Support

Exactly true, Paul.  I was just pointing out that on the RB450G, you can't even use a port if you boot from flash because the switch isn't initialized at all.  So there are two issues:

1) On RB450G (and other RouterBoards with the AR8316), get ANY standalone functionality so it is at least up to the functional level of the RS Pro.

2) On ALL platforms, get full switch capability.

I guess my point is that even if a new switch driver is works perfectly for the RS Pro, it won't help anybody with an RB450G until the initialization issue is resolved. Obviously this can be done because RouterOS does it.

So UBNT initializes the switch in Redboot for use by the kernel, and Mikrotik does something in the kernel itself.