wESP32 revision 7 ETH_PHY_RTL8201 support

From revision 7 onwards, the wESP32 boards are now using ethernet PHY type RTL8201 instead of LAN8720. Support for RTL8201 was added to espressif/arduino-esp32 after the fork used by WLED. Is anyone running WLED using ethernet on a newer wESP32? If so, what was your approach? Thx.

I was able to compile WLED after updating references to espressif32 to 5.1.1 and arduino-esp32 to 2.0.2 which allowed me to make the necessary updates for RTL8201. Successfully flashed the board. We’ll see how stable it is. I plan to use DDP to control 4 other controllers for a total of 36 outputs (9/controller). I wanted all this traffic isolated on it’s own switch and not on wifi.

Hey can you share what your changes were? I have a wESP32 with the RTL8201.

I would suggest confirming your board/ethernet are working before flashing if you haven’t used the board yet. Simple to do by confirming it gets an IP assuming you have a POE switch. Also, assume you have the wESP32-Prog module that plugs into J2. I would also suggest soldering a 6 pin DIP to J2. The DIP is useful for removing the prog module when not needed and tying into common ground. Don’t forget the 5V/12V jumper if you’re planning to power directly from the GPIO header.

The following edits should get you up and running, but they need to be refactored to add a separate wESP32 option for RTL8201 so both boards are supported. This is quick and dirty for now editing the existing wESP32 config so it can be selected in the UI. Also, rev7 onward now has 16 MB of flash instead of 4 MB so a different board_build partitions file should be used but haven’t changed that yet either. This should probably be in platform_override.ini as well. This is all very hackish at the moment.

platform.ini under the [esp32] section:
platform = espressif32@5.1.1
platform_packages = framework-arduinoespressif32 @ GitHub - Aircoookie/arduino-esp32: Arduino core for the ESP32
comment out #-D LOROL_LITTLEFS under build_flags
comment out #GitHub - lorol/LITTLEFS: LittleFS library for arduino-esp32 under lib_deps

platform.ini under the [env:esp32_eth] section add line:
board_build.f_cpu = 240000000L

network.cpp change ETH_PHY_LAN8720 to ETH_PHY_RTL8201 under // WESP32:
ETH_PHY_RTL8201, // eth_type,