From: "René van Dorst" <opensource@vdorst.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: sean.wang@mediatek.com, linux@armlinux.org.uk,
davem@davemloft.net, matthias.bgg@gmail.com, andrew@lunn.ch,
vivien.didelot@gmail.com, frank-w@public-files.de,
netdev@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-mips@vger.kernel.org
Subject: Re: [PATCH RFC net-next 4/5] dt-bindings: net: dsa: mt7530: Add mediatek,ephy-handle to isolate ext. phy
Date: Tue, 25 Jun 2019 09:30:42 +0000 [thread overview]
Message-ID: <20190625093042.Horde._8BNPFSzW6B9-CI8P6akHTh@www.vdorst.com> (raw)
In-Reply-To: <e6175753-eb99-63e5-767e-f82becbf8d1a@gmail.com>
Quoting Florian Fainelli <f.fainelli@gmail.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
next prev parent reply other threads:[~2019-06-25 9:30 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 14:52 [PATCH RFC net-next 0/5] net: dsa: MT7530: Convert to PHYLINK and add support for port 5 René van Dorst
2019-06-24 14:52 ` [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API René van Dorst
2019-06-24 15:39 ` Russell King - ARM Linux admin
2019-06-25 11:31 ` René van Dorst
2019-06-25 12:10 ` Russell King - ARM Linux admin
2019-06-25 18:37 ` Daniel Santos
2019-06-25 19:02 ` Andrew Lunn
2019-06-25 19:27 ` Daniel Santos
2019-06-25 20:41 ` Andrew Lunn
2019-06-25 21:07 ` René van Dorst
2019-06-25 21:21 ` Russell King - ARM Linux admin
2019-06-27 19:09 ` Daniel Santos
2019-06-27 19:28 ` Andrew Lunn
2019-06-28 7:16 ` Daniel Santos
2019-06-25 21:13 ` Russell King - ARM Linux admin
2019-06-25 20:24 ` Vladimir Oltean
2019-06-25 21:53 ` Russell King - ARM Linux admin
2019-06-25 22:14 ` Vladimir Oltean
2019-06-25 22:57 ` Russell King - ARM Linux admin
2019-06-25 23:10 ` Vladimir Oltean
2019-06-25 23:13 ` Vladimir Oltean
2019-06-26 1:52 ` Andrew Lunn
2019-06-26 7:41 ` Russell King - ARM Linux admin
2019-06-26 8:46 ` Vladimir Oltean
2019-06-26 9:04 ` Russell King - ARM Linux admin
2019-06-25 0:58 ` Daniel Santos
2019-06-25 11:43 ` René van Dorst
2019-06-24 14:52 ` [PATCH RFC net-next 2/5] dt-bindings: net: dsa: mt7530: Add support for port 5 René van Dorst
2019-06-24 14:52 ` [PATCH RFC net-next 3/5] " René van Dorst
2019-06-24 14:52 ` [PATCH RFC net-next 4/5] dt-bindings: net: dsa: mt7530: Add mediatek,ephy-handle to isolate ext. phy René van Dorst
2019-06-24 21:56 ` Florian Fainelli
2019-06-25 9:30 ` René van Dorst [this message]
2019-06-25 19:16 ` Florian Fainelli
2019-06-24 14:52 ` [PATCH RFC net-next 5/5] net: dsa: mt7530: Add mediatek,ephy-handle to isolate external phy René van Dorst
2019-06-24 21:52 ` Andrew Lunn
2019-06-25 0:22 ` Daniel Santos
2019-06-25 8:24 ` René van Dorst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190625093042.Horde._8BNPFSzW6B9-CI8P6akHTh@www.vdorst.com \
--to=opensource@vdorst.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=frank-w@public-files.de \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sean.wang@mediatek.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).