summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0044-net-phy-realtek-Change-LED-configuration.patch
blob: b70d3be50cc082a314e62390cada42f17e40a97b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 06039a941d59f265385c5b4a19231fbd55a05b26 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Fri, 5 Jun 2020 15:14:50 -0700
Subject: [PATCH] net: phy: realtek: Change LED configuration

This commit changes Realtek NIC port LED configuration like below:
LED0 (Right Green): Link 10/100/1000
LED1 (Left Orange): Link 10/100 + Blink on Tx/Rx
LED2 (Left Green): Link 1000 + Blink on Tx/Rx

Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
 drivers/net/phy/realtek.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 7a99cb023401..c15280259c35 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -92,10 +92,15 @@ static int rtl8211f_config(struct phy_device *phydev)
 			  MIIM_RTL8211F_PAGE_SELECT, 0x0);
 	}
 
-	/* Set green LED for Link, yellow LED for Active */
+	/*
+	 * Set LED configuration
+	 * LED0 (Right Grean): Link 10/100/1000
+	 * LED1 (Left Orange): Link 10/100 + Active
+	 * LED2 (Left Green): Link 1000 + Active
+	 */
 	phy_write(phydev, MDIO_DEVAD_NONE,
 		  MIIM_RTL8211F_PAGE_SELECT, 0xd04);
-	phy_write(phydev, MDIO_DEVAD_NONE, 0x10, 0x617f);
+	phy_write(phydev, MDIO_DEVAD_NONE, 0x10, 0x626b);
 	phy_write(phydev, MDIO_DEVAD_NONE,
 		  MIIM_RTL8211F_PAGE_SELECT, 0x0);
 
-- 
2.7.4