2
0
forked from Ivasoft/openwrt

kernel: rtl8366-smi: add Realtek switch management via mii-bus

Current version of rtl8366-smi module only supports Realtek switch
managment via two gpio lines. This adds Realtek switch
management via mii_bus. Tested on a Tp-link Archer C2 v1 (Mediatek
SoC mt7620a based)

dts-file configuration should look like this:

rtl8367rb {
	compatible = "realtek,rtl8367b";
	realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
	mii-bus = <&mdio0>;
};

&ethernet {
	status = "okay";
	mtd-mac-address = <&rom 0xf100>;
	pinctrl-names = "default";
	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

	port@5 {
		status = "okay";
		mediatek,fixed-link = <1000 1 1 1>;
		phy-mode = "rgmii";
	};

	mdio0: mdio-bus {
		status = "okay";
	};
};

Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Franz Flasch <franz.flasch@gmx.at>
This commit is contained in:
Franz Flasch
2018-05-17 11:51:38 +02:00
committed by Mathias Kresin
parent f9e7f19334
commit d4ac26ec49
2 changed files with 141 additions and 17 deletions

View File

@@ -63,6 +63,7 @@ struct rtl8366_smi {
u16 dbg_reg;
u8 dbg_vlan_4k_page;
#endif
struct mii_bus *ext_mbus;
};
struct rtl8366_vlan_mc {