cns3xxx: add preliminary 4.9 support
[openwrt/staging/lynxis/omap.git] / target / linux / cns3xxx / patches-4.9 / 200-broadcom_phy_reinit.patch
diff --git a/target/linux/cns3xxx/patches-4.9/200-broadcom_phy_reinit.patch b/target/linux/cns3xxx/patches-4.9/200-broadcom_phy_reinit.patch
new file mode 100644 (file)
index 0000000..f3ae5e6
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/drivers/net/phy/broadcom.c
++++ b/drivers/net/phy/broadcom.c
+@@ -414,6 +414,11 @@ static int bcm5481_config_aneg(struct ph
+               /* Write bits 14:0. */
+               reg |= (1 << 15);
+               phy_write(phydev, 0x18, reg);
++      } else {
++              phy_write(phydev, 0x18, 0xf1e7);
++              phy_write(phydev, 0x1c, 0x8e00);
++
++              phy_write(phydev, 0x1c, 0xa41f);
+       }
+       if (of_property_read_bool(np, "enet-phy-lane-swap")) {