[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d5f096a-49bd-4a4f-a9b9-d70610d0d1d6@lunn.ch>
Date: Tue, 23 Sep 2025 17:11:12 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Kamil Horák - 2N <kamilh@...s.com>
Cc: florian.fainelli@...adcom.com, bcm-kernel-feedback-list@...adcom.com,
hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org
Subject: Re: [PATCH] net: phy: bcm5481x: Fix GMII/MII/MII-Lite selection
On Tue, Sep 23, 2025 at 04:34:53PM +0200, Kamil Horák - 2N wrote:
> 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 <kamilh@...s.com>
> ---
> 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
Powered by blists - more mailing lists