Feedback on devicetree for imx6qdl connecting to Marvell 6176 DSA networking switch

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Feedback on devicetree for imx6qdl connecting to Marvell 6176 DSA networking switch

2,917 Views
schadalavada
Contributor I

Please give feed back on device tree description forHW-BlockDiagram.jpg

This node in the device tree with CONFIG_NET_DSA_LEGACY enabled in kernel correctly enumerates all interfaces on the Marvell 6176 switch.

dsa@0 {
compatible = "marvell,mv88e6085";
#address-cells = <2>;
#size-cells = <0>;
interrupt-parent = <&gpio2>;
interrupts = <&gpio2 31 IRQ_TYPE_LEVEL_LOW>;
dsa,ethernet = <&eth0>;

switch@0 { #address-cells = <1>; #size-cells = <0>; reg = <0 0>; port@0 { reg = <0>; label = "port0"; }; port@1 { reg = <1>; label = "port1"; }; port@2 { reg = <2>; label = "port2"; }; port@5 { reg = <5>; label = "cpu"; };

BUT this attempt with the new binding causes Linux 4.19 kernel to NOT detect the Marvell 6176 switch and NOT enumerate its ports.

mdio {
       #address-cells = <2>;
       #size-cells = <0>;
       status = "okay";
       switch0: switch0@0 {

               compatible = "marvell,mv88e6085";
               reg = <0 0>;
               interrupt-parent = <&gpio2>;
               interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
               dsa,member = <0 0>;
               ports{

                     #address-cells = <1>;
                     #size-cells = <0>;
                     port@0 {
                           reg = <0>;
                           label = "port0";
                      };

                     port@1 {
                           reg = <1>;
                           label = "port1";
                     };

                     port@2 {
                           reg = <2>;
                           label = "port2";
                     };

                     port@5 {
                           reg = <5>;
                           label = "cpu";
                           ethernet = <&eth0>;
                     };
               };
            };
};

Labels (2)
0 Kudos
Reply
6 Replies

2,573 Views
jimmychan
NXP TechSupport
NXP TechSupport

How you connect the i.MX6Q to the Marvell 6176?

0 Kudos
Reply

2,573 Views
schadalavada
Contributor I

Hi Jimmychan,

   Are you able to see the hardware block diagram? Please let me know if you have any questions after viewing that. Thanks.

0 Kudos
Reply

2,573 Views
jimmychan
NXP TechSupport
NXP TechSupport

I can see the block diagram. I want to know which interface of i.MX6Q you used and how the signals connected?

For your reference. https://community.nxp.com/thread/513481 

0 Kudos
Reply

2,573 Views
schadalavada
Contributor I

Hi Jimmychan,

  We are using a PEX 8065 PCI Express 4 port Gen2 switch. Port 0 of that switch is connected to imx6, port 1 to Intel Gigabit Ethernet Controller. Thanks for the link but our problem is different. The Marvell 6176 switch is connected to Intel Gigabit Ethernet Controller rather than directly to i.MX6 directly. 

0 Kudos
Reply

2,573 Views
jimmychan
NXP TechSupport
NXP TechSupport

Hi,

So you connect the switch to i.mX6q pcie. Do you setup the pcie in device tree file? And select the corresponding driver in the kernel menuconfig?

0 Kudos
Reply

2,573 Views
schadalavada
Contributor I

Yes to both answers. Now I'm able to detect the Marvell 6176 switch with the following device tree entry but its ports are still not enumerated by ifconfig.

pcie@2,1 {
/* Connection to  */
status = "okay";
fsl,max-link-speed = <1>;
pcie@3,0 {
/* The Intel Gigabit Ethernet Controller*/
status = "okay";
fsl,max-link-speed = <1>;
eth0: igb0 {
compatible = "intel,igb";
/* SC: New binding for the Marvell 6176 switch attached to the Intel Gigabit Ethernet Controller
via SERDES link */
mdio1: mdio@0 {
#address-cells = <2>;
#size-cells = <0>;
status = "okay";
switch0: switch0@0 {

compatible = "marvell,mv88e6085";
reg = <0 0>;
interrupt-parent = <&gpio2>;
interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
dsa,member = <0 0>;
mdio2: mdio@1{
ports
{

#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "port0";
};

port@1 {
reg = <1>;
label = "port1";
};

port@2 {
reg = <2>;
label = "port2";
};

port@5 {
reg = <5>;
label = "cpu";
ethernet = <&eth0>;
};
};
};
mdio3: mdio@2{/* External configuration MDIO bus between Intel Gigabit Ethernet Controller and 6176. Followed example in Documentation/devicetree/bindings/dsa /marvell.txt*/
compatible = "marvell,mv88e6xxx-mdio-external";
#address-cells = <1>;
#size-cells = <0>;
};
};
};
};
};

};

0 Kudos
Reply