Interfacing KSZ9477 switch with custom imx8mplus board

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

Interfacing KSZ9477 switch with custom imx8mplus board

657 Views
aaronrenny
Contributor II

Hi all,

I am working on bringing up a custom imx8mplus based board. The imx processor has two ethernet connections:

  • To an external phy (ksz9131) which is inturn connected to port 4 of external switch (ksz9477)
  • Directly to port 6 of the same external switch. Port 6 is configured in RGMII mode and the switch bit is 1. The description of switch bit is as follows:

LED5_1 Switch Enable at Startup
0: Start Switch is disabled. The switch will not forward packets until the Start Switch bit is set
in the Switch Operation Register.
1: Start Switch is enabled. The switch will forward packets immediately after reset. (Default).

By making the below given modifications in the dts file and u-boot source code, I was able to detect the external phy (KSZ9131) and eth0 interface is up. But on connecting a ethernet cable, IP doesnot get assigned to eth0. 

&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec>;
phy-mode = "rgmii-id";
phy-handle = <&ethphy1>;
fsl,magic-packet;
status = "okay";

mdio {
#address-cells = <1>;
#size-cells = <0>;

ethphy1: ethernet-phy@3 {

reg = <3>;
compatible = "ethernet-phy-id0022.1640";
};
};
};

The MDIO lines of the processor is connected to switch and phy. On doing mii info, i am only able to detect the phy. MDIO list also gives the details of phy only. 

Is there any modifications required to bring up the switch??. The processor is connected to just the port 6 of the switch so I believe that we dont need any special drivers for bringing it up. Is this understanding correct?. Also, is it possible to detect the switch through MDIO lines?. We have not done any modifications to the switch registers apart from setting the hardware strap LED5_1 to 1. Are any additional configurations required?

Please do help out on this issue.

Thank you,

Aaron

0 Kudos
Reply
2 Replies

636 Views
Rita_Wang
NXP TechSupport
NXP TechSupport
0 Kudos
Reply

594 Views
aaronrenny
Contributor II

Hi @Rita_Wang ,

Thank you for the reply.

After booting up the kernel as setting the speed to 1000Mbps using ethtool, we are able to see that the eth0 link is UP and ip address is getting assinged. However, each time we remove and replug the ethernet cable, the connection goes away. Rebooting the system also results in the same. Before doing 

ethtool -s eth0 speed 1000 duplex full autoneg on ,

the speed and duplex are listed in the ethtool as unknown, link detected is no. What might be causing this issue?.

Please do share any suggestions on the issue.

Thanks and regards,

Aaron

0 Kudos
Reply