net: phy: motorcomm: Disable rgmii rx delay
authorEmil Renner Berthing <emil.renner.berthing@canonical.com>
Mon, 7 Nov 2022 20:05:18 +0000 (21:05 +0100)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 9 Feb 2023 19:07:47 +0000 (20:07 +0100)
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
drivers/net/phy/motorcomm.c

index c7593f2..35a4f2a 100644 (file)
 
 #define YT8521_CHIP_CONFIG_REG                 0xA001
 #define YT8521_CCR_SW_RST                      BIT(15)
+#define YT8521_CCR_RXC_DLY_EN                  BIT(8)
 
 #define YT8521_CCR_MODE_SEL_MASK               (BIT(2) | BIT(1) | BIT(0))
 #define YT8521_CCR_MODE_UTP_TO_RGMII           0
@@ -1150,6 +1151,12 @@ static int yt8521_config_init(struct phy_device *phydev)
                                       val);
                if (ret < 0)
                        goto err_restore_page;
+
+               /* disable rx delay */
+               ret = ytphy_modify_ext(phydev, YT8521_CHIP_CONFIG_REG,
+                                      YT8521_CCR_RXC_DLY_EN, 0);
+               if (ret < 0)
+                       goto err_restore_page;
        }
 
        /* disable auto sleep */