From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DB3EC5519F for ; Sat, 14 Nov 2020 22:58:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2732424137 for ; Sat, 14 Nov 2020 22:58:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="R7Av2/EN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726189AbgKNW6A (ORCPT ); Sat, 14 Nov 2020 17:58:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:54808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726136AbgKNW6A (ORCPT ); Sat, 14 Nov 2020 17:58:00 -0500 Received: from localhost (otava-0257.koleje.cuni.cz [78.128.181.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B4A724073; Sat, 14 Nov 2020 22:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605394680; bh=s1+jgYcGpXgQHNclRjhT9nHnYx+mAXzhmsUvckGchVg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=R7Av2/EN+aph2a5KuND1jVhDOql89A+SIrZ6fFy3swqSGQzrd70yKd41Kn6RddSjR DSEQkXY1vDcB/1wRUchd0AzIR9PzA2vTE8n+oAZ8k4/i+i2cyW9g9l8bcyrkI2Ytq6 JKtsKG56/ctQGnGFQgRMNEvl7W50IhTEBdvlYZgU= Date: Sat, 14 Nov 2020 23:57:54 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Andreas =?UTF-8?B?RsOkcmJlcg==?= Cc: Gregory CLEMENT , arm@kernel.org, Andrew Lunn , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Jason Cooper , Rob Herring , devicetree@vger.kernel.org Subject: Re: [PATCH mvebu-dt v2 4/6] ARM: dts: turris-omnia: add SFP node Message-ID: <20201114235754.16c5e4c0@kernel.org> In-Reply-To: <972cde9c-9e4a-0e43-c9c3-9528581d8738@suse.de> References: <20201114183217.1352-1-kabel@kernel.org> <20201114183217.1352-5-kabel@kernel.org> <972cde9c-9e4a-0e43-c9c3-9528581d8738@suse.de> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Sat, 14 Nov 2020 22:36:09 +0100 Andreas F=C3=A4rber wrote: > Hi Marek, >=20 > On 14.11.20 19:32, Marek Beh=C3=BAn wrote: > > Turris Omnia has a SFP cage that, together with WAN PHY is connected to= =20 >=20 > "an SFP" > Comma missing after PHY (or drop before together). >=20 > > 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. =20 >=20 > multiplexor vs. multiplexer may be a British thing? Thunderbird > underlines it fwiw. >=20 > >=20 > > Signed-off-by: Marek Beh=C3=BAn > > Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") > > Reviewed-by: Andrew Lunn > > Cc: Uwe Kleine-K=C3=B6nig > > Cc: Jason Cooper > > Cc: Gregory CLEMENT > > Cc: Andreas F=C3=A4rber > > Cc: Rob Herring > > Cc: devicetree@vger.kernel.org > > --- > > arch/arm/boot/dts/armada-385-turris-omnia.dts | 19 ++++++++++++++++++- > > 1 file changed, 18 insertions(+), 1 deletion(-) > >=20 > > diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts b/arch/arm/b= oot/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 =3D "sff,sfp"; > > + i2c-bus =3D <&sfp_i2c>; > > + tx-fault-gpios =3D <&pcawan 0 GPIO_ACTIVE_HIGH>; > > + tx-disable-gpios =3D <&pcawan 1 GPIO_ACTIVE_HIGH>; > > + rate-select0-gpios =3D <&pcawan 2 GPIO_ACTIVE_HIGH>; > > + los-gpios =3D <&pcawan 3 GPIO_ACTIVE_HIGH>; > > + mod-def0-gpios =3D <&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 =3D "disabled"; > > + }; > > }; > > =20 > > &bm { > > @@ -130,6 +146,7 @@ ð2 { > > phy-mode =3D "sgmii"; > > phy =3D <&phy1>; > > phys =3D <&comphy5 2>; > > + sfp =3D <&sfp>; > > buffer-manager =3D <&bm>; > > bm,pool-long =3D <2>; > > bm,pool-short =3D <3>; > > @@ -195,7 +212,7 @@ i2c@3 { > > /* routed to PCIe2 connector (CN62A) */ > > }; > > =20 > > - i2c@4 { > > + sfp_i2c: i2c@4 { > > #address-cells =3D <1>; > > #size-cells =3D <0>; > > reg =3D <4>; =20 >=20 > Matches what I've come up with, >=20 > Reviewed-by: Andreas F=C3=A4rber >=20 > However, I also needed to set managed =3D "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 =3D in-band-status enable sfp node This is the only way to support this reasobaly until the multiplexer is somehow supported by kernel. Marek