config sja1110 gptp based on 'switch_config_s32_vnp_rdb'

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

config sja1110 gptp based on 'switch_config_s32_vnp_rdb'

ソリューションへジャンプ
2,937件の閲覧回数
xiaoshumiao
Contributor IV

Dear NXP fellows:

I am using S32G-VNP-RDB3 and Linux BSP 38.0

I have configured pfe0 to communicate with sja1110 port 4 through sgmii, and can ping. I want to synchronize the time between s32g and sja1110 through pfe0 and sja1110 port 4 interface.

Referring to the configuration of "gptp_sja1110x", I added gPTP statck on the "switch_config_s32g_vnp_rdb" and configured gptp. Finally, I compiled and generated flash_image.bin, renamed it to sja1110_uc.bin, and copied it to /lib/firmware.

However, after startup, I used tcpdump to capture packets on the pfe0 port, and no ptp-related packets were sent from sja1110 port 4 to the pfe0 port. Worse, I used pfe0 to ping 192.168.0.200 and got no response.

Here are my configurations and code modifications:

xiaoshumiao_0-1745834279558.pngxiaoshumiao_1-1745834304312.pngxiaoshumiao_2-1745834356302.png

And I modified the configuration of lpit:

xiaoshumiao_3-1745834471291.pngxiaoshumiao_4-1745834489848.png

xiaoshumiao_5-1745834501972.pngxiaoshumiao_6-1745834512895.png

I called the function according to the instructions in the 'SJA1110 GPTP CONFIGURATION' document:

xiaoshumiao_7-1745834782067.pngxiaoshumiao_8-1745834909052.pngxiaoshumiao_9-1745834961626.png

 

0 件の賞賛
返信
1 解決策
2,438件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @xiaoshumiao,

After some internal investigation I cleared some mistaken ideas I had, I apologize for that.

The SJA1110 DSA in the RDB3 mode is not supported in BSP38, it is supported for the SJA1105, which is present in the S32GRV-PLATEVB which works with the S32G-VNP-EVB3. the support for SJA1110 DSA mode was added in BSP39.

BSP38 User Manual:

alejandro_e_0-1747268118668.png

BSP39 User Manual:

alejandro_e_2-1747268227529.png

 

My confusion was originated from the Linux SJA1105 driver documentation [NXP SJA1105 switch] and my lack of expertise in the SJA1110 chip. 

alejandro_e_4-1747268424702.png

 

Again I apologize from the time used for this investigation.

Now I can only recommend you to migrate to a newer BSP release, at least to BSP39, however, if you are in the early stages of developing, I would recommend to use BSP43 which is the newest and most stable version.

 

Best regards.

 

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
12 返答(返信)
2,911件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @xiaoshumiao,

It is good to support you again. About your problem, in this community I can only help you with the S32G3 side, this means the Linux support for PTP protocol. You can check the BSP38 user manual section 8 PTP Information [page 73, Linux BSP 38.0 User Manual for S32G3 platforms, 02-Oct-2023], this section explains how to use PTP commands on Linux. In your previous post I did not understand that you wanted to route the PTP packages to Linux, therefore I was not able to mention the following note in the BSP38:

alejandro_e_0-1745872655379.png

 

The Linux driver does support PTP messages, but not using the SJA1110. For this you will need to check section 7.6 Setting up SJA1105 switch, in particular subsection 7.6.2 SJA1105 Linux DSA driver [page 69, 70 and 71]. For more information please also check the Linux DSA official documentation: kernel.org/networking/dsa/dsa.html.

Regarding the SJA1110 specific configuration please post your questions in Other-NXP-Products, in there one of my colleagues with more expertise will help you with the SJA1110 related topics.

 

Let me know if you have any other questions.

 

0 件の賞賛
返信
2,893件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @xiaoshumiao,

As mentioned in the BSP38 User Manual, section 7.7 Setting up SJA1110 switch [page 71], please refer to the RDB3-ETHERNET-ENABLEMENT-GUIDE, chapter 3. SJA1110 Port Configuration [page 5], where you will be able to check how to configure the SJA1110 (which you have already done), and the methods to flash it. 

You will need to use the debug interface to flash it, since using the DSA requires to disable the spi5 node in the device tree, as mentioned in the BSP manual. Be careful as the reference used in the manual has more options, you will only need to use the following in u-boot:

setenv fdt_override 'fdt addr $fdt_addr; fdt resize;
fdt set /soc/spi@402d0000 status disabled;'

 

