[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190625093042.Horde._8BNPFSzW6B9-CI8P6akHTh@www.vdorst.com>
Date: Tue, 25 Jun 2019 09:30:42 +0000
From: René van Dorst <opensource@...rst.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: sean.wang@...iatek.com, linux@...linux.org.uk, davem@...emloft.net,
matthias.bgg@...il.com, andrew@...n.ch, vivien.didelot@...il.com,
frank-w@...lic-files.de, netdev@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-mips@...r.kernel.org
Subject: Re: [PATCH RFC net-next 4/5] dt-bindings: net: dsa: mt7530: Add
mediatek,ephy-handle to isolate ext. phy
Quoting Florian Fainelli <f.fainelli@...il.com>:
Hi Florian
> On 6/24/19 7:52 AM, René van Dorst wrote:
>> On some platforum the external phy can only interface to the port 5 of the
>> switch because the RGMII TX and RX lines are swapped. But it still can be
>> useful to use the internal phy of the switch to act as a WAN port which
>> connectes to the 2nd GMAC. This gives WAN port dedicated bandwidth to
>> the SOC. This increases the LAN and WAN routing.
>>
>> By adding the optional property mediatek,ephy-handle, the external phy
>> is put in isolation mode when internal phy is connected to 2nd GMAC via
>> phy-handle property.
>
> Most platforms we have seen so far implement this logic with a mdio-mux,
> can you see if that is possible here? stmmac has plenty of examples like
> those.
May I don't understand it correctly, but all the devices are on the same MDIO
bus.
I tried to make a ASCII diagram to make it a bit more clear.
+-------------------+
+----------------------------------------------+
| SOC MT7621/3 | | MT7530 SWITCH
|
| +-------------+ |(T)RGMII BUS | +-------------+
INTERNAL |
| | 1st GMAC <-------------------------> PORT 6 | MII
BUS +----------+ |
| +-------------+ | | +-------------+
+------> GMAC5 | |
| | | |
+----------+ |
| +-------------+ | RGMII BUS | +-------------+ |
|
| | 2nd GMAC <------------------+------> PORT 5 +-----+
+----------+ |
| +-------------+ | | | +-------------+
+------> PHY P0 +<--+ |
| | | | |
+----------+ | |
| +-------------+ | MDIO BUS | | |
| |
| | MDIO +--------+ | | |
+----------+ | |
| +-------------+ | | | |
+------> PHY P4 +<--+ |
| | | | |
+----------+ | |
+-------------------+ | |
+--------------------------------------------|-+
| | +-------------+
|
| | | EXTERNAL |
|
| +-------> PHY AT8033 | SGMII
BUS +----------+ |
| |
+-----------> SFP CAGE | |
+---------------->+ |
+----------+ |
| | |
|
| +-------------+
|
+----------------------------------------------------------+
I don't see why I need a MDIO mux. Devices; 2nd GMAC, external phy and port 5
share the same RGMII bus. Depending on the port 5 mux settings, port 5
is acting
as a GMAC of PHY of port 0/4. As long as the unused devices doesn't drive the
RGMII bus we are good.
2nd GMAC RGMII control is currently set with a pinctrl "RGMII2".
Port 5 and external phy are done in mt7530_port5_setup() depending on the
device-tree.
Greats,
René
> --
> Florian
Powered by blists - more mailing lists