This router has two switches. Built-in SoC (bcm53012) and external (bcm53125). These serve 8 physical lan ports and 1 wan port on the router.
The built-in switch is detected and can be programmed, however the external one isn't detected.
3 out of 8 lan ports are wired to internal switch and rest 5 are wired to external. I found out this by doing a "robo reset" of gpio pin #10. Which made 5 ports not usable. Rebooting the router enables them again.
I'm trying to figure out a way to access the external switch and configure it. Any ideas?
a related patch on patchwork with possibly interesting info http://patchwork.ozlabs.org/patch/659757/
Thanks. I thought I did go thru this patch 2 days a go. But now I read it again, this could be it. Let me try it out.
On second thought, If the chip isn't detected, the patch won't be of any use. In any case, I'll give it a shot and confirm.
I confirm that it did not help. Thanks.
I've spent another month on this. And I have gathered several important bits from GPL source.
- MDIO exists at 0x18003000 (4 bytes mgt and 4 bytes ctrl) (@rmilecki's recent patch confirms this)
- BIT 9 of the mgt register needs to be set for accessing external phys (our external 53125)
- GPIO MUX exists at 0x1800c1c0 (4 byte reg). Bits 6 (mdc) and 7 (mdio) are needed to enable CCB MII function.
- GPIO mux also controls
- UART1 (CCA @ 0x400) - Bits 12, 13, 14, 15
- UART2 (CCB UART0 @ 0x8000) Bits 16, 17
- I2S XTAL OUT Bit 18
- SPI Bits 0, 1, 2, 3
- I2C Bits 4,5
This appears to have semblance to nsp pinmux
Above information should allow us to communicate with external switch via mdio -> external bit -> gpio mux -> 53125. This is how the GPL source does it. I haven't been able to do this with LEDE unfortunately. It appears to have two levels of muxing happening.
Also, both 0x18003000 and 0x1800c000 are mapped/used by usb2-phy and usb3-phy nodes. I think some how this mapping in current bcm5310x.dtsi is incorrect. But my understanding limited and can only go so far.
I'll keep digging, although soon I'll have less time to spend on this
I have been able to successfully detect both switches now using DSA driver and DTS changes. The problem now is that, LEDE (non-DSA b53 driver) creates switchX devices and are automatically setup by LEDE. DSA does not create switchx devices, and treats all ports on the swiches as individual devices. I'm trying to figure out how to use brctl + bridge utility to configure 8 + wan ports
Did you solve this issue?
First of all, thank you very much for your hard work.
By the way, I tried openwrt-20190315.trx, but I have problem with communicating between ports of BCM53125 (lan 1,5,2,6) and ports of BCM53012 (lan 7,4,8)
It's true, this is indeed an issue. You reported first. I noticed this as well. For now I don't have any fix.
Hi no update i immagine ?
Does the stock linksys fw correctly comm between the switch ports ?