From: Vasilij Strassheim <v.strassheim@linutronix.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Russell King <linux@armlinux.org.uk>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org,
Martin Kaistra <martin.kaistra@linutronix.de>,
Benedikt Spranger <b.spranger@linutronix.de>
Subject: Re: [PATCH net-next v2 4/4] net: dsa: soce: Add basic support for SoC-e switch IP cores
Date: Wed, 09 Sep 2026 21:28:59 +0200 [thread overview]
Message-ID: <ab7e4eeed1b8296188355413cce1aa2b2aa5c670.camel@linutronix.de> (raw)
In-Reply-To: <5c955c96-7883-4e59-97ef-9fc3b63abf58@lunn.ch>
On Tue, 2026-09-08 at 21:20 +0200, Andrew Lunn wrote:
> > > What is the MDIO master?
> >
> > It refers to the switch-integrated MDIO controller: one shared set of
> > MMIO transaction registers serving multiple selectable MDIO buses. The
> > switch documentation calls it an MDIO bridge. I will rename "master" to
> > "controller".
>
> In Linux, we have the concept of MDIO muxes. You have one true MDIO
> bus master, and then logic gates to connect it to many MDIO
> busses. Generally, the MDIO data line has a set of analogue switches
> to mux it to one of the many MDIO busses.
>
> Having only one true MDIO bus master means you cannot do transactions
> in parallel.
That's true. I had already considered using an MDIO mux for v2, but
decided to retain the existing implementation while addressing the other
feedback first.
> It seems like this is how this hardware works. The question is, should
> we model it this way. Take a look at mdio-mux-mmioreg.c. Maybe the
> MDIO bus driver can be placed into drivers/net/mdio, and a
> mdio-mux-mmioreg stacked on top of it to provide the per port MDIO
> busses. That will make the locking simpler, and remove a lot of code.
>
For the next revision, I will try to implement this model. The MDIO
controller will become a standalone driver under mdio and register a
single parent mii_bus. A generic mdio-mux-mmioreg instance will then
provide the per-port child buses. Something like this:
ethernet-switch@xy {
/* ... */
mdio_parent: mdio@204 {
compatible = "soce,swip-mdio-23-02";
reg = <0x204 0xc>, <0x200 0x4>;
reg-names = "data", "control";
};
mdio-mux@200 {
compatible = "mdio-mux-mmioreg", "mdio-mux";
reg = <0x200 0x4>;
mux-mask = <0x1f0000>;
mdio-parent-bus = <&mdio_parent>;
#address-cells = <1>;
#size-cells = <0>;
mdio@0 {
reg = <0>;
/* PHYs connected to port 0 */
};
mdio@10000 {
reg = <0x10000>;
/* PHYs connected to port 1 */
};
};
/* ethernet-ports ... */
};
This requires a separate binding and compatible string for the MDIO
controller. I currently have soce,swip-mdio.yaml and the
register-layout-specific soce,swip-mdio-23-02 in mind, although I still
need to consider the naming.
> Andrew
Thanks,
Vasilij
next prev parent reply other threads:[~2026-09-09 19:29 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 18:10 [PATCH net-next v2 0/4] net: dsa: Add SoC-e DSA driver Vasilij Strassheim
2026-09-03 18:10 ` [PATCH net-next v2 1/4] dt-bindings: vendor-prefixes: Add soce Vasilij Strassheim
2026-09-07 9:14 ` Krzysztof Kozlowski
2026-09-03 18:10 ` [PATCH net-next v2 2/4] dt-bindings: net: dsa: Add SoC-e SWIP switch Vasilij Strassheim
2026-09-07 9:21 ` Krzysztof Kozlowski
2026-09-07 14:01 ` Vasilij Strassheim
2026-09-07 18:56 ` Andrew Lunn
2026-09-08 10:16 ` Vasilij Strassheim
2026-09-08 10:29 ` Kurt Kanzenbach
2026-09-08 9:14 ` Krzysztof Kozlowski
2026-09-08 10:09 ` Vasilij Strassheim
2026-09-07 19:04 ` Andrew Lunn
2026-09-07 19:09 ` Andrew Lunn
2026-09-08 18:15 ` Vasilij Strassheim
2026-09-08 19:10 ` Andrew Lunn
2026-09-09 18:46 ` Vasilij Strassheim
2026-09-10 12:12 ` Andrew Lunn
2026-09-03 18:11 ` [PATCH net-next v2 3/4] net: dsa: Add tag handling for SoC-e switches Vasilij Strassheim
2026-09-09 12:12 ` netdev-bot+sashiko
2026-09-03 18:11 ` [PATCH net-next v2 4/4] net: dsa: soce: Add basic support for SoC-e switch IP cores Vasilij Strassheim
2026-09-07 19:28 ` Andrew Lunn
2026-09-08 18:44 ` Vasilij Strassheim
2026-09-08 19:20 ` Andrew Lunn
2026-09-09 19:28 ` Vasilij Strassheim [this message]
2026-09-10 12:18 ` Andrew Lunn
2026-09-08 0:37 ` Andrew Lunn
2026-09-10 13:01 ` Vasilij Strassheim
2026-09-10 15:07 ` Andrew Lunn
2026-09-11 13:39 ` Vasilij Strassheim
2026-09-08 8:25 ` Kurt Kanzenbach
2026-09-08 10:12 ` Vasilij Strassheim
2026-09-09 12:12 ` netdev-bot+sashiko
2026-09-07 9:10 ` [PATCH net-next v2 0/4] net: dsa: Add SoC-e DSA driver Krzysztof Kozlowski
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=ab7e4eeed1b8296188355413cce1aa2b2aa5c670.camel@linutronix.de \
--to=v.strassheim@linutronix.de \
--cc=andrew@lunn.ch \
--cc=b.spranger@linutronix.de \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=martin.kaistra@linutronix.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/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