diff options
author | Ramon Fried | 2019-07-16 22:04:34 +0300 |
---|---|---|
committer | Joe Hershberger | 2019-07-25 13:13:30 -0500 |
commit | 5a1899f9fcf46cc61f095408b17952d29e76cde5 (patch) | |
tree | 6d7d5f34d51f91d035b9ad415fd9364807d379b8 /drivers | |
parent | 0a2827e3ac4e24bb9948066bf37d8a1740066b82 (diff) |
net: macb: add support for SGMII phy interface
This patch adds support for the sgmii phy interface,
available only to DM users, dictated by current driver
design.
Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Tested-by: Anup Patel <anup.patel@wdc.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/macb.c | 7 |
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)); |