mbox series

[RFC,0/6] Armada 38x comphy driver to support 2.5Gbps networking

Message ID 20181112122933.GD30658@n2100.armlinux.org.uk (mailing list archive)
Headers show
Series Armada 38x comphy driver to support 2.5Gbps networking | expand

Message

Russell King (Oracle) Nov. 12, 2018, 12:29 p.m. UTC
Hi,

This series adds support for dynamically switching between 1Gbps
and 2.5Gbps networking for the Marvell Armada 38x SoCs, tested on
Armada 388 on the Clearfog platform.

This is necessary to be able to connect (eg) a Clearfog platform
with a Macchiatobin platform via the SFP sockets, as Clearfog
currently only supports 1Gbps networking via the SFP socket and
Macchiatobin defaults to 2.5Gbps when using Fiberchannel SFPs.

In order to allow dynamic switching, we need to implement a common
phy driver to switch the ethernet serdes lane speed - 2.5Gbps is
just 1Gbps up-clocked by 2.5x.  We implement a simple comphy
driver to achieve this, which only supports networking.

With this, we are able to support both Fiberchannel SFPs operating
at 2.5Gbps or 1Gbps, and 1G ethernet SFPs plugged into the Clearfog
platform, dynamically selecting according to the SFPs abilities.

I'm aware of the proposed changes to the PHY layer, changing
phy_set_mode() to take the ethernet phy interface type, hence why
this is RFC - there's also the question about how this will be
merged.  This series is currently based on 4.20-rc1, but will
likely need to be rebased when the PHY layer changes hit.

 .../bindings/net/marvell-armada-370-neta.txt       |   2 +-
 .../bindings/phy/phy-armada38x-comphy.txt          |  40 ++++
 arch/arm/boot/dts/armada-388-clearfog.dtsi         |   2 +
 arch/arm/boot/dts/armada-38x.dtsi                  |  37 ++++
 drivers/net/ethernet/marvell/mvneta.c              |  58 ++++-
 drivers/phy/marvell/Kconfig                        |  10 +
 drivers/phy/marvell/Makefile                       |   1 +
 drivers/phy/marvell/phy-armada38x-comphy.c         | 236 +++++++++++++++++++++
 8 files changed, 378 insertions(+), 8 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-armada38x-comphy.txt
 create mode 100644 drivers/phy/marvell/phy-armada38x-comphy.c

Comments

Kishon Vijay Abraham I Nov. 14, 2018, 8:09 a.m. UTC | #1
Hi,

On 12/11/18 5:59 PM, Russell King - ARM Linux wrote:
> Hi,
> 
> This series adds support for dynamically switching between 1Gbps
> and 2.5Gbps networking for the Marvell Armada 38x SoCs, tested on
> Armada 388 on the Clearfog platform.
> 
> This is necessary to be able to connect (eg) a Clearfog platform
> with a Macchiatobin platform via the SFP sockets, as Clearfog
> currently only supports 1Gbps networking via the SFP socket and
> Macchiatobin defaults to 2.5Gbps when using Fiberchannel SFPs.
> 
> In order to allow dynamic switching, we need to implement a common
> phy driver to switch the ethernet serdes lane speed - 2.5Gbps is
> just 1Gbps up-clocked by 2.5x.  We implement a simple comphy
> driver to achieve this, which only supports networking.
> 
> With this, we are able to support both Fiberchannel SFPs operating
> at 2.5Gbps or 1Gbps, and 1G ethernet SFPs plugged into the Clearfog
> platform, dynamically selecting according to the SFPs abilities.
> 
> I'm aware of the proposed changes to the PHY layer, changing
> phy_set_mode() to take the ethernet phy interface type, hence why
> this is RFC - there's also the question about how this will be
> merged.  This series is currently based on 4.20-rc1, but will
> likely need to be rebased when the PHY layer changes hit.

For this case, I'd prefer the phy_set_mode series and the phy and net changes
here (after rebasing) go via linux-phy tree.

