How to Debug Serdes SGMII

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

How to Debug Serdes SGMII

Jump to solution
5,916 Views
Coco111
Contributor III

Platform Description

soc:S32G399

bsp: bsp35

pfe:s32g_pfe_class.fw  (1.5.0 md5sum 0b46ffc4ee207e4334608e312dc16551)

 

uboot configuration:

=>setenv hwconfig "serdes0:mode=pcie,clock=ext;pcie0:mode=rc;serdes1:mode=xpcs0&xpcs1,clock=int;xpcs1_0:speed=1G;xpcs1_1:speed=1G"

=>setenv pfeng_mode "enable,sgmii,sgmii,none"
=>setenv ethact eth_pfeng
=>setenv pfengemac 0
=>setenv gatewayip "192.168.1.1"
=>setenv ipaddr "192.168.1.30"

=>ping 192.168.1.101

When I use pfe0 to test ping, it's  failed

1. please tell me how to debug.

2. Am I using the correct version of PFE?

Screenshot from 2023-06-15 19-45-11.png

Screenshot from 2023-06-15 19-25-53.png

0 Kudos
Reply
1 Solution
5,720 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

For systemd init, the following is told from our internal team:

"BSP34.0 uses systemd to initialise the interfaces. e.g. to set pfe0 to 192.0.0.123 create the file
20-wired-pfe0.network in /etc/systemd/network

[Match]
Name=pfe0

[Network]
DHCP=no
Address=192.0.0.123/24
Gateway=192.0.0.1

Note the number in the file name determines the order that the init files are applied.

In general add systemd to your search terms on how to initialise something."

Please, let us know.

View solution in original post

0 Kudos
Reply
8 Replies
5,779 Views
Coco111
Contributor III

got it, thanks for your help.

Q3:How to configure static IP?

          I have added     'init ifupdown'   to  fsl_image_auto.bb“,     but it seems that it has not taken effect. I must manually execute ifconfig pfe0 up

 

0 Kudos
Reply
5,765 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

We have added the following information under "/etc/network/interfaces" and on reboot we see the static IP being applied, image below:

DanielAguirre_0-1688764667939.png

Please, let us know.

0 Kudos
Reply
5,743 Views
Coco111
Contributor III

 

Thanks for your help. I have modified the interface file, but it doesn't take effect.
Besides, I can't see /dev/pfe0 unless I execute ifup/ifconfig command.

I noticed that the system uses systemd init, may I be missing the corresponding .service configuration?

 

Screenshot from 2023-07-10 09-08-08.png

 

0 Kudos
Reply
5,721 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

For systemd init, the following is told from our internal team:

"BSP34.0 uses systemd to initialise the interfaces. e.g. to set pfe0 to 192.0.0.123 create the file
20-wired-pfe0.network in /etc/systemd/network

[Match]
Name=pfe0

[Network]
DHCP=no
Address=192.0.0.123/24
Gateway=192.0.0.1

Note the number in the file name determines the order that the init files are applied.

In general add systemd to your search terms on how to initialise something."

Please, let us know.

0 Kudos
Reply
5,700 Views
Coco111
Contributor III
It works, thanks
0 Kudos
Reply
5,890 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

For BSP35.0, PFE FW 1.5.0 seems to be correct.

DanielAguirre_0-1686936417864.png

Which mode are you trying to configure for SerDes_1?? We understand you are trying to implement Mode 3, but we would like confirmation. 

If so, we see that there is a difference between the recommended command and the one you are using. Below will be one option of the available configurations:

=> setenv hwconfig "serdes0:mode=pcie,clock=ext;pcie0:mode=rc;serdes1:mode=xpcs0&xpcs1,clock=ext,fmhz=125;xpcs1_0:speed=1G;xpcs1_1:speed=1G"

The clock is set to "ext", as it is defined for RDB3 platform. Also, we seem to understand that you are working with a custom board, is that correct?

Also, there is an Ethernet Enablement Guide for RDB3, which could provide useful. It is available under the RDB3 product page (link: S32G3 Vehicle Networking Reference Design | NXP Semiconductors)

Please, let us know.

0 Kudos
Reply
5,805 Views
Coco111
Contributor III

Yes, on our customized board, there is no external clock. So I first modified hwconfig to use int clock.

 


1. I noticed a strange phenomenon that requires me to use the Uboot command: "xpcs 1 an_auto enable" in order to communicate properly. What is the reason for this?

 

2. I did not find any drivers corresponding to 'nxp, s32g pfe, fsl, s32g274a pfeng' in the Linux code, Please tell me why??

Screenshot from 2023-07-05 14-22-04.png

0 Kudos
Reply
5,796 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your feedback.

Once you set the clock to int, do you set its frequency??

Also, below will be some comments on regards of the open points:

Q1 >> 1. I noticed a strange phenomenon that requires me to use the Uboot command: "xpcs 1 an_auto enable" in order to communicate properly. What is the reason for this?

A1 >> The following is mentioned by the internal team:

"In u-boot, there is no way to enable AN by device-tree. So user need to enable it by command manually."

 

Q2 >> I did not find any drivers corresponding to 'nxp, s32g pfe, fsl, s32g274a pfeng' in the Linux code, Please tell me why??

A2 >> PFE is provided under a different section. You can look into the following link for PFE drivers:

GitHub - nxp-auto-linux/pfeng: PFE Ethernet accelerator

 

Please, let us know.

0 Kudos
Reply