[PATCH net-next] net: pse-pd: realtek-pse-mcu: add RTL8238C device ID

From: John

Date: Sun Nov 15 2026 - 04:40:15 EST


From: John Audia <therealgraysky@xxxxxxxxx>

Some Ubiquiti USW Pro Max 16 PoE units (boardrevision 3) carry a PSE
MCU that reports device id 0x0238, so probe fails with "unknown PSE id
0x238". poemgr names this id RTL8238C.

The high byte of the id follows the chip revision, as with RTL8239
(0x0039) and RTL8239C (0x0139), so add RTL8238C with the same power
limits and power limit command as the RTL8238B (0x0138). Tested on such
a unit, PoE works on all ports used.

Link: https://github.com/blocktrron/poemgr/blob/17771dd7b3a74a64c14351d1cbf8e61676934cbe/rtl8239.h#L13
Signed-off-by: John Audia <therealgraysky@xxxxxxxxx>
---
drivers/net/pse-pd/realtek-pse-mcu-core.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/drivers/net/pse-pd/realtek-pse-mcu-core.c b/drivers/net/pse-pd/realtek-pse-mcu-core.c
index c70b09ca2012..9ae61184b573 100644
--- a/drivers/net/pse-pd/realtek-pse-mcu-core.c
+++ b/drivers/net/pse-pd/realtek-pse-mcu-core.c
@@ -43,6 +43,7 @@
#include "realtek-pse-mcu.h"

#define RTPSE_MCU_DEVICE_ID_RTL8238B 0x0138
+#define RTPSE_MCU_DEVICE_ID_RTL8238C 0x0238
#define RTPSE_MCU_DEVICE_ID_RTL8239 0x0039
#define RTPSE_MCU_DEVICE_ID_RTL8239C 0x0139
#define RTPSE_MCU_DEVICE_ID_BCM59111 0xe111
@@ -159,6 +160,14 @@ static const struct rtpse_mcu_chip_info rtl8238b_info = {
.pw_set_lsb_mW = 200,
};

+static const struct rtpse_mcu_chip_info rtl8238c_info = {
+ .max_mW_per_port = 30000,
+ .name = "RTL8238C",
+ .pw_read_lsb_mW = 200,
+ .pw_set_cmd = RTPSE_MCU_CMD_PORT_SET_POWER_LIMIT,
+ .pw_set_lsb_mW = 200,
+};
+
static const struct rtpse_mcu_chip_info rtl8239_info = {
.max_mW_per_port = 90000,
.name = "RTL8239",
@@ -746,6 +755,9 @@ static int rtpse_mcu_discover(struct rtpse_mcu_ctrl *pse, struct rtpse_mcu_info
case RTPSE_MCU_DEVICE_ID_RTL8238B:
pse->chip = &rtl8238b_info;
break;
+ case RTPSE_MCU_DEVICE_ID_RTL8238C:
+ pse->chip = &rtl8238c_info;
+ break;
case RTPSE_MCU_DEVICE_ID_RTL8239:
pse->chip = &rtl8239_info;
break;