Commit Graph

93 Commits

Author SHA1 Message Date
Jon Shallow
154ad2e0e1 esp_eth_mac_openeth.c: Fix issue created by generic check macros update
Merges https://github.com/espressif/esp-idf/pull/6936
2021-04-26 08:40:07 +00:00
David Cermak
1e674f1d20 esp_eth: Update KSZ8851SNL driver to use global error checkers
Also updated KSZ8851SNL per internal code review:
* Removed Link status change interrupt as it's handled with polling
* Added auto negotiation timeout
* Updated typedefs, moved types to appropriate source, updated
  components/esp_eth/src/ksz8851.h to use only inherent device types
* Applied IDF code formatting
* Updated header file order to include first the most generic to more
  specific
2021-04-22 13:55:51 +00:00
Vladimir Chistyakov
c4f131e6ee esp_eth: Add a KSZ8851SNL SPI Ethernet driver
Implement the PHY and MAC layers in the driver similar to
the W5500 driver.

Update Kconfig, CMakeLists.txt, and component.mk to incorporate
the changes.

Resolves: #6542

Merges https://github.com/espressif/esp-idf/pull/6636
Closes https://github.com/espressif/esp-idf/issues/6542
2021-04-22 13:55:51 +00:00
morris
0733adab5e esp_eth: using esp_timer to check link status 2021-04-21 13:08:07 +08:00
morris
537617aec7 esp_eth: support user customized PHY io function
Closes https://www.github.com/espressif/esp-idf/issues/6745
2021-04-21 13:08:07 +08:00
morris
ef344d89ae esp_eth: apply generic error check macros 2021-04-13 10:54:33 +08:00
David Čermák
0f36a2dd16 Merge branch 'bugfix/eth_w5500_4byte_corruption' into 'master'
esp_eth: Fix w5500 read register operations

Closes IDFGH-4776 and IDFGH-4400

See merge request espressif/esp-idf!13060
2021-04-12 14:26:30 +00:00
David Cermak
7af358ed93 esp_eth: Fix w5500 to break from potentially infinite tx loop
The issue typically happens for link-down during Tx. Added two retry levels, one before checking the sanity of the w5500 phy register and another for the Tx done itself (if the device is in the sane state)

Closes https://github.com/espressif/esp-idf/issues/6233
2021-04-12 07:59:40 +00:00
David Cermak
dfe9580967 esp_eth: Fix w5500 to correctly read registers on -Os
Reading SPI data may come in 4-byte units and thus result in unwanted
overwrites if smaller size registers read, especially if multiple placed
one after another. Fixed by using direct reads to `trans` structure for
sizes smaller or equal to 4.

Closes https://github.com/espressif/esp-idf/issues/6579
2021-04-12 07:59:40 +00:00
Omar Chebib
cd79f3907d gpio: Disable USB JTAG when setting pins 18 and 19 as GPIOs on ESP32C3
When `DIS_USB_JTAG` eFuse is NOT burned (`False`), it is not possible
to set pins 18 and 19 as GPIOs. This commit solves this by manually
disabling USB JTAG when using pins 18 or 19.
The functions shall use `gpio_hal_iomux_func_sel` instead of
`PIN_FUNC_SELELECT`.
2021-04-08 14:01:18 +08:00
morris
2a34b0496c esp_eth: refactor ksz8041 driver into ksz80xx 2021-03-30 08:53:15 +00:00
Patrick Wieder
98a4c70af9 Added support for Ethernet PHY KSZ8081
Merges https://github.com/espressif/esp-idf/pull/6578
2021-03-30 08:53:15 +00:00
morris
9d7ba4c49a eth_phy: fix wrong register bit order in ksz8041 2021-03-30 08:53:15 +00:00
morris
006a87557b esp_eth: added option to disable soft flow control when rx buffer is few 2021-02-01 14:14:54 +08:00
suda-morris
0208810eca esp_eth: fix typo in lan8720 driver
Closes https://github.com/espressif/esp-idf/issues/6469
2021-01-27 23:48:10 +08:00
morris
c010f24d8b esp_eth: deprecate esp_eth_receive
Ethernet driver is interrupt driven only, don't support polling mode.
So deprecate esp_eth_receive API.
2021-01-27 23:48:01 +08:00
Axel Lin
2049aa9f68 esp_eth: Add ioctl command for getting duplex mode
Similar to ETH_CMD_G_SPEED, add ETH_CMD_G_DUPLEX_MODE for getting duplex mode.

Merges https://github.com/espressif/esp-idf/pull/6436
2021-01-25 08:40:47 +00:00
morris
753a929525 global: fix sign-compare warnings 2021-01-12 14:05:08 +08:00
morris
c280dc3ac5 eth: added cert for download test 2021-01-07 11:22:23 +08:00
morris
1e905acacf eth: support W5500 MAC RAW mode
W5500 features an Ethernet MAC+PHY, plus a HW SOCKET implementation.
But in IDF, we only use software TCP/IP stack, which means we have
to bypass the HW TCP/IP stack in W5500.
So we enables the MAC RAW mode in W5500.
2020-11-16 13:30:49 +08:00
Angus Gratton
420aef1ffe Updates for riscv support
* Target components pull in xtensa component directly
* Use CPU HAL where applicable
* Remove unnecessary xtensa headers
* Compilation changes necessary to support non-xtensa gcc types (ie int32_t/uint32_t is no
  longer signed/unsigned int).

