Skip to content

Add RTL8201-based wESP32 rev7 Ethernet option - #5667

Open
snoack wants to merge 2 commits into
wled:mainfrom
snoack:wesp32-rev7
Open

snoack wants to merge 2 commits 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 Ethernet support for WESP32 Rev 7 and later boards using the RTL8201 PHY.
    • The Ethernet type selector now distinguishes WESP32 Rev 6 and earlier from Rev 7 and later.
    • WESP32 Rev 7 and later devices use Ethernet settings matched to their board hardware, including the RTL8201 PHY and required connection pins. This expands the available WESP32 Ethernet options while keeping earlier revisions separately selectable.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: wled/WLED/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8565d8a7-4d75-4a4f-8b41-060f0d61d64c
📥 Commits

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

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

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


Walkthrough

Adds Ethernet board support for WESP32 revision 7+ using the RTL8201 PHY. The settings UI distinguishes revision 7+ from the existing revision 6 and earlier option.

Changes

WESP32 Rev 7 (RTL8201) Ethernet Board Support

Layer / File(s) Summary
Ethernet type and board configuration
wled00/const.h, wled00/network.cpp
Increments WLED_NUM_ETH_TYPES from 16 to 17, adds WLED_ETH_WESP32_RTL8201 with ID 16, and configures the new board entry with RTL8201, MDC GPIO16, MDIO GPIO17, no power pin, and ETH_CLOCK_GPIO0_IN. The existing WESP32 configuration is labeled for revision 6 and earlier.
Revision-specific settings option
wled00/data/settings_wifi.htm
Labels Ethernet type 3 as WESP32 (Rev ≤6) and adds type 16 as WESP32 (Rev 7+).

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: dedehai

Merge Risk: ⚪ Minimal · up to eacfb

The new option should select and persist the Rev 7+ Ethernet profile. No concrete merge-blocking defect is established; the exact V5 package API and a full build remain unverified.

Security Architecture Review

Security architecture risk: 🔵 Low · up to eacfb

The new board option uses the existing settings controls and Ethernet initialization path. No introduced security weakness was identified, but hardware compatibility and interrupted-save recovery remain incompletely verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The traced settings mutation affects the addressed device's saved Ethernet selection, hardware initialization, and GPIO ownership. The inspected path does not introduce cross-device authority; broader network reachability was not established.

Trust Boundaries and Controls

  • observed — A caller-supplied ETH value reaches board selection only through the existing settings controls. Accepting the new valid value 16 does not change those controls or grant additional driver authority beyond the existing Ethernet-selection capability.

Resilience and Maintainability Implications

  • observed — The unchanged persistence routine requests a backup, defers writing when the JSON lock is unavailable, and writes cfg.json directly. It clears the pending-write flag without checking serialization success. This limits evidence for interrupted-save recovery but does not establish a new type-16-specific failure or security regression; complete backup restoration was not inspected.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding an RTL8201-based Ethernet option for wESP32 revision 7.

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.

@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 Resolved
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.

3 participants