--- a/src/r8125_n.c
+++ b/src/r8125_n.c
@@ -44,6 +44,7 @@
 #include <linux/etherdevice.h>
 #include <linux/delay.h>
 #include <linux/mii.h>
+#include <linux/of.h>
 #include <linux/if_vlan.h>
 #include <linux/crc32.h>
 #include <linux/interrupt.h>
@@ -14755,6 +14756,25 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri
                 tp->imr_reg[i] = (u16)(IMR1_8125 + (i - 1) * 4);
 }
 
+static int
+rtl8125_led_configuration(struct rtl8125_private *tp)
+{
+        const int led_regs[] = { 0x18, 0x86, 0x84, 0x96 }; /* LEDSEL 0-3 */
+        u32 led_data[4];
+        int ret, i;
+
+        ret = of_property_read_u32_array(tp->pci_dev->dev.of_node,
+                                  "realtek,led-data", led_data, 4);
+
+        if (ret)
+                return ret;
+
+        for (i = 0; i < 4; i++)
+                RTL_W16(tp, led_regs[i], led_data[i]);
+
+        return 0;
+}
+
 static void
 rtl8125_init_software_variable(struct net_device *dev)
 {
@@ -15358,6 +15378,8 @@ rtl8125_init_software_variable(struct ne
         else if (tp->InitRxDescType == RX_DESC_RING_TYPE_4)
                 tp->rtl8125_rx_config &= ~EnableRxDescV4_1;
 
+        rtl8125_led_configuration(tp);
+
         tp->NicCustLedValue = RTL_R16(tp, CustomLED);
 
         tp->wol_opts = rtl8125_get_hw_wol(tp);