ath79: ag71xx: apply interface mode to MII0/1_CTRL on ar71xx/ar913x
authorChuanhong Guo <gch981213@gmail.com>
Tue, 21 Aug 2018 11:39:16 +0000 (19:39 +0800)
committerJohn Crispin <john@phrozen.org>
Tue, 28 Aug 2018 09:26:53 +0000 (11:26 +0200)
commit028daa99743b87d33759529d40835cb51dced5cc
tree96c9894858af9d1296e7d5f630f61c99d0c67369
parent9300eda00fa91fda22cea56677db5dfa2371ddcb
ath79: ag71xx: apply interface mode to MII0/1_CTRL on ar71xx/ar913x

We currently don't have any code configuring interface mode in ath79,
meaning that we relies on bootloader to set the correct interface mode.

This patch added code to set interface correctly so that everything works
even if bootloader configures it wrong.(e.g. on WNDR3800 u-boot set
the second GMAC mode to RMII but it should be RGMII.)

Introduced "qca,mac-idx" for the difference in MII_CTRL register value.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ath79/dts/ar7100.dtsi
target/linux/ath79/dts/ar9132.dtsi
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c