Skip to content

Add RTL8201-based wESP32 rev7 Ethernet option#5667

Open
snoack wants to merge 1 commit into
wled:mainfrom
snoack:wesp32-rev7
Open

Add RTL8201-based wESP32 rev7 Ethernet option#5667
snoack wants to merge 1 commit into
wled:mainfrom
snoack:wesp32-rev7

Conversation

@snoack

@snoack snoack commented Jun 4, 2026

Copy link
Copy Markdown

Add a separate Ethernet board type for wESP32 rev7 and later boards, which use the RTL8201 PHY instead of the LAN8720 used by earlier revisions.

Summary by CodeRabbit

  • New Features
    • Added support for WESP32 Rev 7 with RTL8201 Ethernet PHY.
    • Ethernet Type selector now distinguishes WESP32 (Rev ≤6) vs WESP32 (Rev 7+).
    • Improved Ethernet compatibility and initialization for WESP32 Rev 7 devices.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c010c9bc-9bc9-4577-b8af-f4aa7d71bf4a

📥 Commits

Reviewing files that changed from the base of the PR and between 98a698a and f710aa1.

📒 Files selected for processing (3)
  • wled00/const.h
  • wled00/data/settings_wifi.htm
  • wled00/network.cpp
🚧 Files skipped from review as they are similar to previous changes (3)
  • wled00/const.h
  • wled00/data/settings_wifi.htm
  • wled00/network.cpp

Walkthrough

Adds support for WESP32 Rev 7 (RTL8201) by incrementing the Ethernet type count, adding a new WLED_ETH_WESP32_RTL8201 constant and ethernetBoards[] entry (RTL8201, GPIO16/17, ETH_CLOCK_GPIO0_IN), clarifies the existing WESP32 comment, and splits the settings UI option into Rev ≤6 and Rev 7+.

Changes

WESP32 Rev 7 (RTL8201) Ethernet Board Support

Layer / File(s) Summary
Ethernet type definition
wled00/const.h
WLED_NUM_ETH_TYPES incremented from 16 to 17; new macro WLED_ETH_WESP32_RTL8201 added with ID 16.
Board configuration and PHY mapping
wled00/network.cpp
Existing WESP32 entry comment updated to "rev 6 and earlier"; new ethernetBoards[] entry for WLED_ETH_WESP32_RTL8201 defines RTL8201 PHY with MDC=GPIO16, MDIO=GPIO17 and ETH_CLOCK_GPIO0_IN.
Ethernet Type UI dropdown
wled00/data/settings_wifi.htm
Replaced single WESP32 option with two revision-specific options: WESP32 (Rev ≤6) (value 3) and WESP32 (Rev 7+) (value 16).

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant Firmware
  participant EthernetTable
  participant PHY
  Browser->>Firmware: submit Ethernet Type (WESP32 Rev 7)
  Firmware->>EthernetTable: lookup WLED_ETH_WESP32_RTL8201 (id 16)
  EthernetTable->>PHY: initialize RTL8201 with MDC=GPIO16 MDIO=GPIO17 CLOCK=GPIO0_IN
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • wled/WLED#5608: Related to compile-time validation and synchronization of ethernetBoards[] with WLED_NUM_ETH_TYPES.
  • wled/WLED#5156: Similar pattern of adding Ethernet type constants, board entries, and UI dropdown updates.

Suggested reviewers

  • netmindz
  • softhack007
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add RTL8201-based wESP32 rev7 Ethernet option' directly and specifically describes the main change: adding support for the new RTL8201-based Ethernet option for wESP32 revision 7 boards.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Infer (1.2.0)
wled00/network.cpp

In file included from wled00/network.cpp:1:
wled00/wled.h:77:10: fatal error: 'Arduino.h' file not found
77 | #include <Arduino.h>
| ^~~~~~~~~~~
1 error generated.
Error: the following clang command did not run successfully:
/opt/infer-linux-x86_64-v1.2.0/lib/infer/facebook-clang-plugins/clang/install/bin/clang-18
@/tmp/coderabbit-infer/f710aa15d047c289c9096c2289a844123cacc3e5-9bd96c5bbecf8550/tmp/clang_command_.tmp.ef971e.txt
++Contents of '/tmp/coderabbit-infer/f710aa15d047c289c9096c2289a844123cacc3e5-9bd96c5bbecf8550/tmp/clang_command_.tmp.ef971e.txt':
"-cc1" "-load"
"/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../../facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib"
"-add-plugin" "BiniouASTExporter" "-plugin-arg-BiniouASTExporter" "-"
"-plugin-arg-BiniouASTExporter" "PREPEND_CURRENT_DIR=1"
"-plugin-arg-BiniouASTExporter" "MAX_STRING_SIZE=65535" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax

... [truncated 1076 characters] ...

ns/clang/install/lib/clang/18/include"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include"
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-Wno-ignored-optimization-argument" "-Wno-everything"
"-fdeprecated-macro" "-ferror-limit" "19" "-fgnuc-version=4.2.1"
"-fskip-odr-check-in-gmf" "-fcxx-exceptions" "-fexceptions"
"-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o"
"/tmp/coderabbit-infer/9bd96c5bbecf8550/file.o" "-x" "c++"
"wled00/network.cpp" "-O0" "-fno-builtin" "-include"
"/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../lib/clang_wrappers/global_defines.h"
"-Wno-everything"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added enhancement board request PR adding support for a specific board. labels Jun 4, 2026
Comment thread wled00/data/settings_wifi.htm Outdated
Add a separate Ethernet board type for wESP32 rev7 and later boards,
which use the RTL8201 PHY instead of the LAN8720 used by earlier revisions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

board request PR adding support for a specific board. enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants