Skip to content

DSA tag protocol support #93010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

yangbolu1991
Copy link
Member

@yangbolu1991 yangbolu1991 commented Jul 11, 2025

This PR is to support DSA tag protocol in DSA core driver. Also added NXP NETC tag protocol driver, and enabled on NXP i.MX943 as an example to verify.

There is a hal dependency: zephyrproject-rtos/hal_nxp#575
Thanks a lot.

Attached dsa sample log.

[00:00:00.056,000] <inf> phy_mii: PHY (2) ID 20005CA2
[00:00:00.107,000] <inf> phy_mii: PHY (3) ID 20005CA2
[00:00:00.144,000] <inf> dsa_netc: DSA user port 0 Link down
[00:00:00.145,000] <inf> dsa_netc: DSA user port 1 Link down
[00:00:00.145,000] <inf> nxp_imx_eth_psi: ENETC3 MAC: 00:04:9f:00:11:00
*** Booting Zephyr OS build v4.2.0-rc2-120-gb0fc94da3d01 ***
[00:00:00.155,000] <inf> net_dsa_sample: [0] User interface 1 found.
[00:00:00.155,000] <inf> net_dsa_sample: [1] User interface 2 found.
[00:00:00.155,000] <inf> net_dsa_sample: DSA ports init - OK
[00:00:02.214,000] <inf> phy_mii: PHY (3) Link speed 100 Mb, full duplex
[00:00:02.214,000] <inf> dsa_netc: DSA user port 1 Link up
[00:00:02.214,000] <inf> net_dsa_sample: Port 2 is up
uart:~$
uart:~$
[00:00:10.174,000] <inf> net_dhcpv4: Received: 10.193.20.37
uart:~$
uart:~$
uart:~$
uart:~$ net ping 10.193.20.164
PING 10.193.20.164
28 bytes from 10.193.20.164 to 10.193.20.37: icmp_seq=1 ttl=64 time=0 ms
28 bytes from 10.193.20.164 to 10.193.20.37: icmp_seq=2 ttl=64 time=0 ms
28 bytes from 10.193.20.164 to 10.193.20.37: icmp_seq=3 ttl=64 time=0 ms
[00:00:23.722,000] <inf> phy_mii: PHY (3) is down
[00:00:23.722,000] <inf> dsa_netc: DSA user port 1 Link down
[00:00:28.163,000] <inf> phy_mii: PHY (2) Link speed 100 Mb, full duplex
[00:00:28.163,000] <inf> dsa_netc: DSA user port 0 Link up
[00:00:28.163,000] <inf> net_dsa_sample: Port 1 is up
uart:~$
uart:~$
uart:~$
[00:00:34.122,000] <inf> net_dhcpv4: Received: 10.193.20.163
uart:~$ net ping 10.193.20.164
PING 10.193.20.164
28 bytes from 10.193.20.164 to 10.193.20.163: icmp_seq=1 ttl=64 time=1 ms
28 bytes from 10.193.20.164 to 10.193.20.163: icmp_seq=2 ttl=64 time=0 ms
28 bytes from 10.193.20.164 to 10.193.20.163: icmp_seq=3 ttl=64 time=0 ms
uart:~$

Copy link

github-actions bot commented Jul 11, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@1255d8b (master) zephyrproject-rtos/hal_nxp#575 zephyrproject-rtos/hal_nxp#575/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-hal_nxp DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jul 11, 2025
@yangbolu1991
Copy link
Member Author

Updated to fix twister issues.
Thanks.

@yangbolu1991
Copy link
Member Author

yangbolu1991 commented Jul 25, 2025

Updated to v2 to address @JiafeiPan comments. Changes include,

  • Converted to conditional compiling instead of stub functions for using NETC DSA tag driver.
  • Converted dsa-tag-protocol to int instead of string.
  • Improved kconfig dependency checking with compatible.

Thanks a lot.

@clamattia
Copy link
Contributor

@yangbolu1991 Please if possible use the Start review feature instead of Add single comment to avoid spamming subscribers.

Copy link

@yangbolu1991
Copy link
Member Author

@yangbolu1991 Please if possible use the Start review feature instead of Add single comment to avoid spamming subscribers.

Get it. And sorry for the trouble...

@clamattia
Copy link
Contributor

@yangbolu1991 Please if possible use the Start review feature instead of Add single comment to avoid spamming subscribers.

Get it. And sorry for the trouble...

No problem and thank you for the great work.

Updated hal_nxp to support netc tag driver.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Moved DSA core options to subsystem.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Moved NXP NETC DSA driver to dsa directory.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added tag protocol definition and binding. Also introduced
zephyr,dsa-port compatible for future tag protocol driver Kconfig
dependency checking.

Updated existed dts.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added NXP NETC tag protocol driver.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Supported tag protocol setup.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Allowed to transmit DSA tag frame.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added tag protocol support.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added NETC switch node.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added NETC switch support for M33.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added imx943_evk_mimx94398_m33_ddr board support.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added NETC switch support for M33 in doc.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
@yangbolu1991
Copy link
Member Author

Updated to v3. Changes include,

  • Code improvement per @pdgendt suggestion.

Thanks.

@yangbolu1991
Copy link
Member Author

Rebased to address west.yml conflict.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants