Skip to content

Add RTL8201-based wESP32 rev7 Ethernet option - #5667

Merged
DedeHai merged 6 commits into
wled:mainfrom
snoack:wesp32-rev7
Nov 23, 2026
Merged

DedeHai merged 6 commits into
wled:mainfrom
snoack:wesp32-rev7

Conversation

@snoack

@snoack snoack commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

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, helping you choose the option that matches your board.
    • Ethernet settings are matched to the hardware for each WESP32 revision; earlier revisions remain separately selectable.
  • Updates
    • Updated the Domraem Ethernet option label to “Domraem-ETHV1.”

@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent 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 17 to 18, adds WLED_ETH_WESP32_RTL8201 with ID 17, 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 the existing WESP32 option as WESP32 (Rev ≤6) and adds WESP32 (Rev 7+) with value 17. Changes the Domraem label to Domraem-ETHV1.

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

Change: Feature

Suggested reviewers: dedehai, jacker-25

Merge Risk: Minimal · up to f8f34

This adds a separate Ethernet option for WESP32 rev 7 and later boards, which use the RTL8201 PHY. Existing configurations keep their current type values, so the merge risk appears minimal.

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: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: a new Ethernet board option for wESP32 rev7 that uses the RTL8201 PHY. The raw summary confirms the added WLED_ETH_WESP32_RTL8201 type (ID 17), the new rev 7+ table en…
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.
Full details: Title check

Explanation

The title names the main change: a new Ethernet board option for wESP32 rev7 that uses the RTL8201 PHY. The raw summary confirms the added WLED_ETH_WESP32_RTL8201 type (ID 17), the new rev 7+ table entry in network.cpp, and the matching settings_wifi.htm option. The PR objectives state the same goal: a separate board type for wESP32 rev7 and later, which use RTL8201 instead of LAN8720.

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: wled/WLED
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 420dc4a
  • Layers: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 297fc39e-a8de-44dd-b314-d4f82f4dca63
Commits

Reviewing files that changed from the base of the PR and between 6b077dc and f8f346a.

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.

Recent review details

Context from checks skipped due to timeout: 24

  • GitHub Check: wled_build / Build Environments (esp32dev_hub75_forum_pinout)
  • GitHub Check: wled_build / Build Environments (esp32s3dev_4MB_qspi_hub75)
  • GitHub Check: wled_build / Build Environments (esp32S3_wroom2)
  • GitHub Check: wled_build / Build Environments (usermods)
  • GitHub Check: wled_build / Build Environments (lolin_s2_mini)
  • GitHub Check: wled_build / Build Environments (esp32_eth)
  • GitHub Check: wled_build / Build Environments (esp32s3dev_16MB_opi)
  • GitHub Check: wled_build / Build Environments (esp32s3dev_16MB_opi_hub75)
  • GitHub Check: wled_build / Build Environments (esp32p4_16MB)
  • GitHub Check: wled_build / Build Environments (esp32_wrover)
  • GitHub Check: wled_build / Build Environments (esp32s3dev_8MB_qspi)
  • GitHub Check: wled_build / Build Environments (esp32s3_4M_qspi)
  • GitHub Check: wled_build / Build Environments (esp32dev)
  • GitHub Check: wled_build / Build Environments (esp32c3dev_qio)
  • GitHub Check: wled_build / Build Environments (esp32c3dev)
  • GitHub Check: wled_build / Build Environments (esp32s3_4M_qspi)
  • GitHub Check: wled_build / Build Environments (esp32c6dev_4MB)
  • GitHub Check: wled_build / Build Environments (esp32s3dev_8MB_none)
  • GitHub Check: wled_build / Build Environments (esp32c5dev_8MB_qspi)
  • GitHub Check: wled_build / Build Environments (esp32dev_debug)
  • GitHub Check: wled_build / Build Environments (esp32s3dev_8MB_opi)
  • GitHub Check: wled_build / Build Environments (esp32c5dev)
  • GitHub Check: wled_build / Build Environments (esp01_1m_full)
  • GitHub Check: CodeRabbit
Additional context used

Code guidelines: 5

