From: Benedikt Spranger <b.spranger@linutronix.de>
To: Rob Herring <robh@kernel.org>
Cc: Vasilij Strassheim <v.strassheim@linutronix.de>,
Krzysztof Kozlowski <krzk@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Eric Dumazet <edumazet@kernel.org>, Lee Jones <lee@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, mfd@lists.linux.dev,
Martin Kaistra <martin.kaistra@linutronix.de>
Subject: Re: [PATCH net-next v5 4/9] dt-bindings: mfd: Add SoC-e SWIP parent
Date: Thu, 3 Dec 2026 14:27:27 +0100 [thread overview]
Message-ID: <20261203142727.00b19361@mitra> (raw)
In-Reply-To: <20261202183543.GA4076212-robh@kernel.org>
On Wed, 2 Dec 2026 12:35:43 -0600
Rob Herring <robh@kernel.org> wrote:
> On Wed, Dec 02, 2026 at 11:26:44AM +0100, Benedikt Spranger wrote:
> > On Tue, 1 Dec 2026 16:48:03 -0600
> > Rob Herring <robh@kernel.org> wrote:
> > Our goal is to handle the different IPs inside the FPGA by there
> > own to be able to share as many driver code as we can.
> >
> > > So again, "soce,swip" and "soce,swip-switch-00-04-0c-10" nodes
> > > should be merged. For mdio mux, either it can be a child of the
> > > switch or not in DT at all and instantiated from the switch
> > > driver.
> > OK. We can do that. And the I2C controller, the interrupt controler
> > or the future 507th incarnation of the D-CAN IP, which someone
> > compiled in?
> >
> > To enlighten this:
> > The board we are working with is a PLC. This PLC has an extension
> > bus. There are modules available for this extension bus, like analog
> > IO, digital IO, power measurement, PWM, and also some communication
> > modules. This bus is capable of transporting a CAN signal, so why
> > not add some glue logic and a transceiver in the module? The heavy
> > stuff can be done by putting a D-CAN IP in the FPGA behind the
> > existing addressdecoder. Should that D-CAN IP be part of the switch?
>
> No, those are clearly separate components from what you describe.
> MDIO is very often just part of some larger block and your register
> layout makes it seem that way here. So only knowing about switch and
> mdio IP steers us in one direction.
Vasilij mentioned the different IPs and I thought it was clear enough.
That's our fault...
> Plus, the MFD says it is for the 'ethernet switch core' which in no
> way sounds like it is just some generic infrastructure in your FPGA.
Here the things start to become *REALLY* messy:
The Switch IP itself is a shell. It contains different IPs:
The switch itself, an interrupt controller, the MDIO controller, the
MDIO mux, an I2C controller, and so on.
Some of these IP blocks need a runtime license to be enabled. The
license management is dealt in hardware, so no interaction is needed by
the linux driver. But to handle these IPs by a driver, we need to
enable/disable parts of the device tree at runtime. MFD cells are handy
here.
And there are variants. What makes it hard to handle is, that these
variants share same IPs on different addresses or even worse use the
same registers with different layout. Vasilij is working on that
(regmap). And there are PCIe cards with this switch...
> > Hopefully this example makes clear that we can look at our FPGA
> > like a breadboard. The base part (MFD) simply contains an
> > addressdecoder and some configuration space to detect what is on
> > our breadboard. The "chips" on our breadboard are the different
> > IPs, which can be individually used in that bitstream.
> >
> > Therefore: different "chip" (IP) -> different MFD cell
>
> Does instantiating the child devices depend on this config space?
Yes. In the config space (a RO register space) are information stored
about what IPs are available and unsable. BUT thre are also
informations whitch are needed by the individual drivers.
> Or the child drivers will access the config space?
As described above: Both need access.
> I'm guessing it is the former because your driver only reads a
> version register. So can't the switch, mdio, d-can, etc. parent just
> be a simple-bus? (Lee is asking basically the same question.) Are
> there resources for the FPGA that need to potentially be managed?
> Clocks, regulators, etc.
For now: yes. But we have to handle the variants and runtime license
stuff. With that in mind I am not shure.
> Is what's in the config space itself fixed or discoverable? It's not
> clear what the actual config space is given it all just overlaps with
> the switch. How would you handle config space changing?
For now we are not talking about runtime reload or reconfiguration of
the FPGA. Therfore the config space is fixed during runtime.
Regards
Bene
next prev parent reply other threads:[~2026-12-03 13:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 14:52 [PATCH net-next v5 0/9] net: dsa: Add support for SoC-e Ethernet switch IP cores Vasilij Strassheim
2026-11-20 14:52 ` [PATCH net-next v5 1/9] dt-bindings: vendor-prefixes: Add soce Vasilij Strassheim
2026-11-20 14:52 ` [PATCH net-next v5 2/9] dt-bindings: net: Add SoC-e SWIP MDIO controller Vasilij Strassheim
2026-11-21 14:53 ` sashiko-bot
2026-11-24 12:04 ` Vasilij Strassheim
2026-11-20 14:52 ` [PATCH net-next v5 3/9] dt-bindings: net: dsa: Add SoC-e SWIP switch function Vasilij Strassheim
2026-11-21 14:53 ` sashiko-bot
2026-11-22 14:54 ` Krzysztof Kozlowski
2026-11-24 10:40 ` Vasilij Strassheim
2026-11-20 14:52 ` [PATCH net-next v5 4/9] dt-bindings: mfd: Add SoC-e SWIP parent Vasilij Strassheim
2026-11-21 10:19 ` Krzysztof Kozlowski
2026-11-23 17:59 ` Vasilij Strassheim
2026-12-01 22:48 ` Rob Herring
2026-12-02 10:26 ` Benedikt Spranger
2026-12-02 18:35 ` Rob Herring
2026-12-03 13:27 ` Benedikt Spranger [this message]
2026-11-21 14:53 ` sashiko-bot
2026-11-20 14:52 ` [PATCH net-next v5 5/9] net: dsa: Add tag handling for SoC-e switches Vasilij Strassheim
2026-11-21 14:53 ` sashiko-bot
2026-11-25 16:06 ` Vasilij Strassheim
2026-11-20 14:52 ` [PATCH net-next v5 6/9] net: mdio: Add SoC-e SWIP MDIO controller driver Vasilij Strassheim
2026-11-20 14:52 ` [PATCH net-next v5 7/9] mfd: soce: Add SWIP core driver Vasilij Strassheim
2026-12-02 17:20 ` Lee Jones
2026-11-20 14:52 ` [PATCH net-next v5 8/9] net: dsa: soce: Add basic support for SoC-e SWIP switch Vasilij Strassheim
2026-11-20 14:52 ` [PATCH net-next v5 9/9] net: dsa: soce: Add VLAN membership table support Vasilij Strassheim
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=20261203142727.00b19361@mitra \
--to=b.spranger@linutronix.de \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=martin.kaistra@linutronix.de \
--cc=mfd@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=v.strassheim@linutronix.de \
/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