On 17 August 2016 at 12:28, Jonas Gorski <jonas.gor...@gmail.com> wrote: > On 16 August 2016 at 16:47, Rafał Miłecki <zaj...@gmail.com> wrote: >> From: Rafał Miłecki <ra...@milecki.pl> >> >> On all devices suppored so far BCM53125 got port 8 connected to the SoC >> interface and ports 0-4 to physical ports. On BCM53573 there is slightly >> more comlex setup. We have 2 SoC interfaces: one (eth0) connected to >> port 8 and another (eth1) connected to port 5. This change allows using >> port 5 to fully support such case. It also enables port 8 by default >> which would be added during init anyway. >> >> Signed-off-by: Rafał Miłecki <ra...@milecki.pl> >> --- >> target/linux/generic/files/drivers/net/phy/b53/b53_common.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c >> b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c >> index d96d8b8..1a1be82 100644 >> --- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c >> +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c >> @@ -1206,7 +1206,7 @@ static const struct b53_chip_data b53_switch_chips[] = >> { >> .dev_name = "BCM53125", >> .alias = "bcm53125", >> .vlans = 4096, >> - .enabled_ports = 0x1f, >> + .enabled_ports = 0x13f, > > is there maybe some way of autodetecting this? maybe check if the > appropriate port override registers are set or so? Maybe we can use > the strap bus register for that?
In BCM53573 the initial state of B53_GMII_PORT_OVERRIDE_CTRL(5) is 0x0b (GMII_PO_LINK | GMII_PO_FULL_DUPLEX | GMII_PO_SPEED_100M). It doesn't have GMII_PO_EN set, so we can't use this register to check if port 5 is used/connected to some interface. I just checked my old BCM4706 with BCM53125 and it has initial value of above register equal to 0x0b as well. As we talked yesterday, B53_STRAP_VALUE register contains value 0x000000180f2c so it doesn't have SV_GMII_CTRL_115 set. On the other hand my BCM4706 with BCM53125 has B53_STRAP_VALUE: equal to 0x00000002be2c so there are some differences. Any idea what these other bits may mean? -- Rafał _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev