net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
Subsystems (3)
PATCH v3 1/1 net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
As documented in acd7aaf51b20 ("netsec: ignore 'phy-mode' device property on ACPI systems") the SocioNext SynQuacer platform ships with firmware defining the PHY mode as RGMII even though the physical configuration of the PHY is for TX and RX delays. Since bbc4d71d63549bc ("net: phy: realtek: fix rtl8211e rx/tx delay config") this has caused misconfiguration of the PHY, rendering the network unusable.
This was worked around for ACPI by ignoring the phy-mode property but the system is also used with DT. For DT instead if we're running on a SynQuacer force a working PHY mode, as well as the standard EDK2 firmware with DT there are also some of these systems that use u-boot and might not initialise the PHY if not netbooting. Newer firmware imagaes for at least EDK2 are available from Linaro so print a warning when doing this.
---
Changes in v3:
- Typo fixes.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Unlike ACPI force what appears to be the correct mode, there are
u-boot firmwares which might not configure the PHY.
- Link to v1: https://lore.kernel.org/r/[email protected]
--- drivers/net/ethernet/socionext/netsec.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/net/ethernet/socionext/netsec.c +11 -0
@@ -1851,6 +1851,17 @@ static int netsec_of_probe(struct platform_device *pdev,return err; } +/* +* SynQuacer is physically configured with TX and RX delays +* but the standard firmware claimed otherwise for a long +* time, ignore it. +*/ +if (of_machine_is_compatible ("socionext,developer-box" ) && + priv->phy_interface !=PHY_INTERFACE_MODE_RGMII_ID ) { +dev_warn (&pdev->dev,"Outdated firmware reports incorrect PHY mode, overriding\n" ); + priv->phy_interface =PHY_INTERFACE_MODE_RGMII_ID ; + } + priv->phy_np =of_parse_phandle (pdev->dev.of_node,"phy-handle" ,0 );if (!priv->phy_np) {dev_err (&pdev->dev,"missing required property 'phy-handle'\n" );
---
base-commit: 5d0c230f1de8c7515b6567d9afba1f196fb4e2f4
change-id: 20230727-synquacer-net-e241f34baceb
Best regards,
Signature · 1 line
Mark Brown <[email protected]>
Quoted 16 lines · Mark Brown
As documented in
acd7aaf51b20("netsec: ignore 'phy-mode' device property on ACPI systems") the SocioNext SynQuacer platform ships with firmware defining the PHY mode as RGMII even though the physical configuration of the PHY is for TX and RX delays. Sincebbc4d71d63549bc("net: phy: realtek: fix rtl8211e rx/tx delay config") this has caused misconfiguration of the PHY, rendering the network unusable.This was worked around for ACPI by ignoring the phy-mode property but the system is also used with DT. For DT instead if we're running on a SynQuacer force a working PHY mode, as well as the standard EDK2 firmware with DT there are also some of these systems that use u-boot and might not initialise the PHY if not netbooting. Newer firmware imagaes for at least EDK2 are available from Linaro so print a warning when doing this.
Quoted 2 lines
Fixes 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")Signed-off-by Mark Brown <[email protected]>
Quoted 44 lines
---
Changes in v3:
- Typo fixes.
- Link to v2: https://lore.kernel.org/r/[email protected]Changes in v2:
- Unlike ACPI force what appears to be the correct mode, there are
u-boot firmwares which might not configure the PHY.
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/net/ethernet/socionext/netsec.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/net/ethernet/socionext/netsec.c +11
-1@@ -1851,6 +1851,17 @@ static int netsec_of_probe(struct platform_device *pdev,return err; } +/* +* SynQuacer is physically configured with TX and RX delays +* but the standard firmware claimed otherwise for a long +* time, ignore it. +*/ +if (of_machine_is_compatible ("socionext,developer-box" ) && + priv->phy_interface !=PHY_INTERFACE_MODE_RGMII_ID ) { +dev_warn (&pdev->dev,"Outdated firmware reports incorrect PHY mode, overriding\n" ); + priv->phy_interface =PHY_INTERFACE_MODE_RGMII_ID ; + } + priv->phy_np =of_parse_phandle (pdev->dev.of_node,"phy-handle" ,0 );if (!priv->phy_np) {dev_err (&pdev->dev,"missing required property 'phy-handle'\n" ); ---base-commit:
5d0c230f1de8c7515b6567d9afba1f196fb4e2f4
change-id: 20230727-synquacer-net-e241f34bacebBest regards,
--
Mark Brown <[email protected]>
Quoted 59 lines · Ard Biesheuvel
Quoted 16 lines · Mark Brown
As documented in
acd7aaf51b20("netsec: ignore 'phy-mode' device property on ACPI systems") the SocioNext SynQuacer platform ships with firmware defining the PHY mode as RGMII even though the physical configuration of the PHY is for TX and RX delays. Sincebbc4d71d63549bc("net: phy: realtek: fix rtl8211e rx/tx delay config") this has caused misconfiguration of the PHY, rendering the network unusable.This was worked around for ACPI by ignoring the phy-mode property but the system is also used with DT. For DT instead if we're running on a SynQuacer force a working PHY mode, as well as the standard EDK2 firmware with DT there are also some of these systems that use u-boot and might not initialise the PHY if not netbooting. Newer firmware imagaes for at least EDK2 are available from Linaro so print a warning when doing this.
Quoted 2 lines
Fixes 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")Signed-off-by Mark Brown <[email protected]>Acked-by Ard Biesheuvel <[email protected]>Quoted 36 lines
---
Changes in v3:
- Typo fixes.
- Link to v2: https://lore.kernel.org/r/[email protected]Changes in v2:
- Unlike ACPI force what appears to be the correct mode, there are
u-boot firmwares which might not configure the PHY.
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/net/ethernet/socionext/netsec.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/net/ethernet/socionext/netsec.c +11
-0@@ -1851,6 +1851,17 @@ static int netsec_of_probe(struct platform_device *pdev,return err; } +/* +* SynQuacer is physically configured with TX and RX delays +* but the standard firmware claimed otherwise for a long +* time, ignore it. +*/ +if (of_machine_is_compatible ("socionext,developer-box" ) && + priv->phy_interface !=PHY_INTERFACE_MODE_RGMII_ID ) { +dev_warn (&pdev->dev,"Outdated firmware reports incorrect PHY mode, overriding\n" ); + priv->phy_interface =PHY_INTERFACE_MODE_RGMII_ID ; + } + priv->phy_np =of_parse_phandle (pdev->dev.of_node,"phy-handle" ,0 );if (!priv->phy_np) {dev_err (&pdev->dev,"missing required property 'phy-handle'\n" );
Quoted 8 lines
Quoted 8 lines
---
base-commit:5d0c230f1de8c7515b6567d9afba1f196fb4e2f4
change-id: 20230727-synquacer-net-e241f34bacebBest regards,
--
Mark Brown <[email protected]>
Quoted 15 lines · Mark Brown
As documented in
acd7aaf51b20("netsec: ignore 'phy-mode' device property on ACPI systems") the SocioNext SynQuacer platform ships with firmware defining the PHY mode as RGMII even though the physical configuration of the PHY is for TX and RX delays. Sincebbc4d71d63549bc("net: phy: realtek: fix rtl8211e rx/tx delay config") this has caused misconfiguration of the PHY, rendering the network unusable.This was worked around for ACPI by ignoring the phy-mode property but the system is also used with DT. For DT instead if we're running on a SynQuacer force a working PHY mode, as well as the standard EDK2 firmware with DT there are also some of these systems that use u-boot and might not initialise the PHY if not netbooting. Newer firmware imagaes for at least EDK2 are available from Linaro so print a warning when doing this.
Quoted 2 lines
Fixes 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")Signed-off-by Mark Brown <[email protected]>
Andrew
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 Mon, 31 Jul 2023 11:48:32 +0100 you wrote:
As documented in
acd7aaf51b20("netsec: ignore 'phy-mode' device property on ACPI systems") the SocioNext SynQuacer platform ships with firmware defining the PHY mode as RGMII even though the physical configuration of the PHY is for TX and RX delays. Sincebbc4d71d63549bc("net: phy: realtek: fix rtl8211e rx/tx delay config") this has caused misconfiguration of the PHY, rendering the network unusable.[...]
Here is the summary with links:
- [v3] net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
https://git.kernel.org/netdev/net/c/f3bb7759a924
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html