On Mon, Oct 3, 2022 at 5:15 PM Fabio Estevam <[email protected]> wrote: > > On Mon, Oct 3, 2022 at 8:46 PM Fabio Estevam <[email protected]> wrote: > > > The switch I am using is a mv88e6320. > > > > I instrumented the code a bit and I notice that I am not able to read > > the switch ID. > > > > mv88e6xxx_get_switch_id() fails because mv88e6xxx_port_read() returns > > 0xffff. > > This was caused by the wrong description of the Ethernet switch reset.
Seems like something that needs an error print? Which driver this? > > With this fixed, dm tree looks a bit better: > > ethernet 0 [ + ] fecmxc | | `-- ethernet@30be0000 > bootdev 2 [ ] eth_bootdev | | |-- > [email protected] > mdio 0 [ + ] fec_mdio | | `-- mdio > dsa 0 [ + ] mv88e6xxx | | `-- switch@0 > ethernet 1 [ ] dsa-port | | |-- lan0 > bootdev 3 [ ] eth_bootdev | | | > `-- switch@[email protected] > ethernet 2 [ ] dsa-port | | |-- lan1 > bootdev 4 [ ] eth_bootdev | | | > `-- switch@[email protected] > ethernet 3 [ + ] dsa-port | | |-- lan3 > bootdev 5 [ ] eth_bootdev | | | > `-- switch@[email protected] > mdio 1 [ + ] mv88e6xxx_mdio | | > `-- mv88e6xxx-mdio-0 > > Boot log: > Net: MV88E61XX > Warning: ethernet@30be0000 (eth0) using random MAC address - 36:6f:7f:0c:61:14 > eth0: ethernet@30be0000Could not get PHY for mv88e6xxx-mdio-0: addr 0 > Could not get PHY for mv88e6xxx-mdio-0: addr 1 > , eth3: lan3 This doesn't look correct - why could it not get the phy for lan1 and lan2 yet lan3 was fine? I would assume a DT port/reg mismatch. > > u-boot=> net list > eth0 : ethernet@30be0000 36:6f:7f:0c:61:14 active > eth1 : lan0 00:00:00:00:00:00 > eth2 : lan1 00:00:00:00:00:00 > eth3 : lan3 36:6f:7f:0c:61:14 > > but still not able to get DHCP IP. Where are you setting your active port? By default eth0 is active and thats the cpu uplink. If you have a network connection on lan3 port you would need to 'setenv ethact lan3'. Tim

