Skip to content

Commit f710aa1

Browse files
committed
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.
1 parent be264fb commit f710aa1

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

wled00/const.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ static_assert(WLED_MAX_BUSSES <= 32, "WLED_MAX_BUSSES exceeds hard limit");
395395
#define BTN_TYPE_TOUCH_SWITCH 9
396396

397397
//Ethernet board types
398-
#define WLED_NUM_ETH_TYPES 16
398+
#define WLED_NUM_ETH_TYPES 17
399399

400400

401401
#define WLED_ETH_NONE 0
@@ -414,6 +414,7 @@ static_assert(WLED_MAX_BUSSES <= 32, "WLED_MAX_BUSSES exceeds hard limit");
414414
#define WLED_ETH_GLEDOPTO 13
415415
#define WLED_ETH_QUINLED_V4_UNOQUAD 14
416416
#define WLED_ETH_QUINLED_V4_OCTA 15
417+
#define WLED_ETH_WESP32_RTL8201 16
417418

418419

419420
//Hue error codes

wled00/data/settings_wifi.htm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ <h3>Ethernet Type</h3>
242242
<option value="15">QuinLED v4 Octa</option>
243243
<option value="10">Serg74-ETH32</option>
244244
<option value="5">TwilightLord-ESP32</option>
245-
<option value="3">WESP32</option>
245+
<option value="3">WESP32 (Rev ≤6)</option>
246+
<option value="16">WESP32 (Rev 7+)</option>
246247
<option value="1">WT32-ETH01</option>
247248
<option value="13">Gledopto</option>
248249
</select><br><br>

wled00/network.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const ethernet_settings ethernetBoards[] = {
4545
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
4646
},
4747

48-
// WESP32
48+
// WESP32 rev 6 and earlier
4949
{
5050
0, // eth_address,
5151
-1, // eth_power,
@@ -175,6 +175,16 @@ const ethernet_settings ethernetBoards[] = {
175175
ETH_PHY_LAN8720, // eth_type
176176
ETH_CLOCK_GPIO0_IN // eth_clk_mode
177177
},
178+
179+
// WLED_ETH_WESP32_RTL8201 (16) - WESP32 rev 7 and later
180+
{
181+
0, // eth_address
182+
-1, // eth_power
183+
16, // eth_mdc
184+
17, // eth_mdio
185+
ETH_PHY_RTL8201, // eth_type
186+
ETH_CLOCK_GPIO0_IN // eth_clk_mode
187+
},
178188
};
179189

180190
// sanity checks for ethernet config table and WLED_ETH_DEFAULT

0 commit comments

Comments
 (0)