All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: "Andreas Färber" <afaerber@suse.de>
Cc: "Gregory CLEMENT" <gregory.clement@bootlin.com>,
	arm@kernel.org, "Andrew Lunn" <andrew@lunn.ch>,
	"Uwe Kleine-König" <uwe@kleine-koenig.org>,
	"Jason Cooper" <jason@lakedaemon.net>,
	"Rob Herring" <robh+dt@kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH mvebu-dt v2 4/6] ARM: dts: turris-omnia: add SFP node
Date: Sat, 14 Nov 2020 23:57:54 +0100	[thread overview]
Message-ID: <20201114235754.16c5e4c0@kernel.org> (raw)
In-Reply-To: <972cde9c-9e4a-0e43-c9c3-9528581d8738@suse.de>

On Sat, 14 Nov 2020 22:36:09 +0100
Andreas Färber <afaerber@suse.de> wrote:

> Hi Marek,
> 
> On 14.11.20 19:32, Marek Behún wrote:
> > Turris Omnia has a SFP cage that, together with WAN PHY is connected to  
> 
> "an SFP"
> Comma missing after PHY (or drop before together).
> 
> > eth2 SerDes via a SerDes multiplexor. Describe the SFP cage, but leave
> > it disabled. Until phylink has support for such multiplexor we will
> > leave it to U-Boot to enable SFP and disable WAN PHY at boot time
> > depending on whether a SFP module is present.  
> 
> multiplexor vs. multiplexer may be a British thing? Thunderbird
> underlines it fwiw.
> 
> > 
> > Signed-off-by: Marek Behún <kabel@kernel.org>
> > Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
> > Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> > Cc: Uwe Kleine-König <uwe@kleine-koenig.org>
> > Cc: Jason Cooper <jason@lakedaemon.net>
> > Cc: Gregory CLEMENT <gregory.clement@bootlin.com>
> > Cc: Andreas Färber <afaerber@suse.de>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: devicetree@vger.kernel.org
> > ---
> >  arch/arm/boot/dts/armada-385-turris-omnia.dts | 19 ++++++++++++++++++-
> >  1 file changed, 18 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> > index 7ccebf7d1757..14c21cddef72 100644
> > --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts
> > +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> > @@ -82,6 +82,22 @@ pcie@3,0 {
> >  			};
> >  		};
> >  	};
> > +
> > +	sfp: sfp {
> > +		compatible = "sff,sfp";
> > +		i2c-bus = <&sfp_i2c>;
> > +		tx-fault-gpios = <&pcawan 0 GPIO_ACTIVE_HIGH>;
> > +		tx-disable-gpios = <&pcawan 1 GPIO_ACTIVE_HIGH>;
> > +		rate-select0-gpios = <&pcawan 2 GPIO_ACTIVE_HIGH>;
> > +		los-gpios = <&pcawan 3 GPIO_ACTIVE_HIGH>;
> > +		mod-def0-gpios = <&pcawan 4 GPIO_ACTIVE_LOW>;
> > +
> > +		/*
> > +		 * For now this has to be enabled at boot time by U-Boot when
> > +		 * a SFP module is present.
> > +		 */
> > +		status = "disabled";
> > +	};
> >  };
> >  
> >  &bm {
> > @@ -130,6 +146,7 @@ &eth2 {
> >  	phy-mode = "sgmii";
> >  	phy = <&phy1>;
> >  	phys = <&comphy5 2>;
> > +	sfp = <&sfp>;
> >  	buffer-manager = <&bm>;
> >  	bm,pool-long = <2>;
> >  	bm,pool-short = <3>;
> > @@ -195,7 +212,7 @@ i2c@3 {
> >  			/* routed to PCIe2 connector (CN62A) */
> >  		};
> >  
> > -		i2c@4 {
> > +		sfp_i2c: i2c@4 {
> >  			#address-cells = <1>;
> >  			#size-cells = <0>;
> >  			reg = <4>;  
> 
> Matches what I've come up with,
> 
> Reviewed-by: Andreas Färber <afaerber@suse.de>
> 
> However, I also needed to set managed = "in-band-status" when enabling
> SFP node and removing phy property. Shall we prepare it with its default
> value of "auto" and add a comment? (unlike disabled -> okay,
> in-band-status is longer than auto, so not sure whether it helps U-Boot,
> but it may help humans.

The idea is that for now when U-Boot detects that SFP is present, it
shall change the device tree accordingly:
  remove phy-handle
  add managed = in-band-status
  enable sfp node

This is the only way to support this reasobaly until the multiplexer is
somehow supported by kernel.

Marek

  parent reply	other threads:[~2020-11-14 22:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 18:32 [PATCH mvebu-dt v2 0/6] Turris Omnia device-tree changes Marek Behún
2020-11-14 18:32 ` [PATCH mvebu-dt v2 1/6] ARM: dts: turris-omnia: enable HW buffer management Marek Behún
2020-11-14 18:32 ` [PATCH mvebu-dt v2 2/6] ARM: dts: turris-omnia: add comphy handle to eth2 Marek Behún
2020-11-14 21:25   ` Andreas Färber
2020-11-14 18:32 ` [PATCH mvebu-dt v2 3/6] ARM: dts: turris-omnia: describe switch interrupt Marek Behún
2020-11-14 18:32 ` [PATCH mvebu-dt v2 4/6] ARM: dts: turris-omnia: add SFP node Marek Behún
2020-11-14 21:36   ` Andreas Färber
2020-11-14 21:42     ` Russell King - ARM Linux admin
2020-11-14 21:46       ` Andreas Färber
2020-11-14 22:55       ` Marek Behún
2020-11-15 11:28         ` Russell King - ARM Linux admin
2020-11-14 22:57     ` Marek Behún [this message]
2020-11-14 23:16       ` Andreas Färber
2020-11-15  0:32         ` Marek Behún
2020-11-15  0:38         ` Marek Behún
2020-11-14 23:27     ` Andreas Färber
2020-11-15  0:11       ` Marek Behún
2020-11-14 18:32 ` [PATCH mvebu-dt v2 5/6] ARM: dts: turris-omnia: add LED controller node Marek Behún
2020-11-14 21:58   ` Andreas Färber
2020-11-14 23:23     ` Marek Behún
2020-11-14 18:32 ` [PATCH mvebu-dt v2 6/6] ARM: dts: turris-omnia: update ethernet-phy node and handle name Marek Behún
2020-11-14 22:04   ` Andreas Färber
2020-11-14 23:30     ` Marek Behún

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=20201114235754.16c5e4c0@kernel.org \
    --to=kabel@kernel.org \
    --cc=afaerber@suse.de \
    --cc=andrew@lunn.ch \
    --cc=arm@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=jason@lakedaemon.net \
    --cc=robh+dt@kernel.org \
    --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 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.