All of lore.kernel.org
 help / color / mirror / Atom feed
From: "shenjian (K)" <shenjian15@huawei.com>
To: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>,
	Andrew Lunn <andrew@lun>
Cc: David Miller <davem@davemloft.net>, <netdev@vger.kernel.org>,
	"Zhuangyuzeng (Yisen)" <yisen.zhuang@huawei.com>,
	Salil Mehta <salil.mehta@huawei.com>,
	"lipeng (Y)" <lipeng321@huawei.com>,
	Yunsheng Lin <linyunsheng@huawei.com>,
	Dengweiwei <dengweiwei@huawei.com>
Subject: Question about default m88e1510 LED configuration of marvell phy
Date: Tue, 15 Jan 2019 11:07:17 +0800	[thread overview]
Message-ID: <1a4ecb58-7835-85f9-51b7-88b0cfca7eba@huawei.com> (raw)

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

             reply	other threads:[~2019-01-15  3:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15  3:07 shenjian (K) [this message]
2019-01-15  3:39 ` Question about default m88e1510 LED configuration of marvell phy 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)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a4ecb58-7835-85f9-51b7-88b0cfca7eba@huawei.com \
    --to=shenjian15@huawei.com \
    --cc=andrew@lun \
    --cc=davem@davemloft.net \
    --cc=dengweiwei@huawei.com \
    --cc=dongsheng.wang@hxt-semitech.com \
    --cc=linyunsheng@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.