On Tue, 7 Aug 2018 21:58:20 +0200
Andrew Lunn <and...@lunn.ch> wrote:

> Hi Marek
> 
> I'm currently working on exactly this!
> 
> My primary aim is to allow SFP on ports 9 and 10. ports 2-7 can also
> be connected to SFPs, but that is a bit harder, so it is going to take
> me a little longer.
> 
> I hope i can post patches in the next few days.
> 
>   Andrew

Hi, this is cool :-) On our board it will be possible to connect
SFP extender board to port 10, and I was afraid it might have been me
to write the support for this :).

Let me know when you have the first version ready, I will try it. Our
router can connect SFP board directly to the CPU board, or there may up
to three mv88e6190 switch boards between SFP board and cpu board.

Do you already have a stable dts binding for how to bind sfp to dsa
port?

Btw: some SFP modules can operate in 2500BASE-X mode. Currently the SFP
driver does not support this, and there even isn't code in the
mainline kernel for mvneta to switch to 2500BASEX. On Armada 3720 this
has to be done by configuring comphy, which is currently done in
u-boot. As a side project I am working on supporting Armada 3720 comphy
in the kernel, so that it will be possible to set 2500BASE-X mode.

The mv88e6190/6390 can configure ports 9 and 10 to either
1000BASE-X/SGMII od 2500BASE-X, but this has to be done by setting a
pin and reseting the switch. Our board is able to configure this pin,
and the plan is to do this in u-boot when SFP board is detected to be
connected to the switch board. In this case the port is configured to
1000BASE-X.

I am wondering how complicated would it be to support changing these
modes for port 9 and 10 in mv88exxxx driver. There could be GPIO port
definitions in devicetree for P9_MODE and P10_MODE (and RESET), and
then the driver would be able to change these modes.

Since the switch has to be reseted to change the mode I think all the
dsa lan ports would have to be unused when doing this, correct?

And still how more complicated would it be if for example the RESET
gpio is shared between multiple switches, while the P9_MODE and
P10_MODE gpios are unique for each switch, like this:

    RESET-----+--------+--------+
              |        |        |
  +-----+  +--+--+  +--+--+  +--+--+  +-----+
  | cpu |==| sw1 |==| sw2 |==| sw3 |==| sfp |
  +-----+  +-+-+-+  +-+-+-+  +-+-+-+  +-----+
             | |      | |      | |
 P9_MODE[1]--+ |      | |      | |
P10_MODE[1]----+      | |      | |     == means SGMII/2500BASE-X
 P9_MODE[2]-----------+ |      | |            connection
P10_MODE[2]-------------+      | |
 P9_MODE[3]--------------------+ |
P10_MODE[3]----------------------+

Marek

Reply via email to