Discussion:
[OpenWrt-Devel] WD MyNet N750: ar9344 + ar8327 switch, unclear on phy/mdio/mac wiring
Jay Carlson
2013-10-22 16:04:25 UTC
Permalink
Since Newegg has dropped the price on the 3T3R Western Digital N750 Atheros wasp/S17 entry to $30, I expect some more interest in this standard-looking ar9344 + ar8327 platform. I've got a couple of n750s lying around, but I haven't made any progress on getting the gigabit switch connected up to the on-chip Ethernet.

There's GPL source code for these "Project Seattle" platforms, and N600 support is in trunk. This helps, but the N600 uses the ar934x internal switch which is rather different from the gigabit NAT switch in these. There's GPL source for the N600 and N750 from WD, and it's in fairly good shape, but unfortunately the switch configuration is performed in scripts and/or a binary ag71xx driver.

I think I should be able to imitate other ar934x+ar8327 devices, but I think I'm missing some concept, or I need to read some device state out of a stock device in order to replicate it. In the bootloader the ar8327 switch works, but I don't have bootloader source, and one of the last things the bootloader seems to do before boot is shut down the switch. (Perhaps this is to keep Linux from seeing anything from the net until the firewall is up.) And the interaction of MACs, PHYs and mdio buses makes my head hurt.

One thing I do see is a bunch of phy_id garbage on mdio0:10-17 and six phy_ids of the ar8327 on mdio1:00-05. My *guess* is that ag71xx.0 is connected directly to port 0 of the ar8327 like the other wasp/s17 devices, but mdio1 is used instead of mdio0. I've made it as far as ag71xx.0 coming up in multi mode, but I seem to get the generic PHY instead of ar8327 despite the phy_ids matching up (and with what I think is a correct boardinfo.)

(Also, something seems messed up with the openwrt firstboot squashfs split code: on the next reboot, the bootloader looks at the seama partition info and declares the kernel to not only be corrupt, but to have a non-ASCII md5sum. That kind of thing I feel competent to solve but there is little point if I can't get the wired ethernet up.)

Does the switch setup problem sound familiar? I can back out all my printk garbage and post my (clueless) board setup code if it would help. I can mail a box to somebody who's worked with ar934x, although I've never mailed hardware outside this country (US) except for work.

Jay Carlson
***@nop.com
Felix Kaechele
2013-10-22 22:34:34 UTC
Permalink
As I ordered 10 of these devices for a project I'm definitely interested
in getting this to work.

Will probably also look into this as soon as I have my devices.

- Felix
Jacek Kikiewicz
2013-10-23 13:08:20 UTC
Permalink
Hi,

There is a topic in openwrt forum:
https://forum.openwrt.org/viewtopic.php?id=46864 about porting to this
router.
Would you mind to update it a bit with your progress, please?
It would be easier to track for interested parties.

Thanks!
Post by Jay Carlson
Since Newegg has dropped the price on the 3T3R Western Digital N750 Atheros wasp/S17 entry to $30, I expect some more interest in this standard-looking ar9344 + ar8327 platform. I've got a couple of n750s lying around, but I haven't made any progress on getting the gigabit switch connected up to the on-chip Ethernet.
There's GPL source code for these "Project Seattle" platforms, and N600 support is in trunk. This helps, but the N600 uses the ar934x internal switch which is rather different from the gigabit NAT switch in these. There's GPL source for the N600 and N750 from WD, and it's in fairly good shape, but unfortunately the switch configuration is performed in scripts and/or a binary ag71xx driver.
I think I should be able to imitate other ar934x+ar8327 devices, but I think I'm missing some concept, or I need to read some device state out of a stock device in order to replicate it. In the bootloader the ar8327 switch works, but I don't have bootloader source, and one of the last things the bootloader seems to do before boot is shut down the switch. (Perhaps this is to keep Linux from seeing anything from the net until the firewall is up.) And the interaction of MACs, PHYs and mdio buses makes my head hurt.
One thing I do see is a bunch of phy_id garbage on mdio0:10-17 and six phy_ids of the ar8327 on mdio1:00-05. My *guess* is that ag71xx.0 is connected directly to port 0 of the ar8327 like the other wasp/s17 devices, but mdio1 is used instead of mdio0. I've made it as far as ag71xx.0 coming up in multi mode, but I seem to get the generic PHY instead of ar8327 despite the phy_ids matching up (and with what I think is a correct boardinfo.)
(Also, something seems messed up with the openwrt firstboot squashfs split code: on the next reboot, the bootloader looks at the seama partition info and declares the kernel to not only be corrupt, but to have a non-ASCII md5sum. That kind of thing I feel competent to solve but there is little point if I can't get the wired ethernet up.)
Does the switch setup problem sound familiar? I can back out all my printk garbage and post my (clueless) board setup code if it would help. I can mail a box to somebody who's worked with ar934x, although I've never mailed hardware outside this country (US) except for work.
Jay Carlson
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Felix Kaechele
2013-10-26 19:45:53 UTC
Permalink
Okay. I did some more research on this.

Good news is: I got the switch working. Also the network setup with
separate VLANs for LAN/WAN is working.

Bad news: It's a manual process and requires serial access.

Here's how it works:
- Install OpenWRT image (for example through the emergency HTTP interface)
- During boot interrupt the bootloader (before it reaches the timeout)
(note how the LEDs on the Switch turn back on)
- Enter "boot" to boot OpenWRT from flash

The switch should now be in a working state.

Unfortunately I was not yet able to determine what it takes to bring the
switch back to life after the bootloader disabled it and before the
driver tries to probe it.

I requested the u-boot source code (that obviously can enable and
disable the switch) from both WD (the vendor) and Alpha Networks (the
producer). I hope something turns up from there.

I disassembled the athrs_gmac.ko module from the GPL code drop of WD. It
seems that the function ar934x_gmac_attach is calling
ath_gpio_config_output. Interestingly this is not found in the code
drops of the Fritz!Box 7270, which has the source for this module.
So I believe it has something to do with GPIOs at some point.
I noticed that GPIO4 toggles itself all the time. But I have no idea
what this is.

In the meantime I'm hopeful that someone else might have another idea on
how to get this working.

- Felix
Felix Kaechele
2013-10-26 19:59:19 UTC
Permalink
Oh, I forgot to attach the patch I use for testing.

Here it is!

- Felix
Chirag Chhatriwala
2013-11-12 18:28:06 UTC
Permalink
Were there any working patches to enable support for this router on trunk?
I just bought this device because of the 3x3 802.11an support.
I can test out firmware as well. (I believe this board comes with a serial
console populated).

Thanks.
Post by Felix Kaechele
Oh, I forgot to attach the patch I use for testing.
Here it is!
- Felix
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Felix Kaechele
2013-11-29 10:41:25 UTC
Permalink
Bootloader code has been published as per my request.

You can find it here:
http://support.wdc.com/product/download.asp?groupid=1702&sid=178&lang=en

Now we just need to find where they broke it :)

- Felix
Chirag Chhatriwala
2013-12-06 15:15:57 UTC
Permalink
Are there any plans to look at the bootloader and figure out where the PHY
+ MDIO breaks ? I'm too eager to flash OpenWrt on this device.
I would like to dump my buffalo n600 device as soon as this device becomes
functional.

Thanks,
cchhat01
Post by Felix Kaechele
Bootloader code has been published as per my request.
You can find it here: http://support.wdc.com/product/download.asp?groupid=
1702&sid=178&lang=en
Now we just need to find where they broke it :)
- Felix
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Loading...