Re: [PATCH net-next v5 4/9] dt-bindings: mfd: Add SoC-e SWIP parent
From: Rob Herring
Date: Wed Dec 02 2026 - 13:35:58 EST
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@xxxxxxxxxx> wrote:
>
> > > I will describe the individual register regions for switch in the
> > > next version:
> > >
> > > reg = <0x0 0x50>, <0xb00 0x1200>,
> > > <0x3000 0x14>, <0x3200 0x400>;
> > > reg-names = "global", "switch", "ports", "statistics";
> >
> > I still don't think this is correct. Correct me if I'm wrong, but
> > your MDIO controller/mux is not a separate h/w block from the switch.
> Depends on the definition of "separate". If the question is: "Can I use
> the MDIO controller standalone?" The answer is yes.
>
> On the other hand, the MDIO controller, the switch-IP, the I2C
> controller, etc. are behind the same address decoder and part of the
> same FPGA bitstream blob. And these IP blocks can be separately switched
> on and off by the FPGA build configuration, i.e. they can be compiled
> in and out.
Thank you for the more complete picture.
> 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.
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.
> 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? Or the
child drivers will access the config space? 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.
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?
Rob