* [PATCH 0/2] SolidRun Clearfog SFP support @ 2018-02-27 16:01 Russell King - ARM Linux 2018-02-27 16:01 ` [PATCH 1/2] ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz Russell King 2018-02-27 16:02 ` [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support Russell King 0 siblings, 2 replies; 13+ messages in thread From: Russell King - ARM Linux @ 2018-02-27 16:01 UTC (permalink / raw) To: Andrew Lunn, Gregory Clement, Jason Cooper Cc: Mark Rutland, devicetree, Rob Herring, linux-arm-kernel, Sebastian Hesselbarth Now that mvneta supports SFP, we can add the necessary DT changes to Clearfog to support the SFP cages. This series consists of two patches: 1. Increase the I2C bus speed with the GPIO expander to 400kHz, as there are bus timing issues that this works around - and as we poll the expander, we need the bus to be reliable. 2. Add the SFP entry to the clearfog DTS. This includes the maximum power level specification, which is not yet reviewed or merged but has been sent via netdev for net-next. I'll follow up when the binding has been acked by Rob. arch/arm/boot/dts/armada-388-clearfog.dtsi | 52 ++++++++---------------------- 1 file changed, 14 insertions(+), 38 deletions(-) -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/2] ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz 2018-02-27 16:01 [PATCH 0/2] SolidRun Clearfog SFP support Russell King - ARM Linux @ 2018-02-27 16:01 ` Russell King 2018-03-05 15:48 ` Gregory CLEMENT 2018-02-27 16:02 ` [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support Russell King 1 sibling, 1 reply; 13+ messages in thread From: Russell King @ 2018-02-27 16:01 UTC (permalink / raw) To: Andrew Lunn, Gregory Clement, Jason Cooper Cc: Mark Rutland, devicetree, Rob Herring, linux-arm-kernel, Sebastian Hesselbarth All the devices on I2C0 support fast mode, so increase the bus speed to match. The Armada 388 is known to have a timing issue when in standard mode, which we believe causes the ficticious device at 0x64 to appear. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> --- arch/arm/boot/dts/armada-388-clearfog.dtsi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/armada-388-clearfog.dtsi b/arch/arm/boot/dts/armada-388-clearfog.dtsi index 68acfc968706..0e3b1f140e6d 100644 --- a/arch/arm/boot/dts/armada-388-clearfog.dtsi +++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi @@ -143,8 +143,7 @@ }; &i2c0 { - /* Is there anything on this? */ - clock-frequency = <100000>; + clock-frequency = <400000>; pinctrl-0 = <&i2c0_pins>; pinctrl-names = "default"; status = "okay"; @@ -239,13 +238,11 @@ }; }; - /* The MCP3021 is 100kHz clock only */ + /* The MCP3021 supports standard and fast modes */ mikrobus_adc: mcp3021@4c { compatible = "microchip,mcp3021"; reg = <0x4c>; }; - - /* Also something at 0x64 */ }; &i2c1 { -- 2.7.4 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz 2018-02-27 16:01 ` [PATCH 1/2] ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz Russell King @ 2018-03-05 15:48 ` Gregory CLEMENT 2018-03-05 16:09 ` Russell King - ARM Linux 0 siblings, 1 reply; 13+ messages in thread From: Gregory CLEMENT @ 2018-03-05 15:48 UTC (permalink / raw) To: Russell King Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth Hi Russell, On mar., févr. 27 2018, Russell King <rmk+kernel@armlinux.org.uk> wrote: > All the devices on I2C0 support fast mode, so increase the bus speed > to match. I agree with this part. I didn't pay attention to it in the initial submission but now I've checked it, and indeed according to the datasheet the MCP3021 support "standard (100 kHz) and Fast (400 kHz) I2C Compatible modes" > The Armada 388 is known to have a timing issue when in > standard mode, which we believe causes the ficticious device at 0x64 > to appear. This errata "FE-8471889 I2C Repeated Start is not supported in standard mode (up to 100K)" was supposed to be fixed with the commit c1d15b68aab8 ("i2c: mv64xxx: Fix timing issue on Armada XP (errata FE-8471889)"). And it was used on the Armada 38x SoCs since fbffee74986c ("ARM: dts: Fix I2C repeated start issue on Armada-38x") in 4.14. So I think that now even at 100kHz the ficticious device should not appear any more. If it is still the case then there might be an issue with the fix in the 2c driver. Gregory > > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> > --- > arch/arm/boot/dts/armada-388-clearfog.dtsi | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/boot/dts/armada-388-clearfog.dtsi b/arch/arm/boot/dts/armada-388-clearfog.dtsi > index 68acfc968706..0e3b1f140e6d 100644 > --- a/arch/arm/boot/dts/armada-388-clearfog.dtsi > +++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi > @@ -143,8 +143,7 @@ > }; > > &i2c0 { > - /* Is there anything on this? */ > - clock-frequency = <100000>; > + clock-frequency = <400000>; > pinctrl-0 = <&i2c0_pins>; > pinctrl-names = "default"; > status = "okay"; > @@ -239,13 +238,11 @@ > }; > }; > > - /* The MCP3021 is 100kHz clock only */ > + /* The MCP3021 supports standard and fast modes */ > mikrobus_adc: mcp3021@4c { > compatible = "microchip,mcp3021"; > reg = <0x4c>; > }; > - > - /* Also something at 0x64 */ > }; > > &i2c1 { > -- > 2.7.4 > -- Gregory Clement, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz 2018-03-05 15:48 ` Gregory CLEMENT @ 2018-03-05 16:09 ` Russell King - ARM Linux 2018-03-05 16:22 ` Gregory CLEMENT 0 siblings, 1 reply; 13+ messages in thread From: Russell King - ARM Linux @ 2018-03-05 16:09 UTC (permalink / raw) To: Gregory CLEMENT Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth On Mon, Mar 05, 2018 at 04:48:54PM +0100, Gregory CLEMENT wrote: > Hi Russell, > > On mar., févr. 27 2018, Russell King <rmk+kernel@armlinux.org.uk> wrote: > > > All the devices on I2C0 support fast mode, so increase the bus speed > > to match. > > I agree with this part. I didn't pay attention to it in the initial > submission but now I've checked it, and indeed according to the > datasheet the MCP3021 support "standard (100 kHz) and Fast (400 kHz) I2C > Compatible modes" > > > The Armada 388 is known to have a timing issue when in > > standard mode, which we believe causes the ficticious device at 0x64 > > to appear. > > This errata "FE-8471889 I2C Repeated Start is not supported in standard > mode (up to 100K)" was supposed to be fixed with the commit c1d15b68aab8 > ("i2c: mv64xxx: Fix timing issue on Armada XP (errata FE-8471889)"). And > it was used on the Armada 38x SoCs since fbffee74986c ("ARM: dts: Fix I2C > repeated start issue on Armada-38x") in 4.14. The commit pre-dates 4.14, and the commit message was correct at the time it was committed (Nov 29 2016). I don't know whether its still the case that the ficticious device still appears, but increasing the bus speed is still a sensible thing to do if the devices all support it. > So I think that now even at 100kHz the ficticious device should not > appear any more. If it is still the case then there might be an issue > with the fix in the 2c driver. > > Gregory > > > > > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> > > --- > > arch/arm/boot/dts/armada-388-clearfog.dtsi | 7 ++----- > > 1 file changed, 2 insertions(+), 5 deletions(-) > > > > diff --git a/arch/arm/boot/dts/armada-388-clearfog.dtsi b/arch/arm/boot/dts/armada-388-clearfog.dtsi > > index 68acfc968706..0e3b1f140e6d 100644 > > --- a/arch/arm/boot/dts/armada-388-clearfog.dtsi > > +++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi > > @@ -143,8 +143,7 @@ > > }; > > > > &i2c0 { > > - /* Is there anything on this? */ > > - clock-frequency = <100000>; > > + clock-frequency = <400000>; > > pinctrl-0 = <&i2c0_pins>; > > pinctrl-names = "default"; > > status = "okay"; > > @@ -239,13 +238,11 @@ > > }; > > }; > > > > - /* The MCP3021 is 100kHz clock only */ > > + /* The MCP3021 supports standard and fast modes */ > > mikrobus_adc: mcp3021@4c { > > compatible = "microchip,mcp3021"; > > reg = <0x4c>; > > }; > > - > > - /* Also something at 0x64 */ > > }; > > > > &i2c1 { > > -- > > 2.7.4 > > > > -- > Gregory Clement, Bootlin (formerly Free Electrons) > Embedded Linux and Kernel engineering > http://bootlin.com -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz 2018-03-05 16:09 ` Russell King - ARM Linux @ 2018-03-05 16:22 ` Gregory CLEMENT 0 siblings, 0 replies; 13+ messages in thread From: Gregory CLEMENT @ 2018-03-05 16:22 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth Hi Russell King, On lun., mars 05 2018, Russell King - ARM Linux <linux@armlinux.org.uk> wrote: > On Mon, Mar 05, 2018 at 04:48:54PM +0100, Gregory CLEMENT wrote: >> Hi Russell, >> >> On mar., févr. 27 2018, Russell King <rmk+kernel@armlinux.org.uk> wrote: >> >> > All the devices on I2C0 support fast mode, so increase the bus speed >> > to match. >> >> I agree with this part. I didn't pay attention to it in the initial >> submission but now I've checked it, and indeed according to the >> datasheet the MCP3021 support "standard (100 kHz) and Fast (400 kHz) I2C >> Compatible modes" >> >> > The Armada 388 is known to have a timing issue when in >> > standard mode, which we believe causes the ficticious device at 0x64 >> > to appear. >> >> This errata "FE-8471889 I2C Repeated Start is not supported in standard >> mode (up to 100K)" was supposed to be fixed with the commit c1d15b68aab8 >> ("i2c: mv64xxx: Fix timing issue on Armada XP (errata FE-8471889)"). And >> it was used on the Armada 38x SoCs since fbffee74986c ("ARM: dts: Fix I2C >> repeated start issue on Armada-38x") in 4.14. > > The commit pre-dates 4.14, and the commit message was correct at the time > it was committed (Nov 29 2016). I don't know whether its still the case > that the ficticious device still appears, but increasing the bus speed is > still a sensible thing to do if the devices all support it. I agree to apply it. I was concerned by the fact that the i2c fix might not work. I've just tested it and by using the "marvell,mv78230-a0-i2c" there was no more ficticious device at 100KHz, so I am happy with it. In order to make know that now the Standard mode is working on Armada 38x, I will just add a the following comment to your commit log: [gregory.clement@bootlin.com: Note that since the commit fbffee74986c ("ARM: dts: Fix I2C repeated start issue on Armada-38x") in 4.14, the timing issue is managed for the Armada 38x SoCs.] Thanks, Gregory > >> So I think that now even at 100kHz the ficticious device should not >> appear any more. If it is still the case then there might be an issue >> with the fix in the 2c driver. >> >> Gregory >> >> > >> > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> >> > --- >> > arch/arm/boot/dts/armada-388-clearfog.dtsi | 7 ++----- >> > 1 file changed, 2 insertions(+), 5 deletions(-) >> > >> > diff --git a/arch/arm/boot/dts/armada-388-clearfog.dtsi b/arch/arm/boot/dts/armada-388-clearfog.dtsi >> > index 68acfc968706..0e3b1f140e6d 100644 >> > --- a/arch/arm/boot/dts/armada-388-clearfog.dtsi >> > +++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi >> > @@ -143,8 +143,7 @@ >> > }; >> > >> > &i2c0 { >> > - /* Is there anything on this? */ >> > - clock-frequency = <100000>; >> > + clock-frequency = <400000>; >> > pinctrl-0 = <&i2c0_pins>; >> > pinctrl-names = "default"; >> > status = "okay"; >> > @@ -239,13 +238,11 @@ >> > }; >> > }; >> > >> > - /* The MCP3021 is 100kHz clock only */ >> > + /* The MCP3021 supports standard and fast modes */ >> > mikrobus_adc: mcp3021@4c { >> > compatible = "microchip,mcp3021"; >> > reg = <0x4c>; >> > }; >> > - >> > - /* Also something at 0x64 */ >> > }; >> > >> > &i2c1 { >> > -- >> > 2.7.4 >> > >> >> -- >> Gregory Clement, Bootlin (formerly Free Electrons) >> Embedded Linux and Kernel engineering >> http://bootlin.com > > -- > RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up > According to speedtest.net: 8.21Mbps down 510kbps up -- Gregory Clement, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support 2018-02-27 16:01 [PATCH 0/2] SolidRun Clearfog SFP support Russell King - ARM Linux 2018-02-27 16:01 ` [PATCH 1/2] ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz Russell King @ 2018-02-27 16:02 ` Russell King 2018-03-02 21:56 ` Andrew Lunn ` (2 more replies) 1 sibling, 3 replies; 13+ messages in thread From: Russell King @ 2018-02-27 16:02 UTC (permalink / raw) To: Andrew Lunn, Gregory Clement, Jason Cooper Cc: Mark Rutland, devicetree, Rob Herring, linux-arm-kernel, Sebastian Hesselbarth Add SFP module support for Clearfog using the SFP phylink support. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> --- arch/arm/boot/dts/armada-388-clearfog.dtsi | 45 ++++++++---------------------- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/arch/arm/boot/dts/armada-388-clearfog.dtsi b/arch/arm/boot/dts/armada-388-clearfog.dtsi index 0e3b1f140e6d..a44bf20ab7f8 100644 --- a/arch/arm/boot/dts/armada-388-clearfog.dtsi +++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi @@ -117,6 +117,16 @@ }; }; }; + + sfp: sfp { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>; + maximum-power-milliwatt = <2000>; + }; }; ð1 { @@ -133,13 +143,10 @@ bm,pool-long = <3>; bm,pool-short = <1>; buffer-manager = <&bm>; + managed = "in-band-status"; phy-mode = "sgmii"; + sfp = <&sfp>; status = "okay"; - - fixed-link { - speed = <1000>; - full-duplex; - }; }; &i2c0 { @@ -208,34 +215,6 @@ output-low; line-name = "m.2 devslp"; }; - sfp_los { - /* SFP loss of signal */ - gpio-hog; - gpios = <12 GPIO_ACTIVE_HIGH>; - input; - line-name = "sfp-los"; - }; - sfp_tx_fault { - /* SFP laser fault */ - gpio-hog; - gpios = <13 GPIO_ACTIVE_HIGH>; - input; - line-name = "sfp-tx-fault"; - }; - sfp_tx_disable { - /* SFP transmit disable */ - gpio-hog; - gpios = <14 GPIO_ACTIVE_HIGH>; - output-low; - line-name = "sfp-tx-disable"; - }; - sfp_mod_def0 { - /* SFP module present */ - gpio-hog; - gpios = <15 GPIO_ACTIVE_LOW>; - input; - line-name = "sfp-mod-def0"; - }; }; /* The MCP3021 supports standard and fast modes */ -- 2.7.4 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support 2018-02-27 16:02 ` [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support Russell King @ 2018-03-02 21:56 ` Andrew Lunn 2018-03-02 22:02 ` Russell King - ARM Linux 2018-03-04 12:13 ` Baruch Siach 2018-03-19 21:41 ` Gregory CLEMENT 2 siblings, 1 reply; 13+ messages in thread From: Andrew Lunn @ 2018-03-02 21:56 UTC (permalink / raw) To: Russell King Cc: Mark Rutland, devicetree, Jason Cooper, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth On Tue, Feb 27, 2018 at 04:02:02PM +0000, Russell King wrote: > Add SFP module support for Clearfog using the SFP phylink support. > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Andrew Lunn <andrew@lunn.ch> Using a RoboFiber SFP module, connected to a media converter. Link up/down detected. Andrew ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support 2018-03-02 21:56 ` Andrew Lunn @ 2018-03-02 22:02 ` Russell King - ARM Linux 2018-03-02 22:04 ` Andrew Lunn 0 siblings, 1 reply; 13+ messages in thread From: Russell King - ARM Linux @ 2018-03-02 22:02 UTC (permalink / raw) To: Andrew Lunn Cc: Mark Rutland, devicetree, Jason Cooper, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth On Fri, Mar 02, 2018 at 10:56:14PM +0100, Andrew Lunn wrote: > On Tue, Feb 27, 2018 at 04:02:02PM +0000, Russell King wrote: > > Add SFP module support for Clearfog using the SFP phylink support. > > > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> > > Tested-by: Andrew Lunn <andrew@lunn.ch> > > Using a RoboFiber SFP module, connected to a media converter. Link > up/down detected. ethtool -m should also work. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support 2018-03-02 22:02 ` Russell King - ARM Linux @ 2018-03-02 22:04 ` Andrew Lunn 0 siblings, 0 replies; 13+ messages in thread From: Andrew Lunn @ 2018-03-02 22:04 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Mark Rutland, devicetree, Jason Cooper, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth On Fri, Mar 02, 2018 at 10:02:15PM +0000, Russell King - ARM Linux wrote: > On Fri, Mar 02, 2018 at 10:56:14PM +0100, Andrew Lunn wrote: > > On Tue, Feb 27, 2018 at 04:02:02PM +0000, Russell King wrote: > > > Add SFP module support for Clearfog using the SFP phylink support. > > > > > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> > > > > Tested-by: Andrew Lunn <andrew@lunn.ch> > > > > Using a RoboFiber SFP module, connected to a media converter. Link > > up/down detected. > > ethtool -m should also work. Yes, it does. Sorry, should of said that. root@clearfog:~# ethtool -m eth1 Identifier : 0x03 (SFP) Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID) Connector : 0x07 (LC) Transceiver codes : 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 Transceiver type : Ethernet: 1000BASE-SX Encoding : 0x01 (8B/10B) BR, Nominal : 1300MBd Rate identifier : 0x00 (unspecified) Length (SMF,km) : 0km Length (SMF) : 0m Length (50um) : 550m Length (62.5um) : 270m Length (Copper) : 0m Length (OM3) : 0m Laser wavelength : 850nm Vendor name : OEM Vendor OUI : 20:20:20 Vendor PN : SFP-7000-85 Vendor rev : 11.0 Optical diagnostics support : Yes Laser bias current : 45.512 mA Laser output power : 0.2861 mW / -5.43 dBm Receiver signal average optical power : 0.2749 mW / -5.61 dBm Module temperature : 25.72 degrees C / 78.29 degrees F Module voltage : 3.2856 V ... Andrew ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support 2018-02-27 16:02 ` [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support Russell King 2018-03-02 21:56 ` Andrew Lunn @ 2018-03-04 12:13 ` Baruch Siach 2018-03-04 12:49 ` Russell King - ARM Linux 2018-03-19 21:41 ` Gregory CLEMENT 2 siblings, 1 reply; 13+ messages in thread From: Baruch Siach @ 2018-03-04 12:13 UTC (permalink / raw) To: Russell King Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth Hi Russell, On Tue, Feb 27, 2018 at 04:02:02PM +0000, Russell King wrote: > Add SFP module support for Clearfog using the SFP phylink support. > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Baruch Siach <baruch@tkos.co.il> Tested on Clearfog base with kernel version 4.16-rc3. The SFP module is 1G copper Linktel LX1801CNR. ethtool output: Identifier : 0x03 (SFP) Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID) Connector : 0x00 (unknown or unspecified) Transceiver codes : 0x00 0x00 0x00 0x08 0x00 0x00 0x00 0x00 Transceiver type : Ethernet: 1000BASE-T Encoding : 0x01 (8B/10B) BR, Nominal : 1300MBd Rate identifier : 0x00 (unspecified) Length (SMF,km) : 0km Length (SMF) : 0m Length (50um) : 0m Length (62.5um) : 0m Length (Copper) : 100m Length (OM3) : 0m Laser wavelength : 0nm Vendor name : LINKTEL Vendor OUI : 00:00:00 Vendor PN : LX1801CNR Vendor rev : 1.0 Option values : 0x00 0x10 Option : TX_DISABLE implemented BR margin, max : 0% BR margin, min : 0% Vendor SN : 1172623927 Date code : 170628 Thanks, baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il - ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support 2018-03-04 12:13 ` Baruch Siach @ 2018-03-04 12:49 ` Russell King - ARM Linux 2018-03-04 13:19 ` Baruch Siach 0 siblings, 1 reply; 13+ messages in thread From: Russell King - ARM Linux @ 2018-03-04 12:49 UTC (permalink / raw) To: Baruch Siach Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth On Sun, Mar 04, 2018 at 02:13:24PM +0200, Baruch Siach wrote: > Hi Russell, > > On Tue, Feb 27, 2018 at 04:02:02PM +0000, Russell King wrote: > > Add SFP module support for Clearfog using the SFP phylink support. > > > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> > > Tested-by: Baruch Siach <baruch@tkos.co.il> > > Tested on Clearfog base with kernel version 4.16-rc3. The SFP module is 1G > copper Linktel LX1801CNR. Thanks for testing. Please also send the "ethtool -m eth2 raw on > foo.bin" output as well so I can build a database of module EEPROMs, which allows me to validate the SFP parsing code against. Alternatively, please send the "hex on" if you think that's more convenient. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support 2018-03-04 12:49 ` Russell King - ARM Linux @ 2018-03-04 13:19 ` Baruch Siach 0 siblings, 0 replies; 13+ messages in thread From: Baruch Siach @ 2018-03-04 13:19 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth [-- Attachment #1: Type: text/plain, Size: 2082 bytes --] Hi Russell, On Sun, Mar 04, 2018 at 12:49:06PM +0000, Russell King - ARM Linux wrote: > On Sun, Mar 04, 2018 at 02:13:24PM +0200, Baruch Siach wrote: > > On Tue, Feb 27, 2018 at 04:02:02PM +0000, Russell King wrote: > > > Add SFP module support for Clearfog using the SFP phylink support. > > > > > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> > > > > Tested-by: Baruch Siach <baruch@tkos.co.il> > > > > Tested on Clearfog base with kernel version 4.16-rc3. The SFP module is 1G > > copper Linktel LX1801CNR. > > Thanks for testing. > > Please also send the "ethtool -m eth2 raw on > foo.bin" output as well > so I can build a database of module EEPROMs, which allows me to validate > the SFP parsing code against. Alternatively, please send the "hex on" > if you think that's more convenient. Here are both. Binary file md5sum: 3635c7ceff2127d4d6bf04339b657440 Offset Values ------ ------ 0x0000: 03 04 00 00 00 00 08 00 00 00 00 01 0d 00 00 00 0x0010: 00 00 64 00 4c 49 4e 4b 54 45 4c 20 20 20 20 20 0x0020: 20 20 20 20 00 00 00 00 4c 58 31 38 30 31 43 4e 0x0030: 52 20 20 20 20 20 20 20 31 2e 30 20 00 00 00 94 0x0040: 00 10 00 00 31 31 37 32 36 32 33 39 32 37 20 20 0x0050: 20 20 20 20 31 37 30 36 32 38 20 20 00 00 00 50 0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0x0090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0x00a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0x00b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0x00c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0x00d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0x00e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0x00f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il - [-- Attachment #2: sfp.bin --] [-- Type: application/octet-stream, Size: 256 bytes --] [-- Attachment #3: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support 2018-02-27 16:02 ` [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support Russell King 2018-03-02 21:56 ` Andrew Lunn 2018-03-04 12:13 ` Baruch Siach @ 2018-03-19 21:41 ` Gregory CLEMENT 2 siblings, 0 replies; 13+ messages in thread From: Gregory CLEMENT @ 2018-03-19 21:41 UTC (permalink / raw) To: Russell King Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree, Rob Herring, Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth Hi Russell, On mar., févr. 27 2018, Russell King <rmk+kernel@arm.linux.org.uk> wrote: > Add SFP module support for Clearfog using the SFP phylink support. > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Applied on mvebu/dt with the tested-by flags Thanks, Gregory > --- > arch/arm/boot/dts/armada-388-clearfog.dtsi | 45 ++++++++---------------------- > 1 file changed, 12 insertions(+), 33 deletions(-) > > diff --git a/arch/arm/boot/dts/armada-388-clearfog.dtsi b/arch/arm/boot/dts/armada-388-clearfog.dtsi > index 0e3b1f140e6d..a44bf20ab7f8 100644 > --- a/arch/arm/boot/dts/armada-388-clearfog.dtsi > +++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi > @@ -117,6 +117,16 @@ > }; > }; > }; > + > + sfp: sfp { > + compatible = "sff,sfp"; > + i2c-bus = <&i2c1>; > + los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>; > + mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>; > + tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>; > + tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>; > + maximum-power-milliwatt = <2000>; > + }; > }; > > ð1 { > @@ -133,13 +143,10 @@ > bm,pool-long = <3>; > bm,pool-short = <1>; > buffer-manager = <&bm>; > + managed = "in-band-status"; > phy-mode = "sgmii"; > + sfp = <&sfp>; > status = "okay"; > - > - fixed-link { > - speed = <1000>; > - full-duplex; > - }; > }; > > &i2c0 { > @@ -208,34 +215,6 @@ > output-low; > line-name = "m.2 devslp"; > }; > - sfp_los { > - /* SFP loss of signal */ > - gpio-hog; > - gpios = <12 GPIO_ACTIVE_HIGH>; > - input; > - line-name = "sfp-los"; > - }; > - sfp_tx_fault { > - /* SFP laser fault */ > - gpio-hog; > - gpios = <13 GPIO_ACTIVE_HIGH>; > - input; > - line-name = "sfp-tx-fault"; > - }; > - sfp_tx_disable { > - /* SFP transmit disable */ > - gpio-hog; > - gpios = <14 GPIO_ACTIVE_HIGH>; > - output-low; > - line-name = "sfp-tx-disable"; > - }; > - sfp_mod_def0 { > - /* SFP module present */ > - gpio-hog; > - gpios = <15 GPIO_ACTIVE_LOW>; > - input; > - line-name = "sfp-mod-def0"; > - }; > }; > > /* The MCP3021 supports standard and fast modes */ > -- > 2.7.4 > -- Gregory Clement, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2018-03-19 21:41 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-02-27 16:01 [PATCH 0/2] SolidRun Clearfog SFP support Russell King - ARM Linux 2018-02-27 16:01 ` [PATCH 1/2] ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz Russell King 2018-03-05 15:48 ` Gregory CLEMENT 2018-03-05 16:09 ` Russell King - ARM Linux 2018-03-05 16:22 ` Gregory CLEMENT 2018-02-27 16:02 ` [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support Russell King 2018-03-02 21:56 ` Andrew Lunn 2018-03-02 22:02 ` Russell King - ARM Linux 2018-03-02 22:04 ` Andrew Lunn 2018-03-04 12:13 ` Baruch Siach 2018-03-04 12:49 ` Russell King - ARM Linux 2018-03-04 13:19 ` Baruch Siach 2018-03-19 21:41 ` Gregory CLEMENT
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).