summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/macb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index a968a4bd063..cf76270ad82 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -759,6 +759,13 @@ static int _macb_init(struct macb_device *macb, const char *name)
gem_writel(macb, USRIO, GEM_BIT(RGMII));
else
gem_writel(macb, USRIO, 0);
+
+ if (macb->phy_interface == PHY_INTERFACE_MODE_SGMII) {
+ unsigned int ncfgr = macb_readl(macb, NCFGR);
+
+ ncfgr |= GEM_BIT(SGMIIEN) | GEM_BIT(PCSSEL);
+ macb_writel(macb, NCFGR, ncfgr);
+ }
#else
#if defined(CONFIG_RGMII) || defined(CONFIG_RMII)
gem_writel(macb, USRIO, GEM_BIT(RGMII));