* [PATCH] net: dsa: mv88e6xxx: support RGMII cmode
@ 2022-08-16 11:45 Marcus Carlberg
2022-08-18 22:02 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: Marcus Carlberg @ 2022-08-16 11:45 UTC (permalink / raw)
To: Andrew Lunn, Vivien Didelot, Florian Fainelli, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: kernel, Marcus Carlberg, netdev, linux-kernel
Since the probe defaults all interfaces to the highest speed possible
(10GBASE-X in mv88e6393x) before the phy mode configuration from the
devicetree is considered it is currently impossible to use port 0 in
RGMII mode.
This change will allow RGMII modes to be configurable for port 0
enabling port 0 to be configured as RGMII as well as serial depending
on configuration.
Signed-off-by: Marcus Carlberg <marcus.carlberg@axis.com>
---
drivers/net/dsa/mv88e6xxx/port.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c
index 90c55f23b7c9..2e005449e733 100644
--- a/drivers/net/dsa/mv88e6xxx/port.c
+++ b/drivers/net/dsa/mv88e6xxx/port.c
@@ -517,6 +517,12 @@ static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port,
case PHY_INTERFACE_MODE_RMII:
cmode = MV88E6XXX_PORT_STS_CMODE_RMII;
break;
+ case PHY_INTERFACE_MODE_RGMII:
+ case PHY_INTERFACE_MODE_RGMII_ID:
+ case PHY_INTERFACE_MODE_RGMII_RXID:
+ case PHY_INTERFACE_MODE_RGMII_TXID:
+ cmode = MV88E6XXX_PORT_STS_CMODE_RGMII;
+ break;
case PHY_INTERFACE_MODE_1000BASEX:
cmode = MV88E6XXX_PORT_STS_CMODE_1000BASEX;
break;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: dsa: mv88e6xxx: support RGMII cmode
2022-08-16 11:45 [PATCH] net: dsa: mv88e6xxx: support RGMII cmode Marcus Carlberg
@ 2022-08-18 22:02 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2022-08-18 22:02 UTC (permalink / raw)
To: Marcus Carlberg
Cc: Vivien Didelot, Florian Fainelli, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
kernel, netdev, linux-kernel
On Tue, Aug 16, 2022 at 01:45:34PM +0200, Marcus Carlberg wrote:
> Since the probe defaults all interfaces to the highest speed possible
> (10GBASE-X in mv88e6393x) before the phy mode configuration from the
> devicetree is considered it is currently impossible to use port 0 in
> RGMII mode.
>
> This change will allow RGMII modes to be configurable for port 0
> enabling port 0 to be configured as RGMII as well as serial depending
> on configuration.
Hi Marcus
Can ports 9 and 10 do RGMII? I think not. So you should validate the
phy-mode in mv88e6393x_port_set_cmode().
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-18 22:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-16 11:45 [PATCH] net: dsa: mv88e6xxx: support RGMII cmode Marcus Carlberg
2022-08-18 22:02 ` Andrew Lunn
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).