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>
Wed, 22 Aug 2018 10:13:51 +0000 (12:13 +0200)
commit31b3e3956fc94a503a4d7372771e515eb9860ed3
treedd0d4d6dad57154e92b836aa31b5c3c4362059d8
parent80c23ace9a457903dcf176c9b2dc9f509ef806e0
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