netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Klaus Kudielka <klaus.kudielka@gmail.com>
Cc: netdev@vger.kernel.org, "Florian Fainelli" <f.fainelli@gmail.com>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Uwe Kleine-König" <uwe@kleine-koenig.org>,
	"Tomas Hlavacek" <tmshlvck@gmail.com>
Subject: Re: [RFC] phylink: support for devices with MAC sharing SFP cage & PHY (e.g. Turris Omnia)
Date: Sun, 30 Dec 2018 10:51:05 +0100	[thread overview]
Message-ID: <20181230095105.GA24825@lunn.ch> (raw)
In-Reply-To: <97244846-c507-113b-3353-dddc6a50d72b@gmail.com>

On Sun, Dec 30, 2018 at 09:25:53AM +0100, Klaus Kudielka wrote:
> Hello,

Hi Klaus

Thanks for reposting on the correct list.

> Apart from the 88E1514 PHY specified for eth2, the device also
> features an SFP cage, which uses the same SGMII of the Armada
> 385 SoC (a 2:1 multiplexer is driven by the MOD_DEF0 signal).

Some of the Marvell Ethernet switches have a similar setup. Some ports
have both an internal PHY and a SERDES port which can be connected to
an SFP cage. Whichever gets link first is connected to the MAC.  I can
also imagine a slightly different setup to what you have, the MUX is
controlled via a GPIO, not MOD_DEF0, so again, you want both active
until one gets link, although SFP LOS is not very reliable for this.

So we need a generic solution to this. In your case, the PHY should be
configured down when the SFP is present, but then made active when the
SFP is unplugged. For the Marvell switch, we need both SFP and PHY
active until one gets a link, and then the other configured down. So
it sounds like we need some board specific code involved to implement
the board specific parts.

    Andrew

  reply	other threads:[~2018-12-30  9:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-30  8:25 [RFC] phylink: support for devices with MAC sharing SFP cage & PHY (e.g. Turris Omnia) Klaus Kudielka
2018-12-30  9:51 ` Andrew Lunn [this message]
2018-12-30 22:35   ` Florian Fainelli
2018-12-30 22:41     ` Andrew Lunn
2019-01-04  9:45     ` Russell King - ARM Linux
2018-12-31 11:24   ` Klaus Kudielka
2018-12-31 17:43     ` Andrew Lunn
2019-01-04  6:26       ` Klaus Kudielka

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=20181230095105.GA24825@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=klaus.kudielka@gmail.com \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=tmshlvck@gmail.com \
    --cc=uwe@kleine-koenig.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).