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>
This commit is contained in:
Chuanhong Guo
2018-08-21 19:39:16 +08:00
committed by John Crispin
parent 9300eda00f
commit 028daa9974
4 changed files with 73 additions and 0 deletions

View File

@@ -182,6 +182,7 @@
resets = <&rst 9>;
reset-names = "mac";
qca,mac-idx = <0>;
};
&mdio1 {
@@ -201,4 +202,5 @@
resets = <&rst 13>;
reset-names = "mac";
qca,mac-idx = <1>;
};

View File

@@ -193,4 +193,5 @@
pll-handle = <&pll>;
resets = <&rst 9>;
reset-names = "mac";
qca,mac-idx = <0>;
};