From: Michal Simek Date: Wed, 13 May 2020 14:05:01 +0000 (-0600) Subject: net: gem: Disable PCS autonegotiation in case of fixed-link X-Git-Tag: v2020.10~139^2~8^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26e62cc9713ebe728d01826e8c22c3c56f8e3bf4;p=platform%2Fkernel%2Fu-boot.git net: gem: Disable PCS autonegotiation in case of fixed-link Disable PCS autonegotiation if fixed-link node is present in device tree. This way systems with multiple GEM instances with a combination of SGMII-fixed and SGMII-PHY will work. Reported-by: Goran Marinkovic Signed-off-by: Michal Simek Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 412daf7..da4b6fb 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -451,8 +451,12 @@ static int zynq_gem_init(struct udevice *dev) nwconfig |= ZYNQ_GEM_NWCFG_SGMII_ENBL | ZYNQ_GEM_NWCFG_PCS_SEL; #ifdef CONFIG_ARM64 + if (priv->phydev->phy_id != PHY_FIXED_ID) writel(readl(®s->pcscntrl) | ZYNQ_GEM_PCS_CTL_ANEG_ENBL, ®s->pcscntrl); + else + writel(readl(®s->pcscntrl) & ~ZYNQ_GEM_PCS_CTL_ANEG_ENBL, + ®s->pcscntrl); #endif }