Re: Race between "Generic PHY" and "bcm53xx" drivers after -EPROBE_DEFER
From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-09-21 02:37:13
On Mon, Sep 20, 2021 at 11:10:39AM -0700, Florian Fainelli wrote:
quoted
But even so, what's a "pseudo PHY" exactly? I think that's at the bottom of this issue. In the Linux device model, a device has a single driver. In this case, the same MDIO device either has a switch driver, if you accept it's a switch, or a PHY driver, if you accept it's a PHY. I said it's "broken" because the expectation seems to be that it's a switch, but it looks like it's treated otherwise. Simply put, the same device can't be both a switch and a PHY.A pseudo-PHY is a device that can snoop and respond to MDIO bus requests. I understand it cannot be both, just explaining to you how the people at Broadcom have been seeing the world from their perspective. Anything that is found at MDIO address 0x1e/30 is considered a MDIO attached switch, that's all.
Nothing wrong with that per se, at NXP we've been thinking about RevMII as well, and having a switch expose itself as a PHY over MDIO, in any case something a bit richer/more interactive than a fixed-link. One way to bypass that limitation is to access the switch registers through a different device compared to the PHY device. At the very least, a different MDIO address. Even better, not over MDIO at all, but something faster, SPI, PCIe etc.