Skip to content

Commit

Permalink
drivers: ethernet: support for Nuvoton numaker series
Browse files Browse the repository at this point in the history
Add Nuvoton numaker series EMAC controller feature.

(cherry picked from commit 8ba8c18)

Original-Signed-off-by: cyliang tw <cyliang@nuvoton.com>
GitOrigin-RevId: 8ba8c18
Change-Id: I969dbeca067dec35991769b3adaf4cb555cb3aef
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5004820
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
  • Loading branch information
cyliangtw authored and Chromeos LUCI committed Nov 3, 2023
1 parent c86abf8 commit 3a76bc9
Show file tree
Hide file tree
Showing 10 changed files with 888 additions and 1 deletion.
17 changes: 17 additions & 0 deletions boards/arm/numaker_pfm_m467/numaker_pfm_m467-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,21 @@
<PJ11MFP_CAN0_RXD>;
};
};

/* EMAC multi-function pins for MDIO, TX, REFCLK, RX pins */
emac_default: emac_default {
group0 {
pinmux = <PE8MFP_EMAC0_RMII_MDC>,
<PE9MFP_EMAC0_RMII_MDIO>,
<PE10MFP_EMAC0_RMII_TXD0>,
<PE11MFP_EMAC0_RMII_TXD1>,
<PE12MFP_EMAC0_RMII_TXEN>,
<PC8MFP_EMAC0_RMII_REFCLK>,
<PC7MFP_EMAC0_RMII_RXD0>,
<PC6MFP_EMAC0_RMII_RXD1>,
<PA7MFP_EMAC0_RMII_CRSDV>,
<PA6MFP_EMAC0_RMII_RXERR>,
<PB6MFP_EMAC0_PPS>;
};
};
};
6 changes: 6 additions & 0 deletions boards/arm/numaker_pfm_m467/numaker_pfm_m467.dts
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,9 @@
pinctrl-names = "default";
status = "okay";
};

&emac {
pinctrl-0 = <&emac_default>;
pinctrl-names = "default";
status = "okay";
};
1 change: 1 addition & 0 deletions drivers/ethernet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ if(CONFIG_ETH_NXP_S32_NETC)
endif()

zephyr_library_sources_ifdef(CONFIG_ETH_NXP_S32_GMAC eth_nxp_s32_gmac.c)
zephyr_library_sources_ifdef(CONFIG_ETH_NUMAKER eth_numaker.c)

if(CONFIG_ETH_NATIVE_POSIX)
set(native_posix_source_files eth_native_posix.c eth_native_posix_adapt.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/ethernet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ source "drivers/ethernet/Kconfig.nxp_s32_gmac"
source "drivers/ethernet/Kconfig.smsc91x"
source "drivers/ethernet/Kconfig.ivshmem"
source "drivers/ethernet/Kconfig.adin2111"
source "drivers/ethernet/Kconfig.numaker"

source "drivers/ethernet/phy/Kconfig"

Expand Down
14 changes: 14 additions & 0 deletions drivers/ethernet/Kconfig.numaker
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# NUMAKER Ethernet Driver configuration options

# Copyright (c) 2023 Nuvoton Technology Corporation.
# SPDX-License-Identifier: Apache-2.0

config ETH_NUMAKER
bool "Nuvoton NUMAKER MCU Ethernet driver"
default y
select HAS_NUMAKER_ETH
depends on DT_HAS_NUVOTON_NUMAKER_ETHERNET_ENABLED
help
This option enables the Ethernet driver for Nuvoton NuMaker family of
processors.
Say y if you wish to enable NuMaker ETH.
Loading

0 comments on commit 3a76bc9

Please sign in to comment.