[PATCH v4 8/8] board: gw_ventana: enable MV88E61XX DSA support

Tim Harvey tharvey at gateworks.com
Mon Oct 3 21:09:02 CEST 2022


On Mon, Oct 3, 2022 at 11:40 AM Fabio Estevam <festevam at gmail.com> wrote:
>
> Hi Tim,
>
> On Mon, Oct 3, 2022 at 3:22 PM Tim Harvey <tharvey at gateworks.com> wrote:
>
> > With CONFIG_CMD_NET=y what does 'net list' show?
> >
> > I have the following (with network attached to lan4 port)
> > Net:   MV88E61XX eth0: ethernet at 2188000, eth1: lan4, eth2: lan3, eth3: lan2, eth
> > 4: lan1
> > Hit any key to stop autoboot:  0
> > Ventana > print ethaddr
> > ethaddr=00:d0:12:f3:f2:f5
> > Ventana > dm tree
> > ...
> >  ethernet      0  [ + ]   fecmxc                |   |   |-- ethernet at 2188000
> >  bootdev       0  [   ]   eth_bootdev           |   |   |   |--
> > ethernet at 2188000.bootdev
> >  mdio          0  [ + ]   fec_mdio              |   |   |   `-- mdio
> >  dsa           0  [ + ]   mv88e6xxx             |   |   |       `-- switch at 0
> >  ethernet      1  [ + ]   dsa-port              |   |   |           |-- lan4
> >  bootdev       2  [   ]   eth_bootdev           |   |   |           |
> >  `-- switch at 0@0.bootdev
> >  ethernet      2  [ + ]   dsa-port              |   |   |           |-- lan3
> >  bootdev       3  [   ]   eth_bootdev           |   |   |           |
> >  `-- switch at 0@1.bootdev
> >  ethernet      3  [ + ]   dsa-port              |   |   |           |-- lan2
> >  bootdev       4  [   ]   eth_bootdev           |   |   |           |
> >  `-- switch at 0@2.bootdev
> >  ethernet      4  [ + ]   dsa-port              |   |   |           |-- lan1
> >  bootdev       5  [   ]   eth_bootdev           |   |   |           |
> >  `-- switch at 0@3.bootdev
> >  mdio          1  [ + ]   mv88e6xxx_mdio        |   |   |
> > `-- mv88e6xxx-mdio-0
> > ...
> > Ventana > net list
> > eth0 : ethernet at 2188000 00:d0:12:f3:f2:f5 active
> > eth1 : lan4 00:d0:12:f3:f2:f5
> > eth2 : lan3 00:d0:12:f3:f2:f5
> > eth3 : lan2 00:d0:12:f3:f2:f5
> > eth4 : lan1 00:d0:12:f3:f2:f5
> > Ventana > setenv ethact lan4
> > Ventana > dhcp
> > BOOTP broadcast 1
> > BOOTP broadcast 2
> > BOOTP broadcast 3
> > DHCP client bound to address 172.24.33.142 (1076 ms)
> >
> > I do not use CONFIG_NET_RANDOM_ETHADDR and have a single MAC address
> > allocated to the board.
>
> Below are the logs:
>
> Net:   MV88E61XX
> Warning: ethernet at 30be0000 (eth0) using random MAC address - a6:a6:56:1c:28:0a
> eth0: ethernet at 30be0000
> Hit any key to stop autoboot:  0
>
> Your log also shows eth1-eth4. Mine does not.
>
> Unlike your log, dsa-port is not getting probed here:
>
>  ethernet      0  [ + ]   fecmxc                |   |   `-- ethernet at 30be0000
>  bootdev       2  [   ]   eth_bootdev           |   |       |--
> ethernet at 30be0000.bootdev
>  mdio          0  [ + ]   fec_mdio              |   |       `-- mdio
>  dsa           0  [   ]   mv88e6xxx             |   |           `-- switch at 0
>  ethernet      1  [   ]   dsa-port              |   |               |-- lan4
>  bootdev       3  [   ]   eth_bootdev           |   |               |
>  `-- switch at 0@0.bootdev
>  ethernet      2  [   ]   dsa-port              |   |               |-- lan3
>  bootdev       4  [   ]   eth_bootdev           |   |               |
>  `-- switch at 0@1.bootdev
>  ethernet      3  [   ]   dsa-port              |   |               |-- lan2
>  bootdev       5  [   ]   eth_bootdev           |   |               |
>  `-- switch at 0@2.bootdev
>  ethernet      4  [   ]   dsa-port              |   |               |-- lan1
>  bootdev       6  [   ]   eth_bootdev           |   |               |
>  `-- switch at 0@3.bootdev
>  mdio          1  [ + ]   mv88e6xxx_mdio        |   |
> |-- mv88e6xxx-mdio-0
>  mdio          2  [   ]   mv88e6xxx_mdio        |   |
> |-- mv88e6xxx-mdio-1
>  mdio          3  [   ]   mv88e6xxx_mdio        |   |
> |-- mv88e6xxx-mdio-2
>  mdio          4  [   ]   mv88e6xxx_mdio        |   |
> `-- mv88e6xxx-mdio-3
>  simple_bus    7  [   ]   simple_bus            |   `-- bus at 32c00000
>  usb           0  [   ]   ehci_mx6              |       `-- usb at 32e40000
>  phy           0  [   ]   nop_phy               |-- usbphynop1
>  regulator     0  [   ]   regulator_fixed       |-- regulator-usdhc2
>  sysreset      1  [   ]   wdt_reboot            |-- wdt-reboot
>  bootstd       0  [   ]   bootstd_drv           `-- bootstd
>  bootmeth      0  [   ]   bootmeth_distro           |-- distro
>  bootmeth      1  [   ]   bootmeth_efi              |-- efi
>  bootmeth      2  [   ]   bootmeth_pxe              |-- pxe
>  bootmeth      3  [   ]   vbe_simple                `-- vbe_simple
>

Right - so it looks like the 'net: fec: add support for DM_MDIO' patch
is not doing its job to probe the mdio bus and ports.

Is CONFIG_DM_MDIO enabled and is dm_fec_bind_mdio returning successfully?

Is CONFIG_DM_ETH_PHY enabled? I don't use that and if I recall that
code never seemed right to me.

Tim

> u-boot=> net list
> eth0 : ethernet at 30be0000 a6:a6:56:1c:28:0a active
> eth1 : lan4 00:00:00:00:00:00
> eth2 : lan3 00:00:00:00:00:00
> eth3 : lan2 00:00:00:00:00:00
> eth4 : lan1 00:00:00:00:00:00
> u-boot=> setenv ethact lan4
> u-boot=> dhcp
> BOOTP broadcast 1
> BOOTP broadcast 2
> BOOTP broadcast 3
> BOOTP broadcast 4
> BOOTP broadcast 5
> BOOTP broadcast 6
> BOOTP broadcast 7
> BOOTP broadcast 8
> (IP is never retrieved)
>
> > What board are you using and what does its fec/mdio dt look like?
>
> I am using a custom imx8mn board.
>
> The FEC/MDIO nodes are like this:
> https://pastebin.com/raw/0SvLLzxj
>
> Thanks,
>
> Fabio Estevam


More information about the U-Boot mailing list