1 From 2d3da16317086ba6048c601ee88cdc96f19fd741 Mon Sep 17 00:00:00 2001
2 From: Tim Harvey <tharvey@gateworks.com>
3 Date: Fri, 7 Feb 2020 12:40:26 -0800
4 Subject: [PATCH 01/12] net: thunderx: use proper interface type for RGMII
6 The configuration of the OCTEONTX XCV_DLL_CTL register via
7 xcv_init_hw() is such that the RGMII RX delay is bypassed
8 leaving the RGMII TX delay enabled in the MAC:
10 /* Configure DLL - enable or bypass
11 * TX no bypass, RX bypass
13 cfg = readq_relaxed(xcv->reg_base + XCV_DLL_CTL);
16 writeq_relaxed(cfg, xcv->reg_base + XCV_DLL_CTL);
18 This would coorespond to a interface type of PHY_INTERFACE_MODE_RGMII_RXID
19 and not PHY_INTERFACE_MODE_RGMII.
21 Fixing this allows RGMII PHY drivers to do the right thing (enable
22 RX delay in the PHY) instead of erroneously enabling both delays in the
25 Signed-off-by: Tim Harvey <tharvey@gateworks.com>
26 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
27 Signed-off-by: David S. Miller <davem@davemloft.net>
29 drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
32 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
33 +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
34 @@ -1048,7 +1048,7 @@ static int phy_interface_mode(u8 lmac_ty
35 if (lmac_type == BGX_MODE_QSGMII)
36 return PHY_INTERFACE_MODE_QSGMII;
37 if (lmac_type == BGX_MODE_RGMII)
38 - return PHY_INTERFACE_MODE_RGMII;
39 + return PHY_INTERFACE_MODE_RGMII_RXID;
41 return PHY_INTERFACE_MODE_SGMII;