Device Tree entry for Marvell DSA

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

SimonT
Posts: 6
Joined: Wed Mar 04, 2015 9:54 am

Device Tree entry for Marvell DSA

Wed May 13, 2015 4:45 pm

Hello,

I am trying to connect my Sam9x25ek to a Marvell 88E6085 by using the dsa-driver. The driver requires me to define a mii-handle. Has anyone an idea how to create this or to what node in the device tree I have to bind this?

Regards Simon
blue_z
Location: USA
Posts: 1713
Joined: Thu Apr 19, 2007 10:15 pm

Re: Device Tree entry for Marvell DSA

Thu May 14, 2015 9:49 pm

SimonT wrote:I am trying to connect my Sam9x25ek to a Marvell 88E6085 by using the dsa-driver.
So what is a Marvell 88E6085, e.g. where is the datasheet?
How are you connecting this to the eval board?
SimonT wrote:The driver requires me to define a mii-handle.
What driver is this, e.g. a link to source code?

Regards
SimonT
Posts: 6
Joined: Wed Mar 04, 2015 9:54 am

Re: Device Tree entry for Marvell DSA

Mon May 18, 2015 7:32 am

Hello,

sorry it seems I haven´t been clear enough.

Marvell 88E6085 is a switch-chip (10 port fastethernet) that is connected by an mdi to my sam9x25. For management purposes I use smi (mdio/mdc). I am able to read/write registers through smi in the switch by using a self written c-program.

There is a driver called dsa in the linux kernel making the ports of the switch available in linux for management.

The hardware of the board is defined by a device tree that was originaly created by the yocto project (open embedded). The dsa driver requires the extend the device tree by a dsa node that contain bindings to the ethernet-interface (dsa,ethernet) and an mdii-bus (dsa,mii-bus).
My problem is that there is no mii-bus node in my device tree and the ethernet-driver doesn´t seem to allow to define one. I have seen in other examples that mii-bus is a sub-node of the ethernet-interface but that doesn´t work in this case.

Code: Select all

dsa@0 {
		compatible = "marvell,dsa";
		#address-cells = <2>;
		#size-cells = <0>;

		interrupts = <10>;
		dsa,ethernet = <0x30>;
		dsa,mii-bus = <????>;  <------------------------

		switch@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1 0>;	/* MDIO address 1, switch 0 in tree */

			port@0 {
				reg = <0>;
				label = "lan1";
			};

			port@1 {
				reg = <1>;
				label = "lan2";
			};
		};
Regards
Simon
blue_z
Location: USA
Posts: 1713
Joined: Thu Apr 19, 2007 10:15 pm

Re: Device Tree entry for Marvell DSA

Wed May 20, 2015 2:32 am

SimonT wrote:My problem is that there is no mii-bus node in my device tree and the ethernet-driver doesn´t seem to allow to define one.
What did you try, and how did the driver not "allow" this definition?
SimonT wrote:I have seen in other examples that mii-bus is a sub-node of the ethernet-interface but that doesn´t work in this case.
A "sub-node"?  
The DT files for the Marvell Armada 370 don't look that way to me.

Regards
SimonT
Posts: 6
Joined: Wed Mar 04, 2015 9:54 am

Re: Device Tree entry for Marvell DSA

Thu May 21, 2015 8:38 am

Hello,

the ethernet drive I use has the following device tree documentation: http://lxr.free-electrons.com/source/Do ... s-emac.txt
As you can see, the re is no way to define a mdio-bus.
For example the freescale driver is able to do so: http://lxr.free-electrons.com/source/Do ... sl-fec.txt
PowerPenguin
Posts: 15
Joined: Mon Feb 19, 2018 12:41 pm

Re: Device Tree entry for Marvell DSA

Wed Mar 07, 2018 1:26 pm

Any updates on this topic ?

We use v3.16 or 4.14 an AT91SAM9G20 with Marvell 88E6061 or SMSC LAN9303 switch
Both have driver support in 4.14
https://elixir.bootlin.com/linux/v4.14. ... arvell.txt
https://elixir.bootlin.com/linux/v4.14. ... an9303.txt

but its unclear how to hook any switch together by MDIO with the cadence MACB IP used by Atmel
https://elixir.bootlin.com/linux/v4.14. ... t/macb.txt
https://elixir.bootlin.com/linux/v4.14. ... t/mdio.txt


Port 0 link MDIO detection works with MACB
fixed PHY by dts is the solution if no MDIO is connected and switch is manged by another controller. So we use as workaround but we are not happy with this.

A switch example by Atmel would be great, but I do not know if they ever put a switch on one of there eval boards ?
A switch example of Xilinx could help also a lot, because they use the same IP
https://forums.xilinx.com/t5/Embedded-L ... d-p/779400
Where is macb-mdio ?
https://patchwork.kernel.org/patch/9089791/


Best regrards,
PP

P.S. a lot of views :shock: on this issue before, I hope Atmel/Microchip wont leave us in the fog .

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests