From: Russell King - ARM Linux admin <linux@armlinux.org.uk> Date: 2021-01-19 15:37:55
Hi,
This patch series adds 1000base-X support to pcs-lynx and DPAA2,
allowing runtime switching between SGMII and 1000base-X. This is
a pre-requisit for SFP module support on the SolidRun ComExpress 7.
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 25 ++++++++++++----
drivers/net/pcs/pcs-lynx.c | 36 ++++++++++++++++++++++++
2 files changed, 56 insertions(+), 5 deletions(-)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
From: Russell King <hidden> Date: 2021-01-19 15:37:15
Add support for 1000BASE-X to pcs-lynx for the LX2160A.
This commit prepares the ground work for allowing 1G fiber connections
to be used with DPAA2 on the SolidRun CEX7 platforms.
Signed-off-by: Russell King <redacted>
---
drivers/net/pcs/pcs-lynx.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
From: Russell King <hidden> Date: 2021-01-19 15:42:45
Add support for backplane link mode, which is, according to discussions
with NXP earlier in the year, is a mode where the OS (Linux) is able to
manage the PCS and Serdes itself.
This commit prepares the ground work for allowing 1G fiber connections
to be used with DPAA2 on the SolidRun CEX7 platforms.
Signed-off-by: Russell King <redacted>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
From: Russell King <hidden> Date: 2021-01-19 15:42:52
Now that pcs-lynx supports 1000BASE-X, add support for this interface
mode to dpaa2-mac. pcs-lynx can be switched at runtime between SGMII
and 1000BASE-X mode, so allow dpaa2-mac to switch between these as
well.
This commit prepares the ground work for allowing 1G fiber connections
to be used with DPAA2 on the SolidRun CEX7 platforms.
Signed-off-by: Russell King <redacted>
---
.../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 20 ++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
@@ -79,10 +79,20 @@ static bool dpaa2_mac_phy_mode_mismatch(struct dpaa2_mac *mac,phy_interface_tinterface){switch(interface){+/* We can switch between SGMII and 1000BASE-X at runtime with+*pcs-lynx+*/+casePHY_INTERFACE_MODE_SGMII:+casePHY_INTERFACE_MODE_1000BASEX:+if(mac->pcs&&+(mac->if_mode==PHY_INTERFACE_MODE_SGMII||+mac->if_mode==PHY_INTERFACE_MODE_1000BASEX))+returnfalse;+returninterface!=mac->if_mode;+casePHY_INTERFACE_MODE_10GBASER:casePHY_INTERFACE_MODE_USXGMII:casePHY_INTERFACE_MODE_QSGMII:-casePHY_INTERFACE_MODE_SGMII:casePHY_INTERFACE_MODE_RGMII:casePHY_INTERFACE_MODE_RGMII_ID:casePHY_INTERFACE_MODE_RGMII_RXID:
On Tue, Jan 19, 2021 at 03:35:58PM +0000, Russell King wrote:
Add support for 1000BASE-X to pcs-lynx for the LX2160A.
This commit prepares the ground work for allowing 1G fiber connections
to be used with DPAA2 on the SolidRun CEX7 platforms.
Signed-off-by: Russell King <redacted>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Also tested 1000BASEX on a HoneyComb board with a 1G fiber connection.
Thanks!
From: Russell King - ARM Linux admin <linux@armlinux.org.uk> Date: 2021-01-21 02:18:47
On Wed, Jan 20, 2021 at 10:19:01PM +0000, Ioana Ciornei wrote:
On Tue, Jan 19, 2021 at 03:36:09PM +0000, Russell King wrote:
quoted
Add support for backplane link mode, which is, according to discussions
with NXP earlier in the year, is a mode where the OS (Linux) is able to
manage the PCS and Serdes itself.
Indeed, DPMACs in TYPE_BACKPLANE can have both their PCS and SerDes managed
by Linux (since the firmware is not touching these).
That being said, DPMACs in TYPE_PHY (the type that is already supported
in dpaa2-mac) can also have their PCS managed by Linux (no interraction
from the firmware's part with the PCS, just the SerDes).
This is not what was discussed last year. It clearly shows in the
slides that Bogdan sent in April 2020 "PCS Representation in Linux.pptx"
page 4 that the firmware manages the PCS in TYPE_PHY and TYPE_FIXED
mode.
It was explained during the call that Linux must not access the internal
MDIO nor touch the PCS _except_ when using TYPE_BACKPLANE mode. Touching
the internal MDIO was stated as unsupported in other modes as the MC
firmware will be performing MDIO accesses.
Also, with just the changes from this patch, a interface connected to a
DPMAC in TYPE_BACKPLANE is not even creating a phylink instance. It's
mainly because of this check from dpaa2-eth:
if (dpaa2_eth_is_type_phy(priv)) {
err = dpaa2_mac_connect(mac);
I would suggest just dropping this patch.
That is a recent change in net-next, but is not in my tree...
In any case, if NXP have changed it such that, when in TYPE_PHY, the
MC firmware no longer accesses the PCS and it is now safe to perform
MDIO accesses, then we _still_ need this patch for older firmwares.
In short, what you've put in your email does not tie up with the
position that was discussed last year, and seems to me to be a total
U-turn over what was being said.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
On Tue, Jan 19, 2021 at 03:36:03PM +0000, Russell King wrote:
Now that pcs-lynx supports 1000BASE-X, add support for this interface
mode to dpaa2-mac. pcs-lynx can be switched at runtime between SGMII
and 1000BASE-X mode, so allow dpaa2-mac to switch between these as
well.
This commit prepares the ground work for allowing 1G fiber connections
to be used with DPAA2 on the SolidRun CEX7 platforms.
Signed-off-by: Russell King <redacted>
@@ -79,10 +79,20 @@ static bool dpaa2_mac_phy_mode_mismatch(struct dpaa2_mac *mac,phy_interface_tinterface){switch(interface){+/* We can switch between SGMII and 1000BASE-X at runtime with+*pcs-lynx+*/+casePHY_INTERFACE_MODE_SGMII:+casePHY_INTERFACE_MODE_1000BASEX:+if(mac->pcs&&+(mac->if_mode==PHY_INTERFACE_MODE_SGMII||+mac->if_mode==PHY_INTERFACE_MODE_1000BASEX))+returnfalse;+returninterface!=mac->if_mode;+casePHY_INTERFACE_MODE_10GBASER:casePHY_INTERFACE_MODE_USXGMII:casePHY_INTERFACE_MODE_QSGMII:-casePHY_INTERFACE_MODE_SGMII:casePHY_INTERFACE_MODE_RGMII:casePHY_INTERFACE_MODE_RGMII_ID:casePHY_INTERFACE_MODE_RGMII_RXID:
On Tue, Jan 19, 2021 at 03:36:09PM +0000, Russell King wrote:
Add support for backplane link mode, which is, according to discussions
with NXP earlier in the year, is a mode where the OS (Linux) is able to
manage the PCS and Serdes itself.
Indeed, DPMACs in TYPE_BACKPLANE can have both their PCS and SerDes managed
by Linux (since the firmware is not touching these).
That being said, DPMACs in TYPE_PHY (the type that is already supported
in dpaa2-mac) can also have their PCS managed by Linux (no interraction
from the firmware's part with the PCS, just the SerDes).
All in all, this patch is not needed for this particular usecase, where
the switch between 1000Base-X and SGMII is done by just a minor
reconfiguration in the PCS, without the need for SerDes changes.
Also, with just the changes from this patch, a interface connected to a
DPMAC in TYPE_BACKPLANE is not even creating a phylink instance. It's
mainly because of this check from dpaa2-eth:
if (dpaa2_eth_is_type_phy(priv)) {
err = dpaa2_mac_connect(mac);
I would suggest just dropping this patch.
Ioana
quoted hunk
This commit prepares the ground work for allowing 1G fiber connections
to be used with DPAA2 on the SolidRun CEX7 platforms.
Signed-off-by: Russell King <redacted>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
From: Russell King - ARM Linux admin <linux@armlinux.org.uk> Date: 2021-02-04 14:54:45
On Wed, Jan 20, 2021 at 10:19:01PM +0000, Ioana Ciornei wrote:
On Tue, Jan 19, 2021 at 03:36:09PM +0000, Russell King wrote:
quoted
Add support for backplane link mode, which is, according to discussions
with NXP earlier in the year, is a mode where the OS (Linux) is able to
manage the PCS and Serdes itself.
Indeed, DPMACs in TYPE_BACKPLANE can have both their PCS and SerDes managed
by Linux (since the firmware is not touching these).
That being said, DPMACs in TYPE_PHY (the type that is already supported
in dpaa2-mac) can also have their PCS managed by Linux (no interraction
from the firmware's part with the PCS, just the SerDes).
All in all, this patch is not needed for this particular usecase, where
the switch between 1000Base-X and SGMII is done by just a minor
reconfiguration in the PCS, without the need for SerDes changes.
Also, with just the changes from this patch, a interface connected to a
DPMAC in TYPE_BACKPLANE is not even creating a phylink instance. It's
mainly because of this check from dpaa2-eth:
if (dpaa2_eth_is_type_phy(priv)) {
err = dpaa2_mac_connect(mac);
I would suggest just dropping this patch.
Hi Ioana,
So what is happening with this series given our discussions off-list?
Do I resend it as-is?
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
On Thu, Feb 04, 2021 at 02:51:24PM +0000, Russell King - ARM Linux admin wrote:
On Wed, Jan 20, 2021 at 10:19:01PM +0000, Ioana Ciornei wrote:
quoted
On Tue, Jan 19, 2021 at 03:36:09PM +0000, Russell King wrote:
quoted
Add support for backplane link mode, which is, according to discussions
with NXP earlier in the year, is a mode where the OS (Linux) is able to
manage the PCS and Serdes itself.
Indeed, DPMACs in TYPE_BACKPLANE can have both their PCS and SerDes managed
by Linux (since the firmware is not touching these).
That being said, DPMACs in TYPE_PHY (the type that is already supported
in dpaa2-mac) can also have their PCS managed by Linux (no interraction
from the firmware's part with the PCS, just the SerDes).
All in all, this patch is not needed for this particular usecase, where
the switch between 1000Base-X and SGMII is done by just a minor
reconfiguration in the PCS, without the need for SerDes changes.
Also, with just the changes from this patch, a interface connected to a
DPMAC in TYPE_BACKPLANE is not even creating a phylink instance. It's
mainly because of this check from dpaa2-eth:
if (dpaa2_eth_is_type_phy(priv)) {
err = dpaa2_mac_connect(mac);
I would suggest just dropping this patch.
Hi Ioana,
So what is happening with this series given our discussions off-list?
Let's also accept TYPE_BACKPLANE as you suggested.
Do I resend it as-is?
For the net-next, you would also need the following diff on top of your changes in patch 3/3: