Re: [PATCH] net: phy: bcm5481x: Fix GMII/MII/MII-Lite selection
From: Andrew Lunn <andrew@lunn.ch>
Date: 2025-09-23 15:11:26
On Tue, Sep 23, 2025 at 04:34:53PM +0200, Kamil Horák - 2N wrote:
quoted hunk ↗ jump to hunk
The Broadcom bcm54811 is hardware-strapped to select among RGMII and MII/MII-Lite modes. However, the corresponding bit, RGMII Enable in Miscellaneous Control Register must be also set to select desired RGMII or MII(-lite)/GMII mode. Signed-off-by: Kamil Horák - 2N <redacted> --- drivers/net/phy/broadcom.c | 10 ++++++++++ include/linux/brcmphy.h | 1 + 2 files changed, 11 insertions(+)diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index a60e58ef90c4..492fbf506d49 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c@@ -436,6 +436,16 @@ static int bcm54811_config_init(struct phy_device *phydev) if (err < 0) return err; + if (!phy_interface_is_rgmii(phydev)) { + /* Misc Control: GMII/MII/MII-Lite Mode (not RGMII) */ + err = bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC, + MII_BCM54XX_AUXCTL_MISC_WREN | + MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_SKEW_EN |
This is a bit confusing. If it is NOT RGMII, you set RGMII_SKEW_EN? I could understand the opposite, clear the bit...
+ MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RSVD);
#define MII_BCM54XX_AUXCTL_SHDWSEL_MISC 0x07 #define MII_BCM54XX_AUXCTL_SHDWSEL_MISC_WIRESPEED_EN 0x0010 +#define MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RSVD 0x0060
Does RSVD mean reserved? Are you saying these two reserved bits need to be set? They must be more than reserved if they need setting. Andrew