linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* net: phy: Dealing with 88e1543 dual-port mode
@ 2020-11-19 14:22 Maxime Chevallier
  2020-11-19 14:55 ` Russell King - ARM Linux admin
  2020-11-19 15:16 ` Andrew Lunn
  0 siblings, 2 replies; 18+ messages in thread
From: Maxime Chevallier @ 2020-11-19 14:22 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli, Heiner Kallweit,
	Russell King - ARM Linux, David S. Miller, Antoine Tenart
  Cc: netdev, linux-arm-kernel, Thomas Petazzoni

Hello everyone,

I'm reaching out to discuss an issue I'm currently having, while working
on a Marvell 88E1543 PHY.

This PHY is very similar to the 88E1545 we already support upstream, but
with an added "dual-port mode" feature that I'm currently using in a
project, and that might be interesting to have upstream.

As a quick remainder, the 88E154x family are 4-ports PHYs that support
Fiber (SFP) or RJ45 Copper interfaces on the media side, and QSGMII/SGMII
on the host side.

A datasheet for this PHY family can be found here [1] but unfortunately,
this public datasheet doesn't explain the mode I'm going to discuss...

The specificity of the 88E1543 is that is can be configured as a 2-port
PHY, each port having the ability to have both a Copper RJ45 interface and
a Fiber interface with automatic media detection, very much like the
88x3310 that we support, and that is used on the MacchiatoBin.

This auto-media detection is the specific mode i'm interested in.

The way this works is that the PHY is internally configured by chaining
2 internal PHYs back to back. One PHY deals with the Host interface and
is configured as an SGMII to QSGMII converter (the QSGMII is only used
from within the PHY), and the other PHY acts as the Media-side PHY,
configured in QSGMII to auto-media (RJ45 or Fiber (SFP)) :

                +- 88e1543 -----------------------+
+-----+         | +--------+          +--------+  |  /-- Copper (RJ45)
|     |--SGMII----| Port 0 |--QSGMII--| Port 1 |----<
|     |         | +--------+          +--------+  |  \--- Fiber
| MAC |         |                                 |
|     |         | +--------+          +--------+  |  /-- Copper (RJ45)
|     |--SGMII----| Port 2 |--QSGMII--| Port 3 |----<
+-----+         | +--------+          +--------+  |  \-- Fiber
                +---------------------------------+

I have two main concerns about how to deal with that (if we are interested
in having such a support upstream at all).

The first one, is how to represent that in the DT.

One approach could be to really represents what's going on, by representing
the 2 PHYs chained together. In this case, only the MAC-facing PHY
will report the link state, so we are basically representing the internal
wiring of the PHY, can we consider that as a description of the hardware ?

Besides that, I don't think that today, we are able to represent link
composed of multiple PHYs daisy-chained together, but this is something
that we might want to support one day, since it could benefit other types
of use-cases.

Another approach could be to pretend the 88E1543 is a 2-port SGMII to
Auto-media PHY. This is also a bit tricky, since we need a way to detect
that we want the whole 4-ports PHY to act as a 2-port PHY. (or 3-port, if
we only want to use one pair of ports in that mode, and the other ports
as SGMII - Copper or SGMII - Fiber PHYs).

The second concern I have is that all of this is made even harder by the
fact that this 88E1543 PHY seems indistinguishable from the 88E1545 by
reading the PHY ID, they both report 0x01410eaX :/ I guess we would also
need some DT indication that we are in fact dealing with a 88E1543.

So I'd like you opinions on how we might want to deal with such scenarios,
and if we do want to bother supporting that at all :(

Thanks in advance,

Maxime

[1] :
https://www.marvell.com/content/dam/marvell/en/public-collateral/transceivers/marvell-phys-transceivers-alaska-88e154x-datasheet.pdf

_______________________________________________
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] 18+ messages in thread

end of thread, other threads:[~2020-11-20 14:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-19 14:22 net: phy: Dealing with 88e1543 dual-port mode Maxime Chevallier
2020-11-19 14:55 ` Russell King - ARM Linux admin
2020-11-19 15:19   ` Russell King - ARM Linux admin
2020-11-19 15:24   ` Maxime Chevallier
2020-11-19 22:43     ` Tobias Waldekranz
2020-11-19 23:16       ` Russell King - ARM Linux admin
2020-11-20  0:11         ` Tobias Waldekranz
2020-11-20  0:40           ` Russell King - ARM Linux admin
2020-11-20  9:12             ` Tobias Waldekranz
2020-11-20  9:36           ` Maxime Chevallier
2020-11-20 10:25             ` Russell King - ARM Linux admin
2020-11-20 10:59               ` Tobias Waldekranz
2020-11-20 13:55               ` Andrew Lunn
2020-11-20 14:18                 ` Maxime Chevallier
2020-11-20  0:00       ` Andrew Lunn
2020-11-20  9:05         ` Tobias Waldekranz
2020-11-19 15:16 ` Andrew Lunn
2020-11-19 15:45   ` Maxime Chevallier

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).