* [PATCH v2] net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
@ 2023-07-28 22:51 Mark Brown
2023-07-28 22:54 ` Florian Fainelli
2023-07-30 16:17 ` Simon Horman
0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2023-07-28 22:51 UTC (permalink / raw)
To: Jassi Brar, Ilias Apalodimas, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Ard Biesheuvel
Cc: netdev, linux-kernel, 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 commits. 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.
Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
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/20230727-synquacer-net-v1-1-4d7f5c4cc8d9@kernel.org
---
drivers/net/ethernet/socionext/netsec.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
index 2d7347b71c41..cdb05db3d6ac 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -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 firwmare 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: 6eaae198076080886b9e7d57f4ae06fa782f90ef
change-id: 20230727-synquacer-net-e241f34baceb
Best regards,
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
2023-07-28 22:51 [PATCH v2] net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode Mark Brown
@ 2023-07-28 22:54 ` Florian Fainelli
2023-07-28 23:28 ` Mark Brown
2023-07-30 16:17 ` Simon Horman
1 sibling, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2023-07-28 22:54 UTC (permalink / raw)
To: Mark Brown, Jassi Brar, Ilias Apalodimas, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Ard Biesheuvel
Cc: netdev, linux-kernel
On 7/28/23 15:51, Mark Brown 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 commits.
Did you mean to write "delays" instead of "commits" here?
> 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.
>
> Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")
> Signed-off-by: Mark Brown <broonie@kernel.org>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
2023-07-28 22:54 ` Florian Fainelli
@ 2023-07-28 23:28 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2023-07-28 23:28 UTC (permalink / raw)
To: Florian Fainelli
Cc: Jassi Brar, Ilias Apalodimas, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Ard Biesheuvel, netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
On Fri, Jul 28, 2023 at 03:54:08PM -0700, Florian Fainelli wrote:
> On 7/28/23 15:51, Mark Brown 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 commits.
> Did you mean to write "delays" instead of "commits" here?
Yes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
2023-07-28 22:51 [PATCH v2] net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode Mark Brown
2023-07-28 22:54 ` Florian Fainelli
@ 2023-07-30 16:17 ` Simon Horman
1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-07-30 16:17 UTC (permalink / raw)
To: Mark Brown
Cc: Jassi Brar, Ilias Apalodimas, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Ard Biesheuvel, netdev, linux-kernel
On Fri, Jul 28, 2023 at 11:51:03PM +0100, Mark Brown wrote:
...
> diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
> index 2d7347b71c41..cdb05db3d6ac 100644
> --- a/drivers/net/ethernet/socionext/netsec.c
> +++ b/drivers/net/ethernet/socionext/netsec.c
> @@ -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 firwmare claimed otherwise for a long
nit: firwmare -> firmware
...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-30 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 22:51 [PATCH v2] net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode Mark Brown
2023-07-28 22:54 ` Florian Fainelli
2023-07-28 23:28 ` Mark Brown
2023-07-30 16:17 ` Simon Horman
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).