Thanks
Kishon
Russell King (Oracle) Nov. 14, 2018, 10:56 a.m. UTC | #2
On Wed, Nov 14, 2018 at 01:39:29PM +0530, Kishon Vijay Abraham I wrote:
> Hi,
> 
> On 12/11/18 5:59 PM, Russell King - ARM Linux wrote:
> > Hi,
> > 
> > This series adds support for dynamically switching between 1Gbps
> > and 2.5Gbps networking for the Marvell Armada 38x SoCs, tested on
> > Armada 388 on the Clearfog platform.
> > 
> > This is necessary to be able to connect (eg) a Clearfog platform
> > with a Macchiatobin platform via the SFP sockets, as Clearfog
> > currently only supports 1Gbps networking via the SFP socket and
> > Macchiatobin defaults to 2.5Gbps when using Fiberchannel SFPs.
> > 
> > In order to allow dynamic switching, we need to implement a common
> > phy driver to switch the ethernet serdes lane speed - 2.5Gbps is
> > just 1Gbps up-clocked by 2.5x.  We implement a simple comphy
> > driver to achieve this, which only supports networking.
> > 
> > With this, we are able to support both Fiberchannel SFPs operating
> > at 2.5Gbps or 1Gbps, and 1G ethernet SFPs plugged into the Clearfog
> > platform, dynamically selecting according to the SFPs abilities.
> > 
> > I'm aware of the proposed changes to the PHY layer, changing
> > phy_set_mode() to take the ethernet phy interface type, hence why
> > this is RFC - there's also the question about how this will be
> > merged.  This series is currently based on 4.20-rc1, but will
> > likely need to be rebased when the PHY layer changes hit.
> 
> For this case, I'd prefer the phy_set_mode series and the phy and net changes
> here (after rebasing) go via linux-phy tree.

Please let me know when they've hit, thanks.
Maxime Chevallier Nov. 15, 2018, 10:02 a.m. UTC | #3
Hello Russell,

On Mon, 12 Nov 2018 12:29:33 +0000
Russell King - ARM Linux <linux@armlinux.org.uk> wrote:

>Hi,
>
>This series adds support for dynamically switching between 1Gbps
>and 2.5Gbps networking for the Marvell Armada 38x SoCs, tested on
>Armada 388 on the Clearfog platform.

I've performed some tests on my side on a Clearfog too, and also on an
Armada 385 board. It works fine on both setups.

Thanks for implementing this,

Maxime
Kishon Vijay Abraham I Nov. 21, 2018, 9:41 a.m. UTC | #4
Hi Russell,

On 14/11/18 4:26 PM, Russell King - ARM Linux wrote:
> On Wed, Nov 14, 2018 at 01:39:29PM +0530, Kishon Vijay Abraham I wrote:
>> Hi,
>>
>> On 12/11/18 5:59 PM, Russell King - ARM Linux wrote:
>>> Hi,
>>>
>>> This series adds support for dynamically switching between 1Gbps
>>> and 2.5Gbps networking for the Marvell Armada 38x SoCs, tested on
>>> Armada 388 on the Clearfog platform.
>>>
>>> This is necessary to be able to connect (eg) a Clearfog platform
>>> with a Macchiatobin platform via the SFP sockets, as Clearfog
>>> currently only supports 1Gbps networking via the SFP socket and
>>> Macchiatobin defaults to 2.5Gbps when using Fiberchannel SFPs.
>>>
>>> In order to allow dynamic switching, we need to implement a common
>>> phy driver to switch the ethernet serdes lane speed - 2.5Gbps is
>>> just 1Gbps up-clocked by 2.5x.  We implement a simple comphy
>>> driver to achieve this, which only supports networking.
>>>
>>> With this, we are able to support both Fiberchannel SFPs operating
>>> at 2.5Gbps or 1Gbps, and 1G ethernet SFPs plugged into the Clearfog
>>> platform, dynamically selecting according to the SFPs abilities.
>>>
>>> I'm aware of the proposed changes to the PHY layer, changing
>>> phy_set_mode() to take the ethernet phy interface type, hence why
>>> this is RFC - there's also the question about how this will be
>>> merged.  This series is currently based on 4.20-rc1, but will
>>> likely need to be rebased when the PHY layer changes hit.
>>
>> For this case, I'd prefer the phy_set_mode series and the phy and net changes
>> here (after rebasing) go via linux-phy tree.
> 
> Please let me know when they've hit, thanks.

I've merged the phy_set_mode series to linux-phy -next.

Thanks
Kishon
>