Skip to content

add NETC support on imx95 A55 #92585

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 27 commits into
base: main
Choose a base branch
from

Conversation

JiafeiPan
Copy link
Contributor

@JiafeiPan JiafeiPan commented Jul 3, 2025

This PR is to enable NETC support on i.MX 95 A55.

Actually it includes two main update, one is to enable GIC ITS on A55, the other one is to enable NETC support on Cortex-A core, so I created two PR, the first part for GIC update is in PR #92346, and this PR is for NETC driver related update, so this PR is based and depends on #92346

This PR also depends on hal PR: zephyrproject-rtos/hal_nxp#571

Copy link

github-actions bot commented Jul 3, 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@7a52cbb (master) zephyrproject-rtos/hal_nxp#571 zephyrproject-rtos/hal_nxp#571/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 3, 2025
@JiafeiPan JiafeiPan force-pushed the develop/imx95-netc branch from 58bf988 to 9816039 Compare July 3, 2025 10:02
GIC redistributor on Some platform are connected to a non-coherent
downstream interconnect, it need to use Non-cahable and Non-shareable
access atttributes to access external memory. And also flush the
data cache after CPU update related memory.

Signed-off-by: Jiafei Pan <[email protected]>
@JiafeiPan JiafeiPan force-pushed the develop/imx95-netc branch from f3a0a8d to 26c8fa8 Compare July 4, 2025 02:53
@JiafeiPan JiafeiPan force-pushed the develop/imx95-netc branch from 26c8fa8 to 8f0c4ef Compare July 9, 2025 07:53
@JiafeiPan
Copy link
Contributor Author

v2:

  1. addressed @yangbolu1991 's comments.
  2. Updated dts for rt1180 and imx943 m33 to fix twister issue.

JiafeiPan added 2 commits July 9, 2025 16:04
Add NETC block driver, it could do some block memory region MMIO mapping
and also so dome block initialization, moved some netc related
configuration form board_init() to block driver so that it could be reused
between different platforms, although some configuration is different for
different platform, but put all NETC related code in the same driver to
make it easier to be maintained.

Signed-off-by: Jiafei Pan <[email protected]>
Added MMIO memory mapping for NETC MDIO driver.

Signed-off-by: Jiafei Pan <[email protected]>
@JiafeiPan JiafeiPan force-pushed the develop/imx95-netc branch from 8f0c4ef to d6c9cda Compare July 9, 2025 09:00
@JiafeiPan
Copy link
Contributor Author

v3: enlarge networking stack size to avoid net_mgmt thread crash.

yangbolu1991
yangbolu1991 previously approved these changes Jul 10, 2025
@dleach02 dleach02 assigned dleach02 and unassigned carlocaione Jul 15, 2025
JiafeiPan added 13 commits July 17, 2025 17:26
In order to support MMU mapping on Cortex-A core, added MMIO mapping
support in imx_netc_psi driver.

Signed-off-by: Jiafei Pan <[email protected]>
i.MX 95 has no NETC switch, so disable it on this platform.

Signed-off-by: Jiafei Pan <[email protected]>
As reg property is not used by the driver and there is no proper address
could be assigned to it, so remove it.

Signed-off-by: Jiafei Pan <[email protected]>
Update NETC device nodes according to NETC driver update:
1. Added NETC block control device node to handle block control
   initialization in netc block driver.
2. Added "nxp,imx-netc" compatible for netc driver.
3. Added all memory region in MMIO reg propertiy to let driver to handle
   MMIO mapping for all memory region.

Signed-off-by: Jiafei Pan <[email protected]>
Update NETC device nodes according to NETC driver update:
1. Added "nxp,imx-netc" compatible.
2. Added all memory region in MMIO reg propertiy to let driver to handle
   MMIO mapping for all memory region.

Signed-off-by: Jiafei Pan <[email protected]>
Update NETC device nodes according to NETC driver update:
1. Added "nxp,imx-netc" compatible for netc driver.
2. Added all memory region in MMIO reg propertiy to let driver to handle
   MMIO mapping for all memory region.

Signed-off-by: Jiafei Pan <[email protected]>
Added NETC dts nodes in imx95_evk A55 platform.

Signed-off-by: Jiafei Pan <[email protected]>
Added SCMI power dts node.

Signed-off-by: Jiafei Pan <[email protected]>
Power up NETCMIX and configure netc clock in soc_init().

Signed-off-by: Jiafei Pan <[email protected]>
Removed overlay and enabled these nodes in board dts directly as it is
not be valid unless CONFIG_NETWORKING is enabled.

Signed-off-by: Jiafei Pan <[email protected]>
Added NETC PSI0 support on the i.MX 95 EVK board for A55 platform.

Signed-off-by: Jiafei Pan <[email protected]>
The issue is caused by default stack size 1500 bytes of NET_RX_STACK_SIZE
is to small for ARM64 platform, then the stack of net_rx thread is
overflow and break the net_mgmt thread's stack, as a result net_mgmt thread
is crashed.

So this patch will enlarge all the stack size of net stack threads.

Signed-off-by: Jiafei Pan <[email protected]>
Add i.MX 95 EVK A55 support for zperf sample.

Signed-off-by: Jiafei Pan <[email protected]>
@JiafeiPan
Copy link
Contributor Author

v4: moved pci config memory region from netc dts node to each psi dts node as some platform such as imx943 can't use a continues region to cover all pci config region for all PSI's, it is also aligned with MDIO which we put config region in itself dts node. so that we could remove reg property from netc dts node.

@JiafeiPan JiafeiPan requested a review from yangbolu1991 July 18, 2025 01:40
Copy link

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

Successfully merging this pull request may close these issues.

4 participants