Skip to content

imx943 netc support on A55 #93399

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

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
104a956
drivers: intc_gicv3: enable dma-noncoherent support
JiafeiPan Jun 27, 2025
8f425d2
drivers: gicv3_its: enable dma noncoherent support
JiafeiPan Jun 12, 2025
c690257
drivers: intc_gicv3_its: fix incorrect RDbase when PE number is used
JiafeiPan Jun 27, 2025
5ec58c9
drivers: intc_gicv3_its: fix sleep issue in pre-kernel
JiafeiPan Jun 27, 2025
a4bd88f
boards: imx95_evk: a55: enlarge memory size
JiafeiPan May 30, 2025
85367f2
dts: arm64: imx95_a55: add gic v3 its dts node
JiafeiPan Jun 27, 2025
1eee2af
soc: imx95: a55: include LPI in irq number
JiafeiPan Jun 13, 2025
5b3c732
soc: imx95: a55: enable GIC redistribute noncoherent
JiafeiPan Jun 27, 2025
bffe8d5
boards: imx95_evk: refine GIC and SCMI objects init priority
JiafeiPan Jun 27, 2025
4e606a4
tests: arm64_gicv3_its: add imx95_evk support
JiafeiPan Jun 27, 2025
1d98712
west.yml: depend on hal_nxp PR
JiafeiPan Jul 3, 2025
3308b74
drivers: ethernet: imx_netc: add GIC MSI support
JiafeiPan May 22, 2025
338fc79
drivers: ethernet: imx_netc: add netc block driver
JiafeiPan Jun 29, 2025
db5d41a
drivers: mdio: imx_netc: add mmio mapping support
JiafeiPan Jun 23, 2025
d413ad1
drivers: ethernet: netc_psi: add MMIPO mapping support
JiafeiPan Jul 2, 2025
51a237b
modules: hal_nxp: disable netc switch on imx95
JiafeiPan Jun 30, 2025
554428c
dts: bindling: imx-netc: remove unused reg property
JiafeiPan Jul 17, 2025
7257445
dts: arm: imx95_m7: update netc device nodes
JiafeiPan Jul 3, 2025
43f6f5e
dts: arm: rt118x: update netc device nodes
JiafeiPan Jul 9, 2025
edbdc1d
dts: arm: imx943_m33: update netc device nodes
JiafeiPan Jul 9, 2025
d7cfef1
dts: arm64: imx95_evk: add netc dts nodes
JiafeiPan Jun 29, 2025
f04dbec
dts: arm64: imx95_a55: add SCMI power device node
JiafeiPan Jun 24, 2025
5524d9d
soc: imx95: a55: add netc power and clock init in soc.c
JiafeiPan Jun 24, 2025
c2e18fa
board: imx95_evk: m7: refine NETC dts
JiafeiPan Jul 4, 2025
685a06b
boards: imx95_evk: a55: add NETC support
JiafeiPan Jun 29, 2025
085689e
boards: imx95_evk: a55: enlarge networking stack size
JiafeiPan Jul 9, 2025
0dec6e8
samples: net: zperf: add imx95 evk a55 suppport
JiafeiPan Jul 9, 2025
2a0bf3f
soc: imx943_a55: enable gic v3 its and LPI interrupts
JiafeiPan Jul 9, 2025
e3ea0ec
boards: imx943_evk: a55: enlarge memory size
JiafeiPan Jul 9, 2025
17b87ec
boards: imx943_evk: refine GIC and SCMI objects init priority
JiafeiPan Jul 10, 2025
1364826
tests: arm64_gicv3_its: add imx943_evk support
JiafeiPan Jul 10, 2025
07f5fea
drivers: netc_blk: add imx943 support
JiafeiPan Jul 11, 2025
4254d28
dts: arm64: imx943_a55: add SCMI power device node
JiafeiPan Jul 11, 2025
e9c6a00
soc: imx943: a55: add netc power and clock init in soc.c
JiafeiPan Jul 11, 2025
4501f4c
dts: arm64: imx943_a55: add netc device nodes
JiafeiPan Jul 11, 2025
ec36bbc
boards: imx943_evk: a55: add NETC support
JiafeiPan Jul 11, 2025
d5345c1
samples: net: zperf: add imx943 a55 support
JiafeiPan Jul 11, 2025
cbc3387
modules: hal_nxp: move armv8-a cache driver to mcux-sdk-ng
JiafeiPan Jul 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions boards/nxp/imx943_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,80 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

if SOC_MIMX94398_A55

if ETH_NXP_IMX_NETC

config GIC_V3_ITS
default y

endif # ETH_NXP_IMX_NETC

# GIC ITS depends on kernel heap which init priority is 30, so set
# GIC to be 31, mailbox and SCMI will be initialized by the order
# according to dts dependency although they use the same init priority.
config INTC_INIT_PRIORITY
default 31

config MBOX_INIT_PRIORITY
default 31

config ARM_SCMI_SHMEM_INIT_PRIORITY
default 31 if SOC_MIMX94398_A55

config ARM_SCMI_TRANSPORT_INIT_PRIORITY
default 31 if SOC_MIMX94398_A55

