Skip to content

Commit 9c74a93

Browse files
committed
add w5500
1 parent 10ae591 commit 9c74a93

File tree

16 files changed

+2461
-2
lines changed

16 files changed

+2461
-2
lines changed

bsp/ejs/stm32/bearpi_stm32l431/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ set(evm_driver_sources
4242
${EVM_BASE}/drivers/zephyr/uol/watchdog_driver.c
4343
${EVM_BASE}/drivers/zephyr/uol/pwm_driver.c
4444
${EVM_BASE}/drivers/zephyr/uol/sys_driver.c
45+
46+
# ${EVM_BASE}/drivers/zephyr/ethernet/w5500/utility.c
47+
${EVM_BASE}/drivers/zephyr/ethernet/w5500/w5500.c
48+
49+
50+
4551
)
4652

4753
set(evm_modules_sources

bsp/ejs/stm32/bearpi_stm32l431/boards/arm/bearpi_stm32l431/Kconfig.defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ config USE_STM32_HAL_SD
3232
config USE_STM32_LL_SDMMC
3333
default y
3434

35+
3536
endif

bsp/ejs/stm32/bearpi_stm32l431/boards/arm/bearpi_stm32l431/bearpi_stm32l431.dts

+18
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@
7878
status = "okay";
7979
};
8080

81+
&spi1 {
82+
status = "okay";
83+
w5500@0 {
84+
compatible = "wiznet,w5500";
85+
label = "W5500";
86+
reg = <0>;
87+
spi-max-frequency = <40000000>;
88+
cs-gpios = <&gpiob 0 GPIO_ACTIVE_LOW>;
89+
reset-gpios = <&gpioc 7 (GPIO_ACTIVE_LOW)>; /* D8 */
90+
// size = <0x1000000>;
91+
// has-dpd;
92+
// t-enter-dpd = <4000>;
93+
// t-exit-dpd = <25000>;
94+
// jedec-id = [ef 40 15];
95+
// has-be32k;
96+
};
97+
};
98+
8199
&spi2 {
82100
status = "okay";
83101
st7789v@0 {

bsp/ejs/stm32/bearpi_stm32l431/prj.conf

+4-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ CONFIG_WIFI=y
3434
CONFIG_WIFI_ESP=y
3535
CONFIG_WIFI_ESP_AT_VERSION_1_7=y
3636

37-
CONFIG_DISK_ACCESS_STM32_SDMMC=y
37+
# CONFIG_DISK_ACCESS_STM32_SDMMC=y
38+
39+
# CONFIG_NETWORKING=y
40+
# CONFIG_ETH_W5500=y

drivers/zephyr/ethernet/w5500.h

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# ETH_W5500 Ethernet driver configuration options
2+
3+
# Copyright (c) 2015 Intel Corporation
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
menuconfig ETH_W5500
7+
bool "W5500 Ethernet Controller"
8+
depends on SPI
9+
help
10+
W5500 Stand-Alone Ethernet Controller
11+
with SPI Interface
12+
13+
if ETH_W5500
14+
15+
config ETH_W5500_THREAD_STACK_SIZE
16+
int "Stack size for internal incoming packet handler"
17+
depends on ETH_W5500
18+
default 800
19+
help
20+
Size of the stack used for internal thread which is ran for
21+
incoming packet processing.
22+
23+
config ETH_W5500_RX_THREAD_PRIO
24+
int "Priority for internal incoming packet handler"
25+
depends on ETH_W5500
26+
default 2
27+
help
28+
Priority level for internal thread which is ran for incoming
29+
packet processing.
30+
31+
config ETH_W5500_TIMEOUT
32+
int "IP buffer timeout"
33+
depends on ETH_W5500
34+
default 100
35+
help
36+
Given timeout in milliseconds. Maximum amount of time
37+
that the driver will wait from the IP stack to get
38+
a memory buffer before the Ethernet frame is dropped.
39+
40+
endif
41+

0 commit comments

Comments
 (0)