I'm trying to implement DSA for IMX6DL and the SMSC LAN9303 ethernet switch (i.e. exposing the switch ports as 'virtual' ethernet ports eth1 and eth2).
However, I'm stumped on how to refer to the IMX6DL FEC MDIO device node, which is required by dsa (dsa.txt). I can of course add an mdio node, like in imx6sx-sdb.dts, but I still don't understand how to refer to it?
Has anyone tried something similar? Is DSA the way to go, or would you suggest implementing a custom driver unrelated to DSA?
I ended up modifying the fec driver to handle LAN9303. We now have eth0 only for switch communication, and eth1/eth2 as separate ethernet ports.
Not a pretty solution, but hey it works..
I'd love to try Wim's DSA suggestion - but since we got it working that'll probably not happen. Sadly, since it would be a much cleaner solution.
Hi,
As you mentioned we lack of an example for that. We have other threads similar to this topic like this one:
Unable to integrate a Marvell 88E6071 switch on imx28 board with MII/MDIO
You can use as start point the above thread.
I am not an expert on this topic but in the example found in that topic they use a different fec driver.
The connection is via RGMII, RMII or other kind to the switch, meaning that the FEC driver must remain the same.
/Alejandro
I connected a micrel switch with dsa successfully:
snippet dtb:
reference handles in dsa node:
dsa,ethernet = <&fec>;
dsa,mii-bus = <&mdio>;
&fec {
pinctrl-names = "default";
pinctrl-0 = <&enet_pins>;
phy-mode = "rmii";
phy-reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
status = "okay";
label = "fec";
fixed-link {
speed = <100>;
full-duplex;
};
mdio: mdio@0 {
#address-cells = <1>;
#size-cells = <0>;
};
};
regards,
Wim
Hi Wim,
Can you please post the dsa node you used to get it working?
Thanks,