Dear NXP fellows,
Recently I am doing this investigation concerning a connectivity issue of SJA1110 in our custom board based on NXP S32G399ARDB3 board.
We have the SJA1110 Port 4 connected via SGMII to the PFE_MAC0 interface (Serdes1, lane0).
According to the SJA1110 datasheet, it has 6 internal 100BASE-T1 PHY devices connected to Ports 5~10:
According to this reply in my previous question, "SMI_AP_MDC and SMI_AP_MDIO, The SMI access point (SMI-AP) interface allows S32G to access SJA1110 internal 100BASE-T1 PHYs."
And these PHYs are connected to the MDIO 2, the same used by PFE_MAC2 on this board.
Indeed, when I installed mdio-tools and checked this MDIO bus I could see those PHY devices:
root@s32g399ardb3:~# mdio pfeng-emac-2
DEV PHY-ID LINK
0x03 0x00000000 down
0x09 0x001bb012 down
0x0a 0x001bb012 down
0x0b 0x001bb012 down
0x0c 0x001bb012 down
0x0d 0x001bb012 down
0x0e 0x001bb012 downWhere 0x03 represents the external PHY connected to PFE_MAC2 and the other are the internal PHYs of SJA1110.
However, I don't understand how to use these internal PHY devices.
If I connect the network cable between the internal PHY in port 5 (0x09) and my laptop Ethernet port, should it automatically detect a link?
Does this PHY belong to PFE_MAC0 (SGMII to SJA1110 P4) or to PFE_MAC2 (MDIO bus 2)?
If I assign one IP address to PFE_MAC0, for example:
ifconfig pfe0 192.168.10.5 upAm I assigning this IP address to that specific PHY or to the switch itself?
How can I know which IP address corresponds to each of the internal PHYs of the switch if they are all connected at the same time?
Can someone please guide me to enable a successful interface capable of pinging between the internal PHY and my laptop?
Thank you very much for the support,
Best Regards,
Guilherme
Hello @PavelL ,
Thank you for your support,
Yes, setting up
ifconfig pfe0 192.168.0.15and then the ping command worked as expected.
I found out that my Serdes0 speed setting in U-Boot hwconfig was the issue.
Best regards,
Guilherme
Hello Guilherme,
I'm glad that ping works for you.
I assume that ping from board means: ping from S32G3 -> through the switch -> to laptop.
At first, ping command from linux needs to be send to the PFE_MAC0 interface (Serdes1, lane0).
SJA1110 needs to have enabled routing from port4 (where S32G3 is connected) to port5 (laptop connection). I believe that the example project setups SJA1110 to forward frames to all ports.
At last, windows firewall might be an issue. Please also check your TCP/IP settings. I'm not sure if this Guidance for troubleshooting TCP/IP communication - Windows Server | Microsoft Learn can help you. You may also install & use WireShark to monitor ethernet traffic.
Best regards,
Pavel
Hi @PavelL ,
Thanks again for your replies.
So just to conclude this topic. Following your advice, right now I am able to ping from the computer (192.168.0.100) to the SJA1110 switch (192.168.0.200) through the internal PHYs of the switch.
But I am still unable to do the opposite, to ping from the board to the computer by using the switch PHYs.
In this case, I still need to use one of the Ethernet interfaces in the board for sending this ping request.
But how would I proceed?
Best regards,
Guilherme
Hi Guilherme,
Yes, IP address is set up in S32DS SDK for SJA1110 tcpip_stack -> NetIface.
Yes, the IP address assigned to the interface PFE0 in S32G3 is irrelevant regarding the switch.
I'm fetching register information by SPI_HAP (I work with SJA1110-EVM Evaluation Board).
Best regards,
Pavel
Hi @PavelL ,
Thank you very much for your reply, it was quite enlightening.
You are right, we use a converter for connecting the 100BASE-T1 to the computer.
So, just to clarify, the IP address of the SJA1110 switch is configured in the S32DS SDK for SJA1110 (tcpip_stack -> NetIface), right? Does that mean the IP address assigned to the interface PFE0 in S32G3 is irrelevant regarding the switch?
When you say
PHY_STATUS (0x8102) register shall have value like 0x007E
Are you fetching this information through the S32DS debugger interface connected to the SJA1110 switch or through a specific command in the terminal?
Best regards,
Guilherme
Hi Guilherme,
I believe that you are using some converter like RDDRONE-T1ADAPT: Ethernet media converter | NXP Semiconductors to connect 100BASE-T1 to your computer. Once you do a physical connection, you should see the Link up (PHY_STATUS (0x8102) register shall have value like 0x007E).
PHYs belong to switch. IP addresses belong to TCP/IP protocol. Internal PHYs have only MAC address.
To have successful ping reply, link partner (SJA1110 or S32G3) needs run TCP/IP stack with set IP address.
Since I am connected to corporate network, I have to use some USB to ETHERNET adapter, which appears as Ethernet4 in my case. Address and mask to be setup for this new adapter.
Best regards,
Pavel