forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: ethernet: support npcm4xx ethernet
1. Jtag is disabled by default. 2. samples/net/sockets/dumb_http_server is used for testing. (optional) 3. Test result for reference: Local IP: 192.0.2.1 Remote IP: 192.0.2.2 uart:~$ net ping 192.0.2.2 PING 192.0.2.2 28 bytes from 192.0.2.2 to 192.0.2.1: icmp_seq=0 ttl=64 time=1 ms 28 bytes from 192.0.2.2 to 192.0.2.1: icmp_seq=1 ttl=64 time=1 ms 28 bytes from 192.0.2.2 to 192.0.2.1: icmp_seq=2 ttl=64 time=1 ms 4. The local and remote IPs could be changed in CONFIG_NET_CONFIG_MY_IPV4_ADDR and CONFIG_NET_CONFIG_PEER_IPV4_ADDR. Signed-off-by: Tyrone Ting <[email protected]>
- Loading branch information
Showing
14 changed files
with
2,678 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Nuvoton Ethernet driver configuration options | ||
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
DT_COMPAT_NUVOTON_NPCM4XX_ETHERNET := nuvoton,npcm4xx-ethernet | ||
|
||
config ETH_NPCM4XX | ||
bool "Nuvoton NPCM4XX Ethernet driver" | ||
depends on SOC_FAMILY_NPCM4XX | ||
help | ||
This option enables the ethernet driver for NPCM4XX family of | ||
processors. | ||
Say y if you wish to use ethernet on NPCM4XX MCU. | ||
|
||
config ETH_NPCM4XX_RX_THREAD_STACK_SIZE | ||
int "RX thread stack size" | ||
default 4096 | ||
help | ||
RX thread stack size | ||
|
||
config ETH_NPCM4XX_RX_THREAD_PRIO | ||
int "RX thread priority" | ||
default 3 | ||
help | ||
RX thread priority | ||
|
||
config ETH_NPCM4XX_PHY_ADDRESS | ||
int "Phy address" | ||
default 1 | ||
help | ||
The phy address to use. | ||
|
||
config ETH_NPCM4XX_RANDOM_MAC | ||
bool "Random MAC address" | ||
depends on ENTROPY_GENERATOR | ||
default y | ||
help | ||
Generate a random MAC address dynamically. | ||
|
||
if !ETH_NPCM4XX_RANDOM_MAC | ||
|
||
config ETH_NPCM4XX_MAC3 | ||
hex "MAC Address Byte 3" | ||
default 0 | ||
range 0 0xff | ||
help | ||
This is the byte 3 of the MAC address. | ||
|
||
config ETH_NPCM4XX_MAC4 | ||
hex "MAC Address Byte 4" | ||
default 0 | ||
range 0 0xff | ||
help | ||
This is the byte 4 of the MAC address. | ||
|
||
config ETH_NPCM4XX_MAC5 | ||
hex "MAC Address Byte 5" | ||
default 0 | ||
range 0 0xff | ||
help | ||
This is the byte 5 of the MAC address. | ||
|
||
endif # !ETH_NPCM4XX_RANDOM_MAC | ||
|
||
config ETH_NPCM4XX_CARRIER_CHECK_RX_IDLE_TIMEOUT_MS | ||
int "Carrier check timeout period (ms)" | ||
default 500 | ||
range 100 30000 | ||
help | ||
Set the RX idle timeout period in milliseconds after which the | ||
PHY's carrier status is re-evaluated. |
Oops, something went wrong.