All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about default m88e1510 LED configuration of marvell phy
@ 2019-01-15  3:07 shenjian (K)
  2019-01-15  3:39 ` Andrew Lunn
  0 siblings, 1 reply; 9+ messages in thread
From: shenjian (K) @ 2019-01-15  3:07 UTC (permalink / raw)
  To: Wang Dongsheng, Andrew Lunn
  Cc: David Miller, netdev, Zhuangyuzeng (Yisen),
	Salil Mehta, lipeng (Y),
	Yunsheng Lin, Dengweiwei

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-01-17 14:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15  3:07 Question about default m88e1510 LED configuration of marvell phy shenjian (K)
2019-01-15  3:39 ` Andrew Lunn
2019-01-15  6:41   ` shenjian (K)
2019-01-15  9:08     ` Wang, Dongsheng
2019-01-17  3:06       ` shenjian (K)
2019-01-16 16:04     ` Andrew Lunn
2019-01-17  2:58       ` shenjian (K)
2019-01-17 12:41         ` Andrew Lunn
2019-01-17 14:57           ` shenjian (K)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.