config CLOCK_CONTROL_INIT_PRIORITY
default 31 if SOC_MIMX94398_A55

# Enlarge default networking stack
if NETWORKING

config NET_L2_ETHERNET
default y

config NET_TX_STACK_SIZE
default 8192

config NET_RX_STACK_SIZE
default 8192

if NET_TCP

config NET_TCP_WORKQ_STACK_SIZE
default 8192

endif # NET_TCP

if NET_MGMT_EVENT

config NET_MGMT_EVENT_STACK_SIZE
default 8192

endif # NET_MGMT_EVENT

if NET_SOCKETS_SERVICE

config NET_SOCKETS_SERVICE_STACK_SIZE
default 8192

endif # NET_SOCKETS_SERVICE

endif # NETWORKING

endif # SOC_MIMX94398_A55

if SOC_MIMX94398_M33

config INTC_INIT_PRIORITY
default 2

config MBOX_INIT_PRIORITY
default 3

endif # SOC_MIMX94398_M33

if ETH_NXP_IMX_NETC

config ETH_NXP_IMX_RX_RING_LEN
Expand Down
2 changes: 1 addition & 1 deletion boards/nxp/imx943_evk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

static int board_init(void)
{
#if defined(CONFIG_ETH_NXP_IMX_NETC) && (DT_CHILD_NUM_STATUS_OKAY(DT_NODELABEL(netc)) != 0)
#if defined(CONFIG_ETH_NXP_IMX_NETC) && (DT_CHILD_NUM_STATUS_OKAY(DT_NODELABEL(netc)) != 0) & !defined(CONFIG_CPU_CORTEX_A)

Check warning on line 13 in boards/nxp/imx943_evk/board.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LONG_LINE

boards/nxp/imx943_evk/board.c:13 line length of 123 exceeds 100 columns

Check warning on line 13 in boards/nxp/imx943_evk/board.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LONG_LINE

boards/nxp/imx943_evk/board.c:13 line length of 123 exceeds 100 columns
/*
* PCS(Physical Coding Sublayer) protocols on link0-5,
* xxxx xxxx xxxx xxx1: 1G SGMII
Expand Down
66 changes: 65 additions & 1 deletion boards/nxp/imx943_evk/imx943_evk_mimx94398_a55.dts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
};

dram: memory@d0000000 {
reg = <0xd0000000 DT_SIZE_M(1)>;
reg = <0xd0000000 DT_SIZE_M(10)>;
};
};

Expand All @@ -45,3 +45,67 @@
pinctrl-0 = <&lpuart1_default>;
pinctrl-names = "default";
};

&emdio {
pinctrl-0 = <&emdio_default>;
pinctrl-names = "default";
status = "okay";

phy0: phy@f {
compatible = "ethernet-phy";
reg = <0xf>;
status = "disabled";
};

phy1: phy@10 {
compatible = "ethernet-phy";
reg = <0x10>;
status = "disabled";
};

phy2: phy@5 {
compatible = "realtek,rtl8211f";
reg = <0x5>;
status = "okay";
};

phy3: phy@6 {
compatible = "realtek,rtl8211f";
reg = <0x6>;
status = "okay";
};

phy4: phy@7 {
compatible = "realtek,rtl8211f";
reg = <0x7>;
status = "okay";
};
};

&enetc_psi0 {
pinctrl-0 = <&eth2_default>;
pinctrl-names = "default";
phy-handle = <&phy2>;
phy-connection-type = "rgmii";
status = "okay";
};

&enetc_psi1 {
pinctrl-0 = <&eth3_default>;
pinctrl-names = "default";
phy-handle = <&phy3>;
phy-connection-type = "rgmii";
status = "okay";
};

&enetc_psi2 {
pinctrl-0 = <&eth4_default>;
pinctrl-names = "default";
phy-handle = <&phy4>;
phy-connection-type = "rgmii";
status = "okay";
};

&netc_ptp_clock0 {
status = "okay";
};
66 changes: 66 additions & 0 deletions boards/nxp/imx95_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 2024-2025 NXP
# SPDX-License-Identifier: Apache-2.0

if SOC_MIMX9596_A55

if ETH_NXP_IMX_NETC

config GIC_V3_ITS
default y

endif # ETH_NXP_IMX_NETC

# GIC ITS depends on kernel heap which init priority is 30, so set
# GIC to be 31, mailbox and SCMI will be initialized by the order
# according to dts dependency although they use the same init priority.
config INTC_INIT_PRIORITY
default 31

config MBOX_INIT_PRIORITY
default 31

config ARM_SCMI_SHMEM_INIT_PRIORITY
default 31

config ARM_SCMI_TRANSPORT_INIT_PRIORITY
default 31

config CLOCK_CONTROL_INIT_PRIORITY
default 31

# Enlarge default networking stack
if NETWORKING

config NET_L2_ETHERNET
default y

config NET_TX_STACK_SIZE
default 8192

config NET_RX_STACK_SIZE
default 8192

if NET_TCP

config NET_TCP_WORKQ_STACK_SIZE
default 8192

endif # NET_TCP

if NET_MGMT_EVENT

config NET_MGMT_EVENT_STACK_SIZE
default 8192

endif # NET_MGMT_EVENT

if NET_SOCKETS_SERVICE

config NET_SOCKETS_SERVICE_STACK_SIZE
default 8192

endif # NET_SOCKETS_SERVICE

endif # NETWORKING

endif # SOC_MIMX9596_A55
17 changes: 1 addition & 16 deletions boards/nxp/imx95_evk/board.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 NXP
* Copyright 2024-2025 NXP
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -10,21 +10,6 @@

static int board_init(void)
{
#if defined(CONFIG_ETH_NXP_IMX_NETC) && (DT_CHILD_NUM_STATUS_OKAY(DT_NODELABEL(netc)) != 0)
/* Port 0 to 2 protocol configure: RGMII, RGMII, XGMII */
BLK_CTRL_NETCMIX->CFG_LINK_MII_PROT = 0x00000522;
BLK_CTRL_NETCMIX->CFG_LINK_PCS_PROT_2 = 0x00000040;

/* Unlock the IERB. It will warm reset whole NETC. */
NETC_PRIV->NETCRR &= ~NETC_PRIV_NETCRR_LOCK_MASK;
while ((NETC_PRIV->NETCRR & NETC_PRIV_NETCRR_LOCK_MASK) != 0U) {
}

/* Lock the IERB. */
NETC_PRIV->NETCRR |= NETC_PRIV_NETCRR_LOCK_MASK;
while ((NETC_PRIV->NETCSR & NETC_PRIV_NETCSR_STATE_MASK) != 0U) {
}
#endif
return 0;
}