docs/hardening.instructions.md — configured
docs/cpp.instructions.md — configured
AGENTS.md — configured
docs/web.instructions.md — configured
.github/copilot-instructions.md — auto-discovered
Path-based instructions: 8

Apply the WLED security hardening rules from docs/hardening.instructions.md, and consult docs/securecode.instructions.md when more details are needed for actionable recommendations.

CodeRabbit configuration file

Files:

  • wled00/const.h
  • wled00/network.cpp
Follow the C++ coding conventions documented in docs/cpp.instructions.md and the general project guidelines in AGENTS.md and .github/copilot-instructions.md.

CodeRabbit configuration file

Files:

  • wled00/const.h
  • wled00/network.cpp
Apply the WLED web UI security rules from docs/securecode.instructions.md (sections WEB1-WEB7).

CodeRabbit configuration file

Files:

  • wled00/data/settings_wifi.htm
Follow the web UI conventions documented in docs/web.instructions.md.

CodeRabbit configuration file

Files:

  • wled00/data/settings_wifi.htm
Applicability reference: AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference See also: `.github/copilot-instructions.md`, `.github/agent-build.instructions.md`, `docs/cpp.instructions.md`, `docs/web.in...

CodeRabbit inference engine (docs/hardening.instructions.md)

Files:

  • wled00/const.h
  • wled00/data/settings_wifi.htm
  • wled00/network.cpp
Source excerpt: Follow the existing style in the file you are editing Source excerpt: Avoid unexplained "magic numbers".

CodeRabbit inference engine (AGENTS.md)

Files:

  • wled00/const.h
  • wled00/data/settings_wifi.htm
  • wled00/network.cpp
Applicability reference: AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference See also: `.github/copilot-instructions.md`, `.github/agent-build.instructions.md`, `docs/cpp.instructions.md`, `docs/web.instructions.md`, `d...

CodeRabbit inference engine (docs/web.instructions.md)

Files:

  • wled00/data/settings_wifi.htm
Source excerpt: **Tab indentation** for HTML, JS, and CSS Source excerpt: camelCase for JS functions/variables Source excerpt: Reuse helpers from `common.js` — do not duplicate utilities

CodeRabbit inference engine (AGENTS.md)

Files:

  • wled00/data/settings_wifi.htm
Learnings: 2

Learning: 2026-10-21T09:51:25.734Z

Learnt from: CR
Repo: wled/WLED PR: 0
File: docs/web.instructions.md:0-0
Timestamp: 2026-10-21T09:51:25.734Z
Learning: Applies to wled00/data/** : Applicability reference:
AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference
See also: `.github/copilot-instructions.md`, `.github/agent-build.instructions.md`,
`docs/cpp.instructions.md`, `docs/web.instructions.md`, `docs/cicd.instructions.md`,
`docs/hardening.instructions.md`, `docs/securecode.instructions.md`.

Source excerpt:
# Web UI Coding Conventions

## Build Integration

Files in this directory are processed by `tools/cdata.js` into generated headers
(`wled00/html_*.h`, `wled00/js_*.h`).
Run `npm run build` after any change. **Never edit generated headers directly.**

Applied to files:

  • wled00/data/settings_wifi.htm
Learning: 2026-02-19T13:24:19.009Z

Learnt from: softhack007
Repo: wled/WLED PR: 5381
File: wled00/data/update.htm:2-2
Timestamp: 2026-02-19T13:24:19.009Z
Learning: In the WLED repo, do not commit generated embedded header files (e.g., html_*.h, js_iro.h). These are automatically regenerated during the build from wled00/data/. Only commit source web UI files in wled00/data/ with extensions .htm, .html, .css, or .js (e.g., update.htm and other source UI files).

Applied to files:

  • wled00/data/settings_wifi.htm

@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.
@DedeHai
DedeHai merged commit 42eb8bb into wled:main Nov 23, 2026
31 checks passed
DedeHai added a commit that referenced this pull request Nov 23, 2026
* Add RTL8201-based wESP32 rev7 Ethernet option

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.


Co-authored-by: Frank Möhle <[email protected]>
Co-authored-by: Damian Schneider <[email protected]>
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