Commit Graph

233 Commits

Author SHA1 Message Date
David Čermák
00d9861a08 Merge branch 'feature/mmd_access_v5.1' into 'release/v5.1'
esp_eth: Add functions to access PHY using MDIO (v5.1)

See merge request espressif/esp-idf!28840
2024-02-29 20:29:57 +08:00
David Čermák
bf23680ac1 Merge branch 'bugfix/eth_link_reset_v5.1' into 'release/v5.1'
fix(esp_eth): Fixed Ethernet link reset when Ethernet is stopped (v5.1)

See merge request espressif/esp-idf!29329
2024-02-29 19:25:31 +08:00
David Čermák
e9ab9f3c38 Merge branch 'bugfix/ip101_reset_timing_v5.1' into 'release/v5.1'
fix(esp_eth): ip101-specific reset_hw to match reset timings from datasheet (v5.1)

See merge request espressif/esp-idf!29012
2024-02-28 23:11:03 +08:00
Ondrej Kosta
746fd01aea fix(esp_eth): Fixed Ethernet link reset when Ethernet is stopped 2024-02-28 15:49:26 +01:00
Jiang Jiang Jian
0cc6903e15 Merge branch 'feature/spi_eth_no_int_v5.1' into 'release/v5.1'
feat(esp_eth): added SPI Ethernet module polling mode (v5.1)

See merge request espressif/esp-idf!29045
2024-02-28 11:11:01 +08:00
Jiang Jiang Jian
ab894a1086 Merge branch 'bugfix/spi_eth_recv_alloc_v5.1' into 'release/v5.1'
fix(esp_eth): improved SPI Ethernet _alloc_recv_buf error handling (v5.1)

See merge request espressif/esp-idf!29082
2024-02-28 11:10:38 +08:00
Ondrej Kosta
41b67e1031 fix(esp_eth): improved SPI Ethernet _alloc_recv_buf error handling 2024-02-16 16:03:59 +01:00
Ondrej Kosta
8d8fd2b765 feat(esp_eth): added SPI Ethernet module polling mode
Closes https://github.com/espressif/esp-idf/issues/12682
2024-02-15 14:27:45 +00:00
Bogdan Kolendovskyy
5b9b27ff75 esp_eth: Add functions to access PHY using MDIO
Specifically:
  - Set/get address
  - Read/write data at address with specified MDIO access function
  - Read/write both address and data with a single call
2024-02-13 12:47:46 +01:00
Bogdan Kolendovskyy
7cb91c19cd fix(esp_eth): ip101-specific reset_hw to match reset timings from datasheet
IP101 requires 10ms reset assertion time and 10ms post-reset delay to properly initialize.
2024-02-09 15:04:12 +01:00
Ondrej Kosta
e9db535290 ci(esp_eth): enabled Ethernet ip101 jobs 2024-01-22 12:46:33 +01:00
Ondrej Kosta
51aad1d75b feat(esp_eth): abstraction of SPI driver for SPI Ethernet modules 2023-12-13 10:44:23 +01:00
Ondrej
d23b41c7cb fix(esp_eth): fixed ETH_CMD_READ/WRITE_PHY_REG build issue 2023-11-22 15:28:01 +01:00
Ondrej Kosta
0df97644c4 ci(esp_eth): addressed LAN8720 errata in CI test 2023-11-22 15:28:01 +01:00
Ondrej Kosta
99d4c1d13c feat(esp_eth): added ioctl option to read/write PHY registers
LAN87xx: Added extra delay after setting PHY speed
2023-11-22 15:28:01 +01:00
Ondrej
1d3e466c61 ci(esp_eth): make additional Ethernet chips test as nightly run 2023-11-22 15:28:01 +01:00
Ondrej
1215fca04e ci(esp_eth): added tests of all supported Etherent chips 2023-11-22 15:27:57 +01:00
Ondrej Kosta
6fda9fe207 fix(esp_eth): various Ethernet driver fixes
ksz8851snl: enabled reception of multicast frames

Internal EMAC: fixed APLL CLK deinitialization

DM9051 and KSZ80xx: fixed speed configuration when not in loopback mode

phy_802_3: added multiple attempts when autodetecting PHY address
2023-11-22 15:23:52 +01:00
Bogdan Kolendovskyy
6bc957ee4f esp_eth: add loopback test, change chip drivers to reflect chip specific behaviour
In esp_eth_test_apps.c:
Add test of loopback functionality. Change speed/duplex/autonegotiation test - remove need to enable loopback (required
for it to work on some phys supported by ESP-IDF)

