From 1c28fa89285d410f34d496b4d000ccd8a1b4cbd3 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 08:05:36 +0200 Subject: [PATCH 1/8] cpu/esp32: replace feature periph_eth by esp_eth In fact the ESP32 has no peripheral driver for the ETH interface. Instead, the `esp_eth` netdev driver directly uses the ESP-IDF Ethernet API. This caused compilation problems with Kconfig. Therefore the required feature `periph_eth` is replaced by the feature `esp_eth`. --- cpu/esp32/Makefile.dep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/esp32/Makefile.dep b/cpu/esp32/Makefile.dep index 9610647e53..df2d4aef27 100644 --- a/cpu/esp32/Makefile.dep +++ b/cpu/esp32/Makefile.dep @@ -18,13 +18,13 @@ ifneq (,$(filter cpp,$(USEMODULE))) endif ifneq (,$(filter esp_eth,$(USEMODULE))) + FEATURES_REQUIRED += esp_eth USEMODULE += esp_idf_eth USEMODULE += esp_idf_event USEMODULE += esp_idf_gpio USEMODULE += esp_idf_spi_flash USEMODULE += netdev_eth USEMODULE += netopt - FEATURES_REQUIRED += periph_eth USEMODULE += ztimer_msec endif From 3f7416dda184f0665b4d87577e8ec52ca9ce919b Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 09:59:51 +0200 Subject: [PATCH 2/8] boards/esp32: replace feature periph_eth by esp_eth --- boards/esp32-ethernet-kit-v1_0/Makefile.features | 2 +- boards/esp32-olimex-evb/Makefile.features | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/esp32-ethernet-kit-v1_0/Makefile.features b/boards/esp32-ethernet-kit-v1_0/Makefile.features index e22f96a983..806d8882f5 100644 --- a/boards/esp32-ethernet-kit-v1_0/Makefile.features +++ b/boards/esp32-ethernet-kit-v1_0/Makefile.features @@ -4,8 +4,8 @@ CPU_MODEL = esp32-wrover include $(RIOTBOARD)/common/esp32/Makefile.features # additional features provided by the board +FEATURES_PROVIDED += esp_eth FEATURES_PROVIDED += periph_adc -FEATURES_PROVIDED += periph_eth FEATURES_PROVIDED += periph_i2c FEATURES_PROVIDED += periph_pwm diff --git a/boards/esp32-olimex-evb/Makefile.features b/boards/esp32-olimex-evb/Makefile.features index 6dd12bc891..8f565d45d4 100644 --- a/boards/esp32-olimex-evb/Makefile.features +++ b/boards/esp32-olimex-evb/Makefile.features @@ -12,7 +12,7 @@ FEATURES_PROVIDED += periph_pwm FEATURES_PROVIDED += periph_spi # unique features of the board -FEATURES_PROVIDED += periph_eth # Ethernet MAC (EMAC) +FEATURES_PROVIDED += esp_eth # Ethernet MAC (EMAC) FEATURES_PROVIDED += periph_can # CAN peripheral interface FEATURES_PROVIDED += periph_ir # IR peripheral interface From 34633a5ca5c76611f39986d57793414d605751a7 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 10:00:31 +0200 Subject: [PATCH 3/8] tests/driver_esp_eth: replace feature periph_eth by esp_eth --- tests/driver_esp_eth/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/driver_esp_eth/Makefile b/tests/driver_esp_eth/Makefile index 1319d7dd1b..d34f564e33 100644 --- a/tests/driver_esp_eth/Makefile +++ b/tests/driver_esp_eth/Makefile @@ -7,7 +7,6 @@ USEMODULE += test_utils_netdev_eth_minimal # the driver to test USEMODULE += esp_eth FEATURES_REQUIRED += arch_esp32 -FEATURES_REQUIRED += periph_eth INCLUDES += -I$(APPDIR) From 71c7e9e9f5ba4e849f9d5caf077b1d586ce09ec0 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 10:07:43 +0200 Subject: [PATCH 4/8] cpu/esp32: replace HAS_PERIPH_ETH by HAS_ESP_ETH in Kconfig In fact the ESP32 has no peripheral driver for the ETH interface. Instead, the `esp_eth` netdev driver directly uses the ESP-IDF Ethernet API. This caused compilation problems with Kconfig. Therefore the required feature `periph_eth` is replaced by the feature `esp_eth`. --- cpu/esp32/esp-eth/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cpu/esp32/esp-eth/Kconfig b/cpu/esp32/esp-eth/Kconfig index a87c3d2074..0f9b151b86 100644 --- a/cpu/esp32/esp-eth/Kconfig +++ b/cpu/esp32/esp-eth/Kconfig @@ -9,8 +9,7 @@ config MODULE_ESP_ETH bool "ESP32 Ethernet device" depends on TEST_KCONFIG depends on CPU_FAM_ESP32 - depends on HAS_PERIPH_ETH - select MODULE_ESP_FREERTOS + depends on HAS_ESP_ETH select MODULE_ESP_IDF_ETH select MODULE_ESP_IDF_ETH_PHY select MODULE_NETDEV_ETH @@ -18,7 +17,7 @@ config MODULE_ESP_ETH select MODULE_ZTIMER select MODULE_ZTIMER_MSEC -config HAVE_ESP_ETH +config HAS_ESP_ETH bool select MODULE_ESP_ETH if MODULE_NETDEV_DEFAULT help From 5b0b0e0a8e840bf8176be294b35882877411690e Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 10:08:41 +0200 Subject: [PATCH 5/8] boards/esp32: replace HAS_PERIPH_ETH by HAS_ESP_ETH in Kconfig --- boards/esp32-ethernet-kit-v1_0/Kconfig | 4 +--- boards/esp32-ethernet-kit-v1_1/Kconfig | 2 +- boards/esp32-ethernet-kit-v1_2/Kconfig | 2 +- boards/esp32-olimex-evb/Kconfig | 4 +--- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/boards/esp32-ethernet-kit-v1_0/Kconfig b/boards/esp32-ethernet-kit-v1_0/Kconfig index 40b77e5362..76dc878350 100644 --- a/boards/esp32-ethernet-kit-v1_0/Kconfig +++ b/boards/esp32-ethernet-kit-v1_0/Kconfig @@ -13,13 +13,11 @@ config BOARD_ESP32_ETHERNET_KIT_V1_0 default y select BOARD_COMMON_ESP32 select CPU_MODEL_ESP32_WROVER_B + select HAS_ESP_ETH select HAS_ESP_JTAG select HAS_PERIPH_ADC - select HAS_PERIPH_ETH select HAS_PERIPH_I2C select HAS_PERIPH_PWM select HAS_PERIPH_SPI if !MODULE_ESP_JTAG - select HAVE_ESP_ETH - source "$(RIOTBOARD)/common/esp32/Kconfig" diff --git a/boards/esp32-ethernet-kit-v1_1/Kconfig b/boards/esp32-ethernet-kit-v1_1/Kconfig index ac1190ce3d..9303dd1514 100644 --- a/boards/esp32-ethernet-kit-v1_1/Kconfig +++ b/boards/esp32-ethernet-kit-v1_1/Kconfig @@ -13,9 +13,9 @@ config BOARD_ESP32_ETHERNET_KIT_V1_1 default y select BOARD_COMMON_ESP32 select CPU_MODEL_ESP32_WROVER_B + select HAS_ESP_ETH select HAS_ESP_JTAG select HAS_PERIPH_ADC - select HAS_PERIPH_ETH select HAS_PERIPH_I2C select HAS_PERIPH_PWM select HAS_PERIPH_SPI if !MODULE_ESP_JTAG diff --git a/boards/esp32-ethernet-kit-v1_2/Kconfig b/boards/esp32-ethernet-kit-v1_2/Kconfig index 2814c5282f..214ac6ff81 100644 --- a/boards/esp32-ethernet-kit-v1_2/Kconfig +++ b/boards/esp32-ethernet-kit-v1_2/Kconfig @@ -13,9 +13,9 @@ config BOARD_ESP32_ETHERNET_KIT_V1_2 default y select BOARD_COMMON_ESP32 select CPU_MODEL_ESP32_WROVER_E + select HAS_ESP_ETH select HAS_ESP_JTAG select HAS_PERIPH_ADC - select HAS_PERIPH_ETH select HAS_PERIPH_I2C select HAS_PERIPH_PWM select HAS_PERIPH_SPI if !MODULE_ESP_JTAG diff --git a/boards/esp32-olimex-evb/Kconfig b/boards/esp32-olimex-evb/Kconfig index 7ed4a03328..32232e3a7d 100644 --- a/boards/esp32-olimex-evb/Kconfig +++ b/boards/esp32-olimex-evb/Kconfig @@ -13,14 +13,12 @@ config BOARD_ESP32_OLIMEX_EVB select BOARD_COMMON_ESP32 select CPU_MODEL_ESP32_WROOM_32 select HAS_ARDUINO + select HAS_ESP_ETH select HAS_PERIPH_ADC if USEMODULE_OLIMEX_ESP32_GATEWAY select HAS_PERIPH_I2C select HAS_PERIPH_PWM select HAS_PERIPH_SPI - select HAS_PERIPH_ETH select HAS_PERIPH_CAN select HAS_PERIPH_IR - select HAVE_ESP_ETH - source "$(RIOTBOARD)/common/esp32/Kconfig" From dff5c8daade82aa4a1c714aedd13699b57805bff Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 10:10:12 +0200 Subject: [PATCH 6/8] cpu/esp32: fix Kconfig for esp_eth --- cpu/esp32/esp-eth/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpu/esp32/esp-eth/Kconfig b/cpu/esp32/esp-eth/Kconfig index 0f9b151b86..824ca7c561 100644 --- a/cpu/esp32/esp-eth/Kconfig +++ b/cpu/esp32/esp-eth/Kconfig @@ -11,7 +11,8 @@ config MODULE_ESP_ETH depends on CPU_FAM_ESP32 depends on HAS_ESP_ETH select MODULE_ESP_IDF_ETH - select MODULE_ESP_IDF_ETH_PHY + select MODULE_ESP_IDF_EVENT + select MODULE_ESP_IDF_SPI_FLASH select MODULE_NETDEV_ETH select MODULE_NETOPT select MODULE_ZTIMER From e8c8c8d9e5aa51dc371b91086764dc14ab9d7d11 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 10:09:45 +0200 Subject: [PATCH 7/8] tests/driver_esp_eth: replace HAS_PERIPH_ETH by HAS_ESP_ETH in Kconfig --- tests/driver_esp_eth/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/driver_esp_eth/Kconfig b/tests/driver_esp_eth/Kconfig index ac03063580..a3a86a8fc2 100644 --- a/tests/driver_esp_eth/Kconfig +++ b/tests/driver_esp_eth/Kconfig @@ -9,4 +9,4 @@ config APPLICATION bool default y depends on HAS_ARCH_ESP32 - depends on HAS_PERIPH_ETH + depends on HAS_ESP_ETH From 2347e805d76db94f7539579a01151499c222a9da Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Wed, 3 Aug 2022 07:03:48 +0200 Subject: [PATCH 8/8] murdock: add an ESP32 board with feature esp_eth --- .murdock | 1 + 1 file changed, 1 insertion(+) diff --git a/.murdock b/.murdock index 906799a045..2baf128c61 100755 --- a/.murdock +++ b/.murdock @@ -34,6 +34,7 @@ derfmega128 dwm1001 esp32-ci esp32-heltec-lora32-v2 +esp32-olimex-evb esp8266-ci esp8266-esp-12x hamilton