diff options
author | Tim Harvey <tharvey@gateworks.com> | 2020-02-26 12:40:11 -0800 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2020-03-09 11:13:02 +0100 |
commit | bcb4ac25396b491a5ffab068f488ad4758ce85ae (patch) | |
tree | 410bbb757e43aa0cf5d4c9db64ea1247cf16aeb6 /target/linux/octeontx/patches-5.4/0001-net-thunderx-use-proper-interface-type-for-RGMII.patch | |
parent | 04a87fedda522895766d7de6f3aeb03c6b3dc3b4 (diff) | |
download | upstream-bcb4ac25396b491a5ffab068f488ad4758ce85ae.tar.gz upstream-bcb4ac25396b491a5ffab068f488ad4758ce85ae.tar.bz2 upstream-bcb4ac25396b491a5ffab068f488ad4758ce85ae.zip |
octeontx: add support for Linux 5.4
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[add KERNEL_TESTING_PATCHVER]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'target/linux/octeontx/patches-5.4/0001-net-thunderx-use-proper-interface-type-for-RGMII.patch')
-rw-r--r-- | target/linux/octeontx/patches-5.4/0001-net-thunderx-use-proper-interface-type-for-RGMII.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/target/linux/octeontx/patches-5.4/0001-net-thunderx-use-proper-interface-type-for-RGMII.patch b/target/linux/octeontx/patches-5.4/0001-net-thunderx-use-proper-interface-type-for-RGMII.patch new file mode 100644 index 0000000000..0369e6ff67 --- /dev/null +++ b/target/linux/octeontx/patches-5.4/0001-net-thunderx-use-proper-interface-type-for-RGMII.patch @@ -0,0 +1,47 @@ +From 2d3da16317086ba6048c601ee88cdc96f19fd741 Mon Sep 17 00:00:00 2001 +From: Tim Harvey <tharvey@gateworks.com> +Date: Fri, 7 Feb 2020 12:40:26 -0800 +Subject: [PATCH 01/12] net: thunderx: use proper interface type for RGMII + +The configuration of the OCTEONTX XCV_DLL_CTL register via +xcv_init_hw() is such that the RGMII RX delay is bypassed +leaving the RGMII TX delay enabled in the MAC: + + /* Configure DLL - enable or bypass + * TX no bypass, RX bypass + */ + cfg = readq_relaxed(xcv->reg_base + XCV_DLL_CTL); + cfg &= ~0xFF03; + cfg |= CLKRX_BYP; + writeq_relaxed(cfg, xcv->reg_base + XCV_DLL_CTL); + +This would coorespond to a interface type of PHY_INTERFACE_MODE_RGMII_RXID +and not PHY_INTERFACE_MODE_RGMII. + +Fixing this allows RGMII PHY drivers to do the right thing (enable +RX delay in the PHY) instead of erroneously enabling both delays in the +PHY. + +Signed-off-by: Tim Harvey <tharvey@gateworks.com> +Reviewed-by: Andrew Lunn <andrew@lunn.ch> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +index 8ae28f8..5f2db9c 100644 +--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c ++++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +@@ -1042,7 +1042,7 @@ static int phy_interface_mode(u8 lmac_type) + if (lmac_type == BGX_MODE_QSGMII) + return PHY_INTERFACE_MODE_QSGMII; + if (lmac_type == BGX_MODE_RGMII) +- return PHY_INTERFACE_MODE_RGMII; ++ return PHY_INTERFACE_MODE_RGMII_RXID; + + return PHY_INTERFACE_MODE_SGMII; + } +-- +2.7.4 + |