* [PATCH net v3 0/1] net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
@ 2025-10-09 13:06 Kamil Horák - 2N
2025-10-09 13:06 ` [PATCH net v3 1/1] " Kamil Horák - 2N
2025-10-14 1:10 ` [PATCH net v3 0/1] " patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: Kamil Horák - 2N @ 2025-10-09 13:06 UTC (permalink / raw)
To: florian.fainelli, bcm-kernel-feedback-list, andrew, hkallweit1,
linux, davem, edumazet, kuba, pabeni
Cc: kamilh, netdev
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(-)
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net v3 1/1] net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
2025-10-09 13:06 [PATCH net v3 0/1] net: phy: bcm54811: Fix GMII/MII/MII-Lite selection Kamil Horák - 2N
@ 2025-10-09 13:06 ` Kamil Horák - 2N
2025-10-13 22:27 ` Florian Fainelli
2025-10-14 0:43 ` Jakub Kicinski
2025-10-14 1:10 ` [PATCH net v3 0/1] " patchwork-bot+netdevbpf
1 sibling, 2 replies; 5+ messages in thread
From: Kamil Horák - 2N @ 2025-10-09 13:06 UTC (permalink / raw)
To: florian.fainelli, bcm-kernel-feedback-list, andrew, hkallweit1,
linux, davem, edumazet, kuba, pabeni
Cc: kamilh, netdev
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 <kamilh@axis.com>
---
drivers/net/phy/broadcom.c | 20 +++++++++++++++++++-
include/linux/brcmphy.h | 1 +
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 3459a0e9d8b9..cb306f9e80cc 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -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);
}
diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h
index 15c35655f482..115a964f3006 100644
--- a/include/linux/brcmphy.h
+++ b/include/linux/brcmphy.h
@@ -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
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net v3 1/1] net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
2025-10-09 13:06 ` [PATCH net v3 1/1] " Kamil Horák - 2N
@ 2025-10-13 22:27 ` Florian Fainelli
2025-10-14 0:43 ` Jakub Kicinski
1 sibling, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2025-10-13 22:27 UTC (permalink / raw)
To: Kamil Horák - 2N, bcm-kernel-feedback-list, andrew,
hkallweit1, linux, davem, edumazet, kuba, pabeni
Cc: netdev
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 <kamilh@axis.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net v3 1/1] net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
2025-10-09 13:06 ` [PATCH net v3 1/1] " Kamil Horák - 2N
2025-10-13 22:27 ` Florian Fainelli
@ 2025-10-14 0:43 ` Jakub Kicinski
1 sibling, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2025-10-14 0:43 UTC (permalink / raw)
To: Kamil Horák - 2N
Cc: florian.fainelli, bcm-kernel-feedback-list, andrew, hkallweit1,
linux, davem, edumazet, pabeni, netdev
On Thu, 9 Oct 2025 15:06:56 +0200 Kamil Horák - 2N wrote:
> Signed-off-by: Kamil Horák - 2N <kamilh@axis.com>
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 <author@example.com>
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) <author@example.com>
See:
https://www.kernel.org/doc/html/next/process/submitting-patches.html#the-canonical-patch-format
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net v3 0/1] net: phy: bcm54811: Fix GMII/MII/MII-Lite selection
2025-10-09 13:06 [PATCH net v3 0/1] net: phy: bcm54811: Fix GMII/MII/MII-Lite selection Kamil Horák - 2N
2025-10-09 13:06 ` [PATCH net v3 1/1] " Kamil Horák - 2N
@ 2025-10-14 1:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-10-14 1:10 UTC (permalink / raw)
To: =?utf-8?q?Kamil_Hor=C3=A1k_-_2N_=3Ckamilh=40axis=2Ecom=3E?=
Cc: florian.fainelli, bcm-kernel-feedback-list, andrew, hkallweit1,
linux, davem, edumazet, kuba, pabeni, netdev
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-14 1:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-09 13:06 [PATCH net v3 0/1] net: phy: bcm54811: Fix GMII/MII/MII-Lite selection Kamil Horák - 2N
2025-10-09 13:06 ` [PATCH net v3 1/1] " Kamil Horák - 2N
2025-10-13 22:27 ` Florian Fainelli
2025-10-14 0:43 ` Jakub Kicinski
2025-10-14 1:10 ` [PATCH net v3 0/1] " patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).