Interfacing with SJA1110 Ethernet Switch

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

Interfacing with SJA1110 Ethernet Switch

Jump to solution
1,170 Views
jsmith8831
Contributor III

Hello,

I have a i.MX8 SOM with a AR8033 PHY connected via RGMII (See Block Diagram.jpg attachment).  The output of this PHY is then connected to the output of another AR8033 PHY on the SJA1110 Ethernet Switch via RGMII.  I'm having trouble getting this connection to the Switch to work.  The switch sees the connection and can detect the link and activity.  However, I'm seeing a lot of RX_CRC errors with ethtool, and I'm unable to connect to the FTP server running on the SJA1110.  At the same time, if I connect my PC with an Ethernet cable to the RJ45 jack which is another port on the switch, I can connect to the FTP server on the SJA1110.

I have attached the relevant pages from the schematics of the SOM and Carrier Board.  You can also see my device tree below.  I was getting a lot of RX dropped packets, so when I changed phy-mode to "rgmii-id", I stopped getting RX dropped packets, but I can see that I'm getting RX_CRC errors.

&fec1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_fec1>;
	phy-mode = "rgmii-id";
	phy-handle = <&ethphy0>;
	fsl,magic-packet;
	status = "okay";

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

		ethphy0: ethernet-phy@3 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <3>;
			qca,disable-smarteee;
			vddio-supply = <&vddio0>;

			vddio0: vddio-regulator {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
			};
		};
	};
};

pinctrl_fec1: fec1grp {
	fsl,pins = <
		IMX8QM_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB_PAD		0x000014a0
		IMX8QM_ENET0_MDC_CONN_ENET0_MDC				0x06000020
		IMX8QM_ENET0_MDIO_CONN_ENET0_MDIO			0x06000020
		IMX8QM_ENET0_RGMII_TX_CTL_CONN_ENET0_RGMII_TX_CTL	0x06000020
		IMX8QM_ENET0_RGMII_TXC_CONN_ENET0_RGMII_TXC		0x06000020
		IMX8QM_ENET0_RGMII_TXD0_CONN_ENET0_RGMII_TXD0		0x06000020
		IMX8QM_ENET0_RGMII_TXD1_CONN_ENET0_RGMII_TXD1		0x06000020
		IMX8QM_ENET0_RGMII_TXD2_CONN_ENET0_RGMII_TXD2		0x06000020
		IMX8QM_ENET0_RGMII_TXD3_CONN_ENET0_RGMII_TXD3		0x06000020
		IMX8QM_ENET0_RGMII_RXC_CONN_ENET0_RGMII_RXC		0x06000020
		IMX8QM_ENET0_RGMII_RX_CTL_CONN_ENET0_RGMII_RX_CTL	0x06000020
		IMX8QM_ENET0_RGMII_RXD0_CONN_ENET0_RGMII_RXD0		0x06000020
		IMX8QM_ENET0_RGMII_RXD1_CONN_ENET0_RGMII_RXD1		0x06000020
		IMX8QM_ENET0_RGMII_RXD2_CONN_ENET0_RGMII_RXD2		0x06000020
		IMX8QM_ENET0_RGMII_RXD3_CONN_ENET0_RGMII_RXD3		0x06000020
	>;
};

.

 Is there something wrong with my device tree configuration?  Or is there an issue with the hardware?  Please let me know if you need any additional information.  Thank you!

Tags (2)
0 Kudos
Reply
1 Solution
1,116 Views
jsmith8831
Contributor III

I figured out my problem.  I ended up installing tcpdump and discovered that when I try to ping the device from my PC, the device was receiving the packets, but it's response never made it past the SJA1110 switch.  Once I discovered this I realized the problem was on the iMX8 transmit or SJA1110 receive side of things. I ended up removing the internal delay on MII3-RXC and then traffic began flowing both directions.

 

View solution in original post

0 Kudos
Reply
3 Replies
1,130 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @jsmith8831 

Can you also share the device tree node about SJA1110?

 

Best Regards

Zhiming

0 Kudos
Reply
1,120 Views
jsmith8831
Contributor III

Hi @Zhiming_Liu,

I am currently using the QSPI Flash to boot the SJA1110, and basing the code off the switch_config_sja1110evm example from the SDK.  I can share my swtichcore configuration files with you if you would like to see them?

I do have the ability to configure the SJA1110 to boot from SPI and be controlled by the iMX8 - would that be better?  I see there is a Linux driver available for it.

0 Kudos
Reply
1,117 Views
jsmith8831
Contributor III

I figured out my problem.  I ended up installing tcpdump and discovered that when I try to ping the device from my PC, the device was receiving the packets, but it's response never made it past the SJA1110 switch.  Once I discovered this I realized the problem was on the iMX8 transmit or SJA1110 receive side of things. I ended up removing the internal delay on MII3-RXC and then traffic began flowing both directions.

 

0 Kudos
Reply