ramips: apply LED_POLARITY rt3050-esw on MT7628AN/MT7688
[openwrt/openwrt.git] / target / linux / ramips / files-4.14 / drivers / net / ethernet / mediatek / esw_rt3050.c
index 816c588dd7f2db40c8e10c4d7f76b4c9cf90fab8..292f11a1700e03862e35a772a64e4f56da818b59 100644 (file)
@@ -617,6 +617,10 @@ static void esw_hw_init(struct rt305x_esw *esw)
                /* reset EPHY */
                fe_reset(RT5350_RESET_EPHY);
 
+               /* set the led polarity */
+               esw_w32(esw, esw->reg_led_polarity & 0x1F,
+                       RT5350_EWS_REG_LED_POLARITY);
+
                rt305x_mii_write(esw, 0, 31, 0x2000); /* change G2 page */
                rt305x_mii_write(esw, 0, 26, 0x0020);