Instead of the full env variable shown. 

If possible check BSP43 user manual, which, although having some different functionalities and configuration for DSA, may help clearing how it works.

 

If you have an specific questions on this topic please let me know.  

Best regards.

0 件の賞賛
返信
2,775件の閲覧回数
xiaoshumiao
Contributor IV

hello @alejandro_e 

I have done this

xiaoshumiao_0-1746601024673.png

xiaoshumiao_1-1746601037384.png

Later, I will use the debug interface to flash the firmware.

0 件の賞賛
返信
2,758件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @xiaoshumiao,

 Thanks for letting me know. the sja1110_sda may not have any effect in BSP38, that option was added to avoid the need to "manually" modify the device tree.

For now, you can try to load a binary from Linux, since the SPI node is no longer present, you should see an error even if the firmware file is correct.

Please let me know if this configuration works correctly once you flash the SJA1110.

 

0 件の賞賛
返信
2,728件の閲覧回数
xiaoshumiao
Contributor IV

Keep this setting of J189: Pin1-2:Short, Pin3-4: Short and Keep sja1110_uc.bin in /lib/firmware.
Then, I restarted the device, and the attached is the startup log.

What error do you mean?

0 件の賞賛
返信
2,705件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @xiaoshumiao,

Sorry for not explaining correctly, it does not show as an error in the boot logs, but since there is no SPI node the binary cannot be loaded as before, as shown in these logs:

[    0.593806] gpio-345 (sja1110-rst-phy-t1): hogged as output/low
[    0.599304] gpio-402 (sja1110-rst-core): hogged as output/low
[    7.157165] sja1110: loading out-of-tree module taints kernel.
         Starting Load K[    7.168658] SPI driver sja1110 has no spi_device_id for nxp,sja1110-switch
e[    7.168665] SPI driver sja1110 has no spi_device_id for nxp,sja1110-uc

  

That is why you will need to flash it using the debug interface.

 

Let me know if you have more questions.

0 件の賞賛
返信
2,569件の閲覧回数
xiaoshumiao
Contributor IV

hello @alejandro_e 

I did this

xiaoshumiao_1-1747118051010.png

I used the unmodified 'switch_config_s32g_vnp_rdb' and flashed the firmware via JTAG port according to 'S32G-VNP-RDB3 Ethernet Enablement Guide'

But I still can't see the sja1110 network interface

xiaoshumiao_0-1747118012456.png

 

0 件の賞賛
返信
2,516件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @xiaoshumiao,

I see from the logs you shared that the PFE2 interface is down, could you try to configure it as mentioned in the BSP38 user manual and share the results?

alejandro_e_1-1747173102033.png

Please also contact the SJA1110 experts in parallel, as I can only help you with the Linux side.

Thanks! 

0 件の賞賛
返信
2,466件の閲覧回数
xiaoshumiao
Contributor IV

hello @alejandro_e 

There is no effect after setting

xiaoshumiao_0-1747210029550.png

As shown in the figure below, to disable DSA master mode, you need to disable SPI mode.

xiaoshumiao_1-1747210470190.png

I don't know whether the dsa driver is installed or enabled.

0 件の賞賛
返信
2,439件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @xiaoshumiao,

After some internal investigation I cleared some mistaken ideas I had, I apologize for that.

The SJA1110 DSA in the RDB3 mode is not supported in BSP38, it is supported for the SJA1105, which is present in the S32GRV-PLATEVB which works with the S32G-VNP-EVB3. the support for SJA1110 DSA mode was added in BSP39.

BSP38 User Manual:

alejandro_e_0-1747268118668.png

BSP39 User Manual:

alejandro_e_2-1747268227529.png

 

My confusion was originated from the Linux SJA1105 driver documentation [NXP SJA1105 switch] and my lack of expertise in the SJA1110 chip. 

alejandro_e_4-1747268424702.png

 

Again I apologize from the time used for this investigation.

Now I can only recommend you to migrate to a newer BSP release, at least to BSP39, however, if you are in the early stages of developing, I would recommend to use BSP43 which is the newest and most stable version.

 

Best regards.

 

 

 

0 件の賞賛
返信
2,408件の閲覧回数
xiaoshumiao
Contributor IV

@alejandro_e 

Thank you very much for your support over the past few days. I will use BSP43 for development.

0 件の賞賛
返信
2,381件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @xiaoshumiao,

Thanks for understanding. Please feel free to create a new post if you have any questions.

 

Best regards 

0 件の賞賛
返信