net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
Subsystems (4)
v3 cover net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
Software RGMII - GMII/MII/MII-Lite selection.
The bcm54811 PHY needs this bit to be configured in addition to hardware strapping of the PHY chip to desired mode.
This configuration step got lost during the refining of previous patch.
Changes in v2:
- Applied reviewers' comments
- Not setting RGMII RXD to RXC Skew in non-RGMII mode
Changes in v3:
- Specified target tree name
Kamil Horák - 2N (1):
net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
drivers/net/phy/broadcom.c | 20 +++++++++++++++++++- include/linux/brcmphy.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.5
PATCH v3 1/1 net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
The Broadcom bcm54811 is hardware-strapped to select among RGMII and GMII/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.
--- drivers/net/phy/broadcom.c | 20 +++++++++++++++++++- include/linux/brcmphy.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-)
drivers/net/phy/broadcom.c +19 -1
@@ -405,7 +405,7 @@ static int bcm5481x_set_brrmode(struct phy_device *phydev, bool on)static int bcm54811_config_init (struct phy_device *phydev) {struct bcm54xx_phy_priv *priv = phydev->priv; -int err, reg, exp_sync_ethernet; +int err, reg, exp_sync_ethernet, aux_rgmii_en;/* Enable CLK125 MUX on LED4 if ref clock is enabled. */ if (!(phydev->dev_flags &PHY_BRCM_RX_REFCLK_UNUSED )) {
@@ -434,6 +434,24 @@ static int bcm54811_config_init(struct phy_device *phydev)if (err <0 )return err; +/* Enable RGMII if configured */ +if (phy_interface_is_rgmii (phydev)) + aux_rgmii_en =MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_EN | +MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_SKEW_EN ; +else + aux_rgmii_en =0 ; + +/* Also writing Reserved bits 6:5 because the documentation requires +* them to be written to 0b11 +*/ + err =bcm54xx_auxctl_write (phydev, +MII_BCM54XX_AUXCTL_SHDWSEL_MISC , +MII_BCM54XX_AUXCTL_MISC_WREN | + aux_rgmii_en | +MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RSVD ); +if (err <0 ) +return err; +return bcm5481x_set_brrmode (phydev, priv->brr_mode); }
include/linux/brcmphy.h +1 -0
@@ -137,6 +137,7 @@#define MII_BCM54XX_AUXCTL_SHDWSEL_MISC 0x07#define MII_BCM54XX_AUXCTL_SHDWSEL_MISC_WIRESPEED_EN 0x0010 +#define MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RSVD 0x0060#define MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_EN 0x0080#define MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_SKEW_EN 0x0100#define MII_BCM54XX_AUXCTL_MISC_FORCE_AMDIX 0x0200
Signature · 1 line
2.39.5
Quoted 7 lines · On 10/9/25 06:06, Kamil Horák - 2N wrote:
The Broadcom bcm54811 is hardware-strapped to select among RGMII and GMII/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.
Fixes 3117a11fff5af9e7 ("net: phy: bcm54811: PHY initialization")Signed-off-by Kamil Horák - 2N <[email protected]>
Signature · 1 line
Florian
Jakub Kicinski
maintainerQuoted 1 line · On Thu, 9 Oct 2025 15:06:56 +0200 Kamil Horák - 2N wrote:
Signed-off-by Kamil Horák - 2N <[email protected]>
If "2N" is a company name - going forward please use the preferred format which is round brackets:
Quoting documentation:
The canonical patch format
--------------------------
From Line
^^^^^^^^^
The ``from`` line must be the very first line in the message body, and has the form:
From: Patch Author <[email protected]>
The ``from`` line specifies who will be credited as the author of the patch in the permanent changelog. If the ``from`` line is missing, then the ``From:`` line from the email header will be used to determine the patch author in the changelog.
The author may indicate their affiliation or the sponsor of the work by adding the name of an organization to the ``from`` and ``SoB`` lines, e.g.:
From: Patch Author (Company) <[email protected]>
See:
https://www.kernel.org/doc/html/next/process/submitting-patches.html#the-canonical-patch-format
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Thu, 9 Oct 2025 15:06:55 +0200 you wrote:
Software RGMII - GMII/MII/MII-Lite selection.
The bcm54811 PHY needs this bit to be configured in addition to hardware strapping of the PHY chip to desired mode.
This configuration step got lost during the refining of previous patch.
[...]
Here is the summary with links:
- [net,v3,1/1] net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
https://git.kernel.org/netdev/net/c/e4d0c909bf83
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html