* [PATCH net v2 1/3] net: fsl/fman: treat all RGMII modes in memac_adjust_link()
2020-03-16 12:05 [PATCH net v2 0/3] QorIQ DPAA ARM RDBs need internal delay on RGMII Madalin Bucur
@ 2020-03-16 12:05 ` Madalin Bucur
2020-03-16 16:09 ` Andrew Lunn
2020-03-16 12:05 ` [PATCH net v2 2/3] arm64: dts: ls1043a-rdb: correct RGMII delay mode to rgmii-id Madalin Bucur
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Madalin Bucur @ 2020-03-16 12:05 UTC (permalink / raw)
To: davem, netdev
Cc: devicetree, shawnguo, leoyang.li, robh+dt, mark.rutland,
linux-kernel, Madalin Bucur
Treat all internal delay variants the same as RGMII.
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
---
v2: used phy_interface_mode_is_rgmii() to identify RGMII
drivers/net/ethernet/freescale/fman/fman_memac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c
index e1901874c19f..0d2b4ab01f24 100644
--- a/drivers/net/ethernet/freescale/fman/fman_memac.c
+++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
@@ -782,7 +782,7 @@ int memac_adjust_link(struct fman_mac *memac, u16 speed)
/* Set full duplex */
tmp &= ~IF_MODE_HD;
- if (memac->phy_if == PHY_INTERFACE_MODE_RGMII) {
+ if (phy_interface_mode_is_rgmii(memac->phy_if)) {
/* Configure RGMII in manual mode */
tmp &= ~IF_MODE_RGMII_AUTO;
tmp &= ~IF_MODE_RGMII_SP_MASK;
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net v2 1/3] net: fsl/fman: treat all RGMII modes in memac_adjust_link()
2020-03-16 12:05 ` [PATCH net v2 1/3] net: fsl/fman: treat all RGMII modes in memac_adjust_link() Madalin Bucur
@ 2020-03-16 16:09 ` Andrew Lunn
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2020-03-16 16:09 UTC (permalink / raw)
To: Madalin Bucur
Cc: davem, netdev, devicetree, shawnguo, leoyang.li, robh+dt,
mark.rutland, linux-kernel
On Mon, Mar 16, 2020 at 02:05:56PM +0200, Madalin Bucur wrote:
> Treat all internal delay variants the same as RGMII.
>
> Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net v2 2/3] arm64: dts: ls1043a-rdb: correct RGMII delay mode to rgmii-id
2020-03-16 12:05 [PATCH net v2 0/3] QorIQ DPAA ARM RDBs need internal delay on RGMII Madalin Bucur
2020-03-16 12:05 ` [PATCH net v2 1/3] net: fsl/fman: treat all RGMII modes in memac_adjust_link() Madalin Bucur
@ 2020-03-16 12:05 ` Madalin Bucur
2020-03-16 12:05 ` [PATCH net v2 3/3] arm64: dts: ls1046ardb: set RGMII interfaces to RGMII_ID mode Madalin Bucur
2020-03-16 21:58 ` [PATCH net v2 0/3] QorIQ DPAA ARM RDBs need internal delay on RGMII David Miller
3 siblings, 0 replies; 6+ messages in thread
From: Madalin Bucur @ 2020-03-16 12:05 UTC (permalink / raw)
To: davem, netdev
Cc: devicetree, shawnguo, leoyang.li, robh+dt, mark.rutland,
linux-kernel, Madalin Bucur
The correct setting for the RGMII ports on LS1043ARDB is to
enable delay on both Rx and Tx so the interface mode used must
be PHY_INTERFACE_MODE_RGMII_ID.
Since commit 1b3047b5208a80 ("net: phy: realtek: add support for
configuring the RX delay on RTL8211F") the Realtek 8211F PHY driver
has control over the RGMII RX delay and it is disabling it for
RGMII_TXID. The LS1043ARDB uses two such PHYs in RGMII_ID mode but
in the device tree the mode was described as "rgmii_txid".
This issue was not apparent at the time as the PHY driver took the
same action for RGMII_TXID and RGMII_ID back then but it became
visible (RX no longer working) after the above patch.
Changing the phy-connection-type to "rgmii-id" to address the issue.
Fixes: bf02f2ffe59c ("arm64: dts: add LS1043A DPAA FMan support")
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
---
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
index 4223a2352d45..dde50c88f5e3 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
@@ -119,12 +119,12 @@
ethernet@e4000 {
phy-handle = <&rgmii_phy1>;
- phy-connection-type = "rgmii-txid";
+ phy-connection-type = "rgmii-id";
};
ethernet@e6000 {
phy-handle = <&rgmii_phy2>;
- phy-connection-type = "rgmii-txid";
+ phy-connection-type = "rgmii-id";
};
ethernet@e8000 {
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net v2 3/3] arm64: dts: ls1046ardb: set RGMII interfaces to RGMII_ID mode
2020-03-16 12:05 [PATCH net v2 0/3] QorIQ DPAA ARM RDBs need internal delay on RGMII Madalin Bucur
2020-03-16 12:05 ` [PATCH net v2 1/3] net: fsl/fman: treat all RGMII modes in memac_adjust_link() Madalin Bucur
2020-03-16 12:05 ` [PATCH net v2 2/3] arm64: dts: ls1043a-rdb: correct RGMII delay mode to rgmii-id Madalin Bucur
@ 2020-03-16 12:05 ` Madalin Bucur
2020-03-16 21:58 ` [PATCH net v2 0/3] QorIQ DPAA ARM RDBs need internal delay on RGMII David Miller
3 siblings, 0 replies; 6+ messages in thread
From: Madalin Bucur @ 2020-03-16 12:05 UTC (permalink / raw)
To: davem, netdev
Cc: devicetree, shawnguo, leoyang.li, robh+dt, mark.rutland,
linux-kernel, Madalin Bucur
The correct setting for the RGMII ports on LS1046ARDB is to
enable delay on both Rx and Tx so the interface mode used must
be PHY_INTERFACE_MODE_RGMII_ID.
Since commit 1b3047b5208a80 ("net: phy: realtek: add support for
configuring the RX delay on RTL8211F") the Realtek 8211F PHY driver
has control over the RGMII RX delay and it is disabling it for
RGMII_TXID. The LS1046ARDB uses two such PHYs in RGMII_ID mode but
in the device tree the mode was described as "rgmii".
Changing the phy-connection-type to "rgmii-id" to address the issue.
Fixes: 3fa395d2c48a ("arm64: dts: add LS1046A DPAA FMan nodes")
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
---
arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts
index dbc23d6cd3b4..d53ccc56bb63 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts
@@ -131,12 +131,12 @@
&fman0 {
ethernet@e4000 {
phy-handle = <&rgmii_phy1>;
- phy-connection-type = "rgmii";
+ phy-connection-type = "rgmii-id";
};
ethernet@e6000 {
phy-handle = <&rgmii_phy2>;
- phy-connection-type = "rgmii";
+ phy-connection-type = "rgmii-id";
};
ethernet@e8000 {
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net v2 0/3] QorIQ DPAA ARM RDBs need internal delay on RGMII
2020-03-16 12:05 [PATCH net v2 0/3] QorIQ DPAA ARM RDBs need internal delay on RGMII Madalin Bucur
` (2 preceding siblings ...)
2020-03-16 12:05 ` [PATCH net v2 3/3] arm64: dts: ls1046ardb: set RGMII interfaces to RGMII_ID mode Madalin Bucur
@ 2020-03-16 21:58 ` David Miller
3 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-03-16 21:58 UTC (permalink / raw)
To: madalin.bucur
Cc: netdev, devicetree, shawnguo, leoyang.li, robh+dt, mark.rutland,
linux-kernel
From: Madalin Bucur <madalin.bucur@oss.nxp.com>
Date: Mon, 16 Mar 2020 14:05:55 +0200
> v2: used phy_interface_mode_is_rgmii() to identify RGMII
>
> The QorIQ DPAA 1 based RDB boards require internal delay on
> both Tx and Rx to be set. The patch set ensures all RGMII
> modes are treated correctly by the FMan driver and sets the
> phy-connection-type to "rgmii-id" to restore functionality.
> Previously Rx internal delay was set by board pull-ups and
> was left untouched by the PHY driver. Since commit
> 1b3047b5208a80 ("net: phy: realtek: add support for
> configuring the RX delay on RTL8211F") the Realtek 8211F PHY
> driver has control over the RGMII RX delay and it is
> disabling it for other modes than RGMII_RXID and RGMII_ID.
>
> Please note that u-boot in particular performs a fix-up of
> the PHY connection type and will overwrite the values from
> the Linux device tree. Another patch set was sent for u-boot
> and one needs to apply that [1] to the boot loader, to ensure
> this fix is complete, unless a different bootloader is used.
Series applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread