Skip to content

Commit f3bb775

Browse files
brooniekuba-moo
authored andcommitted
net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
As documented in acd7aaf ("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 bbc4d71 ("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. Fixes: 533dd11 ("net: socionext: Add Synquacer NetSec driver") Signed-off-by: Mark Brown <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 0b6291a commit f3bb775

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/net/ethernet/socionext/netsec.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,6 +1851,17 @@ static int netsec_of_probe(struct platform_device *pdev,
18511851
return err;
18521852
}
18531853

1854+
/*
1855+
* SynQuacer is physically configured with TX and RX delays
1856+
* but the standard firmware claimed otherwise for a long
1857+
* time, ignore it.
1858+
*/
1859+
if (of_machine_is_compatible("socionext,developer-box") &&
1860+
priv->phy_interface != PHY_INTERFACE_MODE_RGMII_ID) {
1861+
dev_warn(&pdev->dev, "Outdated firmware reports incorrect PHY mode, overriding\n");
1862+
priv->phy_interface = PHY_INTERFACE_MODE_RGMII_ID;
1863+
}
1864+
18541865
priv->phy_np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
18551866
if (!priv->phy_np) {
18561867
dev_err(&pdev->dev, "missing required property 'phy-handle'\n");

0 commit comments

Comments
 (0)