Expand Down
5 changes: 3 additions & 2 deletions boards/nxp/imx95_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ Ethernet
--------

NETC driver supports to manage the Physical Station Interface (PSI).
The first ENET1 port could be enabled for M7 by west build option
``-DEXTRA_DTC_OVERLAY_FILE=enetc_psi0.overlay``.
The first ENET1 port could be enabled on M7 DDR and A55 platforms.

For A55 Core, NETC depends on GIC ITS, so need to make sure to allocate heap memory to
be larger than 851968 byes by setting CONFIG_HEAP_MEM_POOL_SIZE.

Programming and Debugging (A55)
*******************************
Expand Down
21 changes: 0 additions & 21 deletions boards/nxp/imx95_evk/dts/enetc_psi0.overlay

This file was deleted.

27 changes: 26 additions & 1 deletion boards/nxp/imx95_evk/imx95_evk_mimx9596_a55.dts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,35 @@
};

dram: memory@d0000000 {
reg = <0xd0000000 DT_SIZE_M(1)>;
reg = <0xd0000000 DT_SIZE_M(10)>;
};
};

&emdio {
pinctrl-0 = <&emdio_default>;
pinctrl-names = "default";
status = "okay";

phy0: phy@1 {
compatible = "realtek,rtl8211f";
reg = <0x1>;
status = "okay";
};
};

&enetc_psi0 {
local-mac-address = [00 00 00 01 02 00];
pinctrl-0 = <&eth0_default>;
pinctrl-names = "default";
phy-handle = <&phy0>;
phy-connection-type = "rgmii";
status = "okay";
};

&enetc_ptp_clock {
status = "okay";
};

&lpi2c5 {
pinctrl-0 = <&lpi2c5_default>;
pinctrl-names = "default";
Expand Down
2 changes: 0 additions & 2 deletions boards/nxp/imx95_evk/imx95_evk_mimx9596_a55_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ CONFIG_CLOCK_CONTROL=y

CONFIG_MBOX=y
CONFIG_ARM_SCMI=y
CONFIG_INTC_INIT_PRIORITY=2
CONFIG_MBOX_INIT_PRIORITY=3
12 changes: 8 additions & 4 deletions boards/nxp/imx95_evk/imx95_evk_mimx9596_m7.dts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 NXP
* Copyright 2024-2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -26,12 +26,12 @@
&emdio {
pinctrl-0 = <&emdio_default>;
pinctrl-names = "default";
status = "disabled";
status = "okay";

phy0: phy@1 {
compatible = "realtek,rtl8211f";
reg = <0x1>;
status = "disabled";
status = "okay";
};
};

Expand All @@ -41,7 +41,11 @@
pinctrl-names = "default";
phy-handle = <&phy0>;
phy-connection-type = "rgmii";
status = "disabled";
status = "okay";
};

&enetc_ptp_clock {
status = "okay";
};

&flexspi {
Expand Down
1 change: 1 addition & 0 deletions drivers/ethernet/nxp_imx_netc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
if(CONFIG_ETH_NXP_IMX_NETC)
zephyr_library_sources(eth_nxp_imx_netc.c)
zephyr_library_sources(eth_nxp_imx_netc_psi.c)
zephyr_library_sources_ifdef(CONFIG_DT_HAS_NXP_IMX_NETC_BLK_CTRL_ENABLED eth_nxp_imx_netc_blk.c)
endif()

zephyr_library_sources_ifdef(CONFIG_DSA_NXP_IMX_NETC dsa_nxp_imx_netc.c)
Loading
Loading