Changes come from internal branch commit a6723fc
2020-11-13 07:49:11 +11:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Yorick van Pelt
65707cfb41 esp_eth_mac_esp32: optionally setup SMI GPIO's
This enables passing smi_mdio_gpio_num = -1 to disable that signal

Merges https://github.com/espressif/esp-idf/pull/5903
2020-09-25 19:59:41 +08:00
Renz Bagaporo
6462f9bfe1 esp32, esp32s2: create esp_pm component 2020-09-25 05:24:10 +00:00
morris
9fa06719fa global: enable build uinit test for esp32-s3 2020-09-22 15:15:03 +08:00
Ivan Grokhotkov
b6467257b9 Merge branch 'feature/cmock_component' into 'master'
cmock as component replacing unity

See merge request espressif/esp-idf!9859
2020-09-10 16:06:20 +08:00
Jakob Hasse
f7f46905ec esp_eth: moved extern "C" after includes 2020-09-08 17:44:57 +08:00
morris
31aa16bbe6 unit_test: switch icmp test server to taobao 2020-09-06 09:42:44 +08:00
Jakob Hasse
20c068ef3b cmock: added cmock as component
* changing dependencies from unity->cmock
* added component.mk and Makefile.projbuild
* ignore test dir in gen_esp_err_to_name.py
* added some brief introduction of CMock in IDF
2020-09-02 16:38:37 +08:00
morris
76fe489c58 ethernet: support power on timeout
Closes https://github.com/espressif/esp-idf/issues/5425
2020-08-10 18:54:25 +08:00
morris
f4131b9b42 ethernet: handle early rx interrupt 2020-08-10 18:54:25 +08:00
morris
4e38aab1b0 ethernet: support flow control for esp32 emac 2020-08-10 18:54:25 +08:00
morris
2917651478 esp_rom: extract common ets apis into esp_rom_sys.h 2020-07-27 15:27:01 +08:00
morris
ab0537c079 esp_rom: extract common MD5 hash apis into esp_rom_md5.h 2020-07-21 17:01:28 +08:00
morris
abcea51976 ethernet: insert min assert time for PHY HW reset
Closes https://github.com/espressif/esp-idf/issues/5528
2020-07-09 22:03:17 +08:00
morris
648bcc7a87 ethernet: add ksz8041 in basic ethernet example 2020-07-09 21:49:07 +08:00
Meowthink
62237cf28c Add Microchip KSZ8041 PHY support.
Merges https://github.com/espressif/esp-idf/pull/5452
2020-07-09 21:00:42 +08:00
morris
a4d0033c03 esp_rom: extract common GPIO apis into esp_rom_gpio.h 2020-07-07 11:40:19 +08:00
morris
1184366387 ethernet: support pin emac task to core 2020-05-29 17:51:37 +08:00
morris
d8a9ce14d7 ethernet: fix potential task watch dog timeout 2020-05-13 16:03:00 +08:00
morris
4454b198bb ethernet: better control start/stop/uninstall/install 2020-05-13 15:58:42 +08:00
morris
6020d6a5d4 ethernet: esp_eth_stop API should stop emac hardware 2020-05-13 15:58:42 +08:00
Renz Bagaporo
3d0967a58a test: declare requirements and include dirs private 2020-03-23 10:58:50 +08:00
morris
0a7ccb8095 ethernet: fix potential null pointer dereference
Closes https://github.com/espressif/esp-idf/issues/4890
2020-03-07 12:12:29 +08:00
morris
ea8d6318af add SOC_EMAC_SUPPORTED in soc_caps.h 2020-02-24 11:57:58 +08:00
morris
9e59be1aab ethernet: add enc28j60 example 2020-02-10 12:56:14 +08:00
Henry Gilbert
eda07acc81 Add ENC28J60 Ethernet Driver
Merges https://github.com/espressif/esp-idf/pull/4435
2020-02-10 12:56:14 +08:00
morris
e30cd361a8 global: rename esp32s2beta to esp32s2 2020-01-22 12:14:38 +08:00
morris
cc0459eea2 ethernet: always put eth_driver handle in SRAM
Closes https://github.com/espressif/esp-idf/issues/4635
2020-01-19 16:25:44 +08:00
morris
5ad0bdd8db ethernet: work with cache disabled
add ETH_MAC_FLAG_WORK_WITH_CACHE_DISABLE flag, make ethenret driver
possible to work when cache disabled

Closes https://github.com/espressif/esp-idf/issues/4406
2020-01-19 16:25:24 +08:00