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
Copy link
Copy Markdown

@snoack snoack commented Jun 4, 2026

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
    • Updated Ethernet Type selection dropdown to distinguish between WESP32 Rev 6 and earlier versus Rev 7 and later variants

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.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

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: 3fc98948-9256-4144-88ef-456e3c0f8242

📥 Commits

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

📒 Files selected for processing (3)
  • wled00/const.h
  • wled00/data/settings_wifi.htm
  • wled00/network.cpp

Walkthrough

This PR adds support for WESP32 Rev 7 with RTL8201 Ethernet PHY. It introduces a new Ethernet type constant, defines its board-level pin and PHY configuration, updates existing WESP32 entries to clarify Rev 6 compatibility, and splits the Ethernet Type dropdown to allow users to select the appropriate hardware variant.

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 value 16.
Board configuration and PHY mapping
wled00/network.cpp
Existing WESP32 entry comment updated to specify "rev 6 and earlier"; new ethernetBoards[] entry for WLED_ETH_WESP32_RTL8201 defines RTL8201 PHY with MDC/MDIO on GPIO16/GPIO17 and ETH_CLOCK_GPIO0_IN clock mode.
Ethernet Type UI dropdown
wled00/data/settings_wifi.htm
Single WESP32 option replaced with two revision-specific options: "WESP32 (Rev 6 and earlier)" and "WESP32 (Rev 7 and later)" with distinct values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • wled/WLED#4602: Directly addresses the request for explicit WESP32 Rev 7 (RTL8201) support with the new constant, board configuration, and UI dropdown option.

Possibly related PRs

  • wled/WLED#5608: Adds compile-time validation to ensure ethernetBoards[] stays synchronized with WLED_NUM_ETH_TYPES—directly relevant to the type count and array entry changes in this PR.
  • wled/WLED#5156: Extends the Ethernet type system with new constants in const.h, entries in network.cpp's ethernetBoards[], and UI dropdown updates—using the same pattern as this PR.

Suggested labels

enhancement, board request

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 accurately summarizes the main change: adding support for a new Ethernet type for wESP32 revision 7 boards with RTL8201 PHY, which is reflected in all modified files.
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/98a698a6f912d0355e9945f527db1d89bb7a9250-9bd96c5bbecf8550/tmp/clang_command_.tmp.a90410.txt
++Contents of '/tmp/coderabbit-infer/98a698a6f912d0355e9945f527db1d89bb7a9250-9bd96c5bbecf8550/tmp/clang_command_.tmp.a90410.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
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.

1 participant