In Kconfig.projbuild:
Add parameters to select which configuration is used - standard or custom.
Add for custom configuration parameters to select MDC and MDIO pins (required to work with WESP-32 and other boards that
use non-standard pin assignments).

In esp_eth_test_common.c:
Add code to support changes made in Kconfig

In sdkconfig.ci.default_rtl8201:
Change config which is used. Now custom is used and MDC is gpio 16, MDIO is gpio 17. Reuqired to work with WESP-32

In esp_eth_phy_802_3.h:
Make 802.3 API public.

In esp_eth_phy_802_3.c:
Add loopback check in eth_phy_802_3_set_duplex(). Now ESP_ERR_INVALID_STATE is invoked on attempt to set duplex to half
when loopback is enabled.
Remove static property from esp_eth_phy_802_3_autonego_ctrl and esp_eth_phy_802_3_loopback.

In esp_eth_phy_dm9051.c:
Add dm9051_loopback() because DM9051 requires setting additional bit to enable auto-negotiation loopback for data to be
received. Add dm9051_set_speed() which invokes ESP_ERR_INVALID_STATE on attempt to set speed to 10 Mbps when loopback is
enabled because such speed configuration is unsupported.

In esp_eth_phy_ksz80xx.c:
Add ksz80xx_set_speed() which invokes ESP_ERR_INVALID_STATE on attempt to set speed to 10 Mbps when loopback is enabled
because such speed configuration is unsupported.

In esp_eth_phy_ksz8851snl.c:
Change phy_ksz8851_set_duplex() to invoke ESP_ERR_INVALID_STATE on attempt to set duplex to half when loopback is enabled.

In  esp_eth_phy_dp83848.c, esp_eth_phy_rtl8201.c:
Add autonego_ctrl implementation which prevents enabling autonegotiation when loopback is enabled.
Add loopback implementation which disables autonegotiation prior to enabling loopback.

In esp_eth_phy_lan87xx.c:
Add autonego_ctrl implementation which prevents enabling autonegotiation when loopback is enabled.
Add loopback implementation which disables autonegotiation prior to enabling loopback.
Fix link indicating being down when loopback is enabled by force setting link up.
2023-11-22 15:23:52 +01:00
David Čermák
a7a43973f6 Merge branch 'bugfix/ksz8041_model_number_0x13_v5.1' into 'release/v5.1'
esp_eth: Add model number 0x13 to the list of suported ksz80xx models (backport v5.1)

See merge request espressif/esp-idf!26380
2023-10-17 14:13:00 +08:00
Bogdan Kolendovskyy
5a195cdf0a fix(esp_eth): Add model number 0x13 to list of suported models
Add model number 0x13 to KSZ80xx driver's list of supported models
corresonding to KSZ8041RLNI.
2023-10-09 12:42:15 +02:00
Ondrej Kosta
09f6dfa2c4 feat(esp_eth): added IRAM optimization option for internal EMAC 2023-09-25 02:10:29 +00:00
Jiang Jiang Jian
97b0cb9d14 Merge branch 'contrib/github_pr_11337_v5.1' into 'release/v5.1'
w5500: mac: poll VERSIONR to ensure the chip is initialised (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24551
2023-07-05 19:34:10 +08:00
Jackson Ming Hu
098e559d46 w5500: rework version check to avoid a false alarm on fault detection
See: https://github.com/espressif/esp-idf/issues/11331
2023-07-03 06:51:15 +00:00
Ondrej Kosta
888e4339f9 esp_eth: fixed esp_eth_transmit_vargs to transmit only when link is up
esp_eth test: clear unicast Rx event before wait
2023-05-29 11:22:11 +00:00
Mahavir Jain
133e19d6ee
tests: update Root certificate for the test endpoints
Use Root certificate (`DigiCert Global Root G2`) for the
`dl.espressif.com` and `espressif.com` test endpoints.

This fixes the test failure introduced due to renewal of
the intermediate certificate.
2023-05-17 15:27:24 +05:30
morris
4f1fc73fc2 Merge branch 'bugfix/eth_driver_cleanup_v5.1' into 'release/v5.1'
Ethernet driver and documentation clean-up (v5.1)

See merge request espressif/esp-idf!23545
2023-05-04 10:05:25 +08:00
Ondrej Kosta
71d19fa9c9 Ethernet driver and documentation clean-up 2023-05-03 07:39:24 +00:00
Ondrej Kosta
1042115566 esp_eth pytest: increased robustness of the L2 test
Added filtering frames based on MAC address
2023-05-02 10:25:58 +02:00
Marius Vikhammer
4c3c6b7f99 ci: remove redundent ci configs for chip support and network components
CI would build psram config test apps even for target with no psram.
2023-04-26 17:29:51 +08:00
Ondrej
2ec7fc8f10 esp_eth: allowed DM9051 to receive multicast packets
Removed extra PHY status link checks from DM9051 MAC layer
2023-03-14 13:59:27 +00:00
Omar Chebib
5e5343d429 TWDT: Use the new TWDT Kconfig options in the examples and tests 2023-02-17 11:22:25 +08:00
Ondrej Kosta
05510e67d1 Merge branch 'bugfix/eth_lan8720_ci' into 'master'
esp_eth: start/stop and L2 test stability improvements

See merge request espressif/esp-idf!21898
2023-02-09 15:36:12 +08:00
Ondrej Kosta
51ea57f5b8 esp_eth: improved L2 test stability 2023-02-03 10:48:39 +01:00
Ondrej Kosta
256d457969 esp_eth: possible start/stop issue fixed
ESP32 EMAC could hang when stopped/started multiple times at 10Mbps speed mode
2023-02-03 10:48:39 +01:00
Ondrej
5fdb49698a esp_eth: fixed copyright for W5500 2023-01-19 07:56:22 +00:00
Reinis Muiznieks
bb2f346e55 Verify w5500 chip properly 2023-01-17 11:52:51 +02:00
Ondrej Kosta
84ab32b4ef Merge branch 'bugfix/emac_memory_leak' into 'master'
Fixed false positive emac rx memory leak reported by Coverity

Closes IDF-6363

See merge request espressif/esp-idf!21341
2022-12-05 20:04:15 +08:00
Ondrej Kosta
600788da6a Merge branch 'contrib/github_pr_10292' into 'master'
fix small bug when logging eth error (GitHub PR)

Closes IDFGH-8869

See merge request espressif/esp-idf!21407
2022-12-05 17:58:37 +08:00
Ondrej
647a9dfde3 Improved emac rx task code to suppress Coverity false positive memory leak indication 2022-12-02 12:57:43 +00:00
Alexander Hübener
93a8510dc5 fixed args order 2022-12-01 21:36:13 +01:00
Ondrej
2bf7255285 Ethernet related tests improvements
esp_eth: tests migrated to pytest and added support of multiple Ethernet devices

esp_netif: l2tap test migrated to pytest
2022-11-28 11:34:34 +00:00
Ondrej
c40e4eb499 esp_eth: DM9051 stop/start issue fixed 2022-11-28 10:54:43 +00:00
Ondrej Kosta
785f154f56 Merge branch 'feature/emac_buff' into 'master'
esp_eth: receive buffer allocation optimization

Closes IDFGH-7769

See merge request espressif/esp-idf!19977
2022-11-24 00:48:19 +08:00
Omar Chebib
cd21058097 C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT
Closes https://github.com/espressif/esp-idf/issues/9938
2022-11-21 16:18:08 +08:00
Ondrej
6fff81d970 esp_eth: receive buffer allocation optimization
Receive buffers are allocated with a size equal to actual received frame size
2022-11-15 10:44:12 +00:00
Ondrej Kosta
f6b2414bb5 Merge branch 'bugfix/esp_eth_test_rx' into 'master'
component_ut_pytest_esp32_ip101 fix

Closes IDFCI-1313

See merge request espressif/esp-idf!18526
2022-08-05 14:02:39 +08:00
Ivan Grokhotkov
401c10ecfb build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
Ondrej Kosta
2a09f887f3 eth test_apps: fixes problem with 'traffic_gen' process hanging 2022-08-03 07:42:38 +00:00
Guillaume Souchere
6005cc9163 hal: Deprecate interrupt_controller_hal.h, cpu_hal.h and cpu_ll.h interfaces
This commit marks all functions in interrupt_controller_hal.h, cpu_ll.h and cpu_hal.h as deprecated.
Users should use functions from esp_cpu.h instead.
2022-07-22 00:06:06 +08:00