Skip to content

Commit 8ba8c18

Browse files
cyliangtwfabiobaltieri
authored andcommitted
drivers: ethernet: support for Nuvoton numaker series
Add Nuvoton numaker series EMAC controller feature. Signed-off-by: cyliang tw <cyliang@nuvoton.com>
1 parent 97fab83 commit 8ba8c18

File tree

10 files changed

+888
-1
lines changed

10 files changed

+888
-1
lines changed

boards/arm/numaker_pfm_m467/numaker_pfm_m467-pinctrl.dtsi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,21 @@
3232
<PJ11MFP_CAN0_RXD>;
3333
};
3434
};
35+
36+
/* EMAC multi-function pins for MDIO, TX, REFCLK, RX pins */
37+
emac_default: emac_default {
38+
group0 {
39+
pinmux = <PE8MFP_EMAC0_RMII_MDC>,
40+
<PE9MFP_EMAC0_RMII_MDIO>,
41+
<PE10MFP_EMAC0_RMII_TXD0>,
42+
<PE11MFP_EMAC0_RMII_TXD1>,
43+
<PE12MFP_EMAC0_RMII_TXEN>,
44+
<PC8MFP_EMAC0_RMII_REFCLK>,
45+
<PC7MFP_EMAC0_RMII_RXD0>,
46+
<PC6MFP_EMAC0_RMII_RXD1>,
47+
<PA7MFP_EMAC0_RMII_CRSDV>,
48+
<PA6MFP_EMAC0_RMII_RXERR>,
49+
<PB6MFP_EMAC0_PPS>;
50+
};
51+
};
3552
};

boards/arm/numaker_pfm_m467/numaker_pfm_m467.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,9 @@
117117
pinctrl-names = "default";
118118
status = "okay";
119119
};
120+
121+
&emac {
122+
pinctrl-0 = <&emac_default>;
123+
pinctrl-names = "default";
124+
status = "okay";
125+
};

drivers/ethernet/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ if(CONFIG_ETH_NXP_S32_NETC)
4242
endif()
4343

4444
zephyr_library_sources_ifdef(CONFIG_ETH_NXP_S32_GMAC eth_nxp_s32_gmac.c)
45+
zephyr_library_sources_ifdef(CONFIG_ETH_NUMAKER eth_numaker.c)
4546

4647
if(CONFIG_ETH_NATIVE_POSIX)
4748
set(native_posix_source_files eth_native_posix.c eth_native_posix_adapt.c)

drivers/ethernet/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ source "drivers/ethernet/Kconfig.nxp_s32_gmac"
6161
source "drivers/ethernet/Kconfig.smsc91x"
6262
source "drivers/ethernet/Kconfig.ivshmem"
6363
source "drivers/ethernet/Kconfig.adin2111"
64+
source "drivers/ethernet/Kconfig.numaker"
6465

6566
source "drivers/ethernet/phy/Kconfig"
6667

drivers/ethernet/Kconfig.numaker

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# NUMAKER Ethernet Driver configuration options
2+
3+
# Copyright (c) 2023 Nuvoton Technology Corporation.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config ETH_NUMAKER
7+
bool "Nuvoton NUMAKER MCU Ethernet driver"
8+
default y
9+
select HAS_NUMAKER_ETH
10+
depends on DT_HAS_NUVOTON_NUMAKER_ETHERNET_ENABLED
11+
help
12+
This option enables the Ethernet driver for Nuvoton NuMaker family of
13+
processors.
14+
Say y if you wish to enable NuMaker ETH.

0 commit comments

Comments
 (0)