net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
[ Upstream commitf3bb7759a9
] As documented inacd7aaf51b
("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. Sincebbc4d71d63
("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:533dd11a12
("net: socionext: Add Synquacer NetSec driver") Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20230731-synquacer-net-v3-1-944be5f06428@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8afe27770d
commit
64763dd851
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue