aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorMaximilian Pachl <m@ximilian.info>2019-11-13 12:57:28 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-01-19 10:55:31 +0100
commit9e799f3eee9878bc8240f1de06d4eabdea7a2093 (patch)
treef32898657180a7045e83d4650b1dd1adb0dbb747 /target
parent7a8bfbf0ffaea14e15ae2016a54adf48337c6251 (diff)
downloadupstream-9e799f3eee9878bc8240f1de06d4eabdea7a2093.tar.gz
upstream-9e799f3eee9878bc8240f1de06d4eabdea7a2093.tar.bz2
upstream-9e799f3eee9878bc8240f1de06d4eabdea7a2093.zip
ramips: apply LED_POLARITY rt3050-esw on MT7628AN/MT7688
The device tree property "mediatek,led_polarity" is ignored for MT7628AN and MT7688. According to the datasheet both SoCs have the matching register. Therefore the property should be applied on these two devices as well. Signed-off-by: Maximilian Pachl <m@ximilian.info> Reviewed-by: Sungbo Eo <mans0n@gorani.run> Tested-by: Sungbo Eo <mans0n@gorani.run>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c
index 816c588dd7..292f11a170 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c
@@ -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);