Thread (13 messages) 13 messages, 4 authors, 2025-06-24

Re: [PATCH net-next v2 2/3] net: phy: bcm5481x: Implement MII-Lite mode

From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2025-06-23 18:18:50
Also in: linux-devicetree, lkml

On Mon, Jun 23, 2025 at 07:55:03PM +0200, Andrew Lunn wrote:
On Mon, Jun 23, 2025 at 05:51:35PM +0200, Maxime Chevallier wrote:
quoted
Hi Kamil,

On Mon, 23 Jun 2025 17:10:46 +0200
Kamil Horák - 2N [off-list ref] wrote:
quoted
From: Kamil Horák (2N) <redacted>

The Broadcom bcm54810 and bcm54811 PHYs are capable to operate in
simplified MII mode, without TXER, RXER, CRS and COL signals as defined
for the MII. While the PHY can be strapped for MII mode, the selection
between MII and MII-Lite must be done by software.
The MII-Lite mode can be used with some Ethernet controllers, usually
those used in automotive applications. The absence of COL signal
makes half-duplex link modes impossible but does not interfere with
BroadR-Reach link modes on Broadcom PHYs, because they are full-duplex
only. The MII-Lite mode can be also used on an Ethernet controller with
full MII interface by just leaving the input signals (RXER, CRS, COL)
inactive.
I'm following-up to Andrew's suggestion of making it a dedicated
phy-mode. You say that this requires only phy-side configuration,
however you also say that with MII-lite, you can't do half-duplex.

Looking at the way we configure the MAC to PHY link, how can the MAC
driver know that HD isn't available if this is a phy-only property ?
One would hope that when the PHY is configured to -lite, it changes
its abilities register to indicate it does not support half duplex
modes? But without looking at the datasheet, i've no idea if it
actually does.

There is also an ordering issuer, it needs to be put into -lite mode
before phy_probe reads the abilities, which is after the probe()
method is called. However, at this point, we don't know the interface
mode, that only comes later.

So this gets interesting, and there is no indication in the commit
message this has been thought about.
... which is another reaosn for using phylink, because phylink
restricts the abilities of the PHY (and its advertisement) according
to the PHY interface mode.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help