public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: stsp@list•ru (Stas Sergeev)
To: linux-arm-kernel@lists•infradead.org
Subject: mvneta: SGMII fixed-link not so fixed
Date: Mon, 14 Sep 2015 14:06:13 +0300	[thread overview]
Message-ID: <55F6AA25.2070603@list.ru> (raw)
In-Reply-To: <20150914103207.GH21084@n2100.arm.linux.org.uk>

14.09.2015 13:32, Russell King - ARM Linux ?????:
> I've been bringing up the mainline kernel on a new board, which has
> an Marvell SoC with a mvneta interface connected to a Marvell DSA
> switch.  The DSA switch is a 88E6176.
>
> In the DT block for the interface, I specify:
>
> 	ethernet at ... {
> 	        phy-mode = "sgmii";
> 		status = "okay";
>
> 		fixed-link {
> 			speed = <1000>;
> 			full-duplex;
> 		};
> 	};
>
> However, this doesn't work without patching mvneta to disable the
> autonegotiation and forcing the link up:
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index 62e48bc0cb23..e1698731e429 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -1010,6 +1010,10 @@ static void mvneta_defaults_set(struct mvneta_port *pp)
>   		val |= MVNETA_GMAC_INBAND_AN_ENABLE |
>   		       MVNETA_GMAC_AN_SPEED_EN |
>   		       MVNETA_GMAC_AN_DUPLEX_EN;
> +		/* We appear to need the interface forced for DSA switches */
> +		val &= ~(MVNETA_GMAC_AN_DUPLEX_EN |
> +			 MVNETA_GMAC_AN_SPEED_EN);
> +		val |= MVNETA_GMAC_FORCE_LINK_PASS;
>   		mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
>   		val = mvreg_read(pp, MVNETA_GMAC_CLOCK_DIVIDER);
>   		val |= MVNETA_GMAC_1MS_CLOCK_ENABLE;
Hello Russell, just to make sure, aren't you missing this by any chance:
https://lkml.org/lkml/2015/7/20/710

  reply	other threads:[~2015-09-14 11:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 10:32 mvneta: SGMII fixed-link not so fixed Russell King - ARM Linux
2015-09-14 11:06 ` Stas Sergeev [this message]
2015-09-14 11:42   ` Russell King - ARM Linux
2015-09-17 22:12     ` David Miller
2015-09-17 23:02       ` Florian Fainelli
2015-09-17 23:26         ` David Miller
2015-09-17 23:14       ` Russell King - ARM Linux
2015-09-17 23:36         ` Florian Fainelli
2015-09-18  8:14           ` Russell King - ARM Linux
2015-09-18 11:29         ` Stas Sergeev
2015-09-18 12:13           ` Russell King - ARM Linux
2015-09-18 12:43             ` Stas Sergeev
2015-09-18 13:12               ` Russell King - ARM Linux
2015-09-18 13:43                 ` Stas Sergeev
2015-09-18 13:57                   ` Russell King - ARM Linux
2015-09-18 14:45                     ` Stas Sergeev
2015-09-18 15:43                       ` Russell King - ARM Linux
2015-09-18 16:04                         ` Stas Sergeev
2015-09-18 17:22                           ` Russell King - ARM Linux
2015-09-18 17:30                             ` Florian Fainelli
2015-09-18 19:38                               ` Stas Sergeev

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=55F6AA25.2070603@list.ru \
    --to=stsp@list$(echo .)ru \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox