[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a4ecb58-7835-85f9-51b7-88b0cfca7eba@huawei.com>
Date: Tue, 15 Jan 2019 11:07:17 +0800
From: "shenjian (K)" <shenjian15@...wei.com>
To: Wang Dongsheng <dongsheng.wang@...-semitech.com>,
Andrew Lunn <andrew@lun>
CC: David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
"Zhuangyuzeng (Yisen)" <yisen.zhuang@...wei.com>,
Salil Mehta <salil.mehta@...wei.com>,
"lipeng (Y)" <lipeng321@...wei.com>,
Yunsheng Lin <linyunsheng@...wei.com>,
Dengweiwei <dengweiwei@...wei.com>
Subject: Question about default m88e1510 LED configuration of marvell phy
Hi, all
We encounted a problem when using the marvel 88e151x phy driver, the
link(LED[0])/ack(LED[1]) leds worked abnormally since we updated our kernel to v4.19.
The act led kept on and never blink. It works well when we use genphy driver, aslo
works well when use marvell phy in kernel v4.18.
I found that the default led configuration had been changed to 0x1177
by commit commit 077772468ec1(net: phy: marvell: change default m88e1510 LED configuration).
+static void marvell_config_led(struct phy_device *phydev)
+{
+ u16 def_config;
+ int err;
+
+ switch (MARVELL_PHY_FAMILY_ID(phydev->phy_id)) {
+ /* Default PHY LED config: LED[0] .. Link, LED[1] .. Activity */
+ case MARVELL_PHY_FAMILY_ID(MARVELL_PHY_ID_88E1121R):
+ case MARVELL_PHY_FAMILY_ID(MARVELL_PHY_ID_88E1318S):
+ def_config = MII_88E1121_PHY_LED_DEF;
+ break;
+ /* Default PHY LED config:
+ * LED[0] .. 1000Mbps Link
+ * LED[1] .. 100Mbps Link
+ * LED[2] .. Blink, Activity
+ */
+ case MARVELL_PHY_FAMILY_ID(MARVELL_PHY_ID_88E1510):
+ def_config = MII_88E1510_PHY_LED_DEF;
+ break;
+ default:
+ return;
+ }
+
+ err = phy_write_paged(phydev, MII_MARVELL_LED_PAGE, MII_PHY_LED_CTRL,
+ def_config);
+ if (err < 0)
+ pr_warn("Fail to config marvell phy LED.\n");
+}
+
For the led configuration is very flexible for m88e1510, people may use
different function for each led, I think it's quite reasonable to change its default
configuration when phy init.
If there are any better info or suggestion regarding this problem, it would be very
helpful, thanks in advance.
reference:
[1] https://patchwork.ozlabs.org/patch/937682/
[2] https://lore.kernel.org/patchwork/patch/687718/
[3] http://lkml.iu.edu/hypermail/linux/kernel/1606.1/03283.html
[4] https://web.pa.msu.edu/hep/atlas/l1calo/htm/hardware/components/Enet_Phy/marvell_alaska_phy_88e151x_datasheet_jan18.pdf
Powered by blists - more mailing lists