[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221027204135.grfsorkt7fdk6ccp@skbuf>
Date: Thu, 27 Oct 2022 20:41:35 +0000
From: Vladimir Oltean <vladimir.oltean@....com>
To: Fabio Estevam <festevam@...il.com>
CC: Andrew Lunn <andrew@...n.ch>,
"tharvey@...eworks.com" <tharvey@...eworks.com>,
netdev <netdev@...r.kernel.org>, Marek Vasut <marex@...x.de>,
Fabio Estevam <festevam@...x.de>
Subject: Re: Marvell 88E6320 connected to i.MX8MN
Hi Fabio,
On Wed, Oct 26, 2022 at 11:16:45PM -0300, Fabio Estevam wrote:
> Hi,
>
> I am trying to make a Marvell 88E6320 switch to work on an imx8mn-based board
> running kernel 6.0.5.
>
> Ethernet is functional in U-Boot with Tim's series:
> https://lore.kernel.org/all/20221004164918.2251714-1-tharvey@gateworks.com/
>
> However, in the kernel I am not able to retrieve an IP via DHCP:
>
> mv88e6085 30be0000.ethernet-1:00: switch 0x1150 detected: Marvell 88E6320, revision 2
> fec 30be0000.ethernet eth0: registered PHC device 0
> mv88e6085 30be0000.ethernet-1:00: switch 0x1150 detected: Marvell 88E6320, revision 2
> mv88e6085 30be0000.ethernet-1:00: configuring for fixed/rgmii-id link mode
> mv88e6085 30be0000.ethernet-1:00: Link is Up - 1Gbps/Full - flow control off
> mv88e6085 30be0000.ethernet-1:00 lan3 (uninitialized): PHY
> [!soc@...us@...00000!ethernet@...e0000!mdio!switch@...dio:03] driver [Generic PHY] (irq=POLL)
> mv88e6085 30be0000.ethernet-1:00 lan4 (uninitialized): PHY
> [!soc@...us@...00000!ethernet@...e0000!mdio!switch@...dio:04] driver [Generic PHY] (irq=POLL)
Looks like you are missing the Marvell PHY driver; the generic PHY
driver gets used. Can you enable CONFIG_MARVELL_PHY?
> device eth0 entered promiscuous mode
> DSA: tree 0 setup
> ...
>
> ~# udhcpc -i lan4
> udhcpc: started, v1.31.1
> [ 25.174846] mv88e6085 30be0000.ethernet-1:00 lan4: configuring for
> phy/gmii link mode
> udhcpc: sending discover
> [ 27.242123] mv88e6085 30be0000.ethernet-1:00 lan4: Link is Up -
> 100Mbps/Full - flow control rx/tx
> [ 27.251064] IPv6: ADDRCONF(NETDEV_CHANGE): lan4: link becomes ready
> udhcpc: sending discover
> udhcpc: sending discover
> udhcpc: sending discover
> ...
>
> This is my devicetree:
> https://pastebin.com/raw/TagQJK2a
>
> The only way that I can get IP via DHCP to work in the kernel is if
> I access the network inside U-Boot first and launch the kernel afterward.
>
> It looks like U-Boot is doing some configuration that the kernel is missing.
Yeah, sounds like the Marvell PHY driver could be what's the difference.
> Does anyone have any suggestions, please?
If that doesn't work, the next step is to isolate things. Connect a
cable to the other switch port, create a bridge, and forward packets
between one station and the other. This doesn't involve the CPU port, so
you'll learn if the internal PHYs are the problem or the CPU port is.
Next step would be to collect ethtool -S lan0, ethtool -S eth0, and post
those.
Powered by blists - more mailing lists