From: Vasilij Strassheim <v.strassheim@linutronix.de>
To: netdev-bot+sashiko@kernel.org
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, linux@armlinux.org.uk, andrew+netdev@lunn.ch,
hkallweit1@gmail.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
martin.kaistra@linutronix.de, b.spranger@linutronix.de
Subject: Re: [PATCH net-next v3 2/8] dt-bindings: net: Add SoC-e SWIP MDIO controller
Date: Wed, 07 Oct 2026 09:43:18 +0200 [thread overview]
Message-ID: <c1f48a5caa670ece21e73458787a62f97879346f.camel@linutronix.de> (raw)
In-Reply-To: <179051210447.2160803.13761066598804865928@kernel.org>
On Sun, 2026-09-27 at 12:28 +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issue(s) to consider.
>
> Critical: 0 · High: 0 · Medium: 1 · Low: 1
>
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
>
> - [Medium] In soce,swip-mdio.yaml the MDIO controller owns the whole
> 32-bit 'control' register (<0x200 0x4>), which the binding calls the…
> - [Low] The only compatible is 'soce,swip-mdio-23-02', and neither the
> binding nor the commit message explains the '23-02' suffix.
>
> --
>
> dt-bindings: net: Add SoC-e SWIP MDIO controller
>
> This adds a devicetree binding for the MDIO controller built into SoC-e
> SWIP Ethernet switch IP cores. The controller has a data register region
> and a shared transaction control and bus selector register. It is the
> parent bus for an MDIO mux that reaches the external MDIO interfaces.
>
> > diff --git a/Documentation/devicetree/bindings/net/soce,swip-mdio.yaml b/Documentation/devicetree/bindings/net/soce,swip-mdio.yaml
> > new file mode 100644
> > index 0000000000000..3cf4bde0508ab
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/soce,swip-mdio.yaml
> > @@ -0,0 +1,47 @@
>
> [ ... ]
>
> > +description:
> > + MDIO controller integrated into SoC-e Ethernet switch FPGA IP cores.
> > + The controller accesses multiple external MDIO buses through a mux.
> > +
> > +$ref: mdio.yaml#
> > +
> > +properties:
> > + compatible:
> > + const: soce,swip-mdio-23-02
>
> [Severity: Low]
> What does the 23-02 suffix mean? Neither the binding nor the commit
> message explains it. It looks like a YY-MM IP release tag. The DSA
> driver commit in this series mentions testing an MRS 25.01 core.
>
> This MDIO block is part of the larger SWIP switch. It sits at
> 0x200-0x20f inside the switch register window.
> Documentation/devicetree/bindings/writing-bindings.rst says:
>
> For sub-blocks/components of bigger device (e.g. SoC blocks) use rather
> device-based compatible (e.g. SoC-based compatible), instead of custom
> versioning of that component.
>
> Could the version scheme be documented, or could a device-based
> compatible be used instead? As it stands, it isn't clear whether each
> future IP release would need a new compatible.
I will remove this suffix. For a child of MFD "soce,swip-mdio" is
enough.
>
> > +
> > + reg:
> > + items:
> > + - description: MDIO parameter, write data, and read data registers
> > + - description: Shared MDIO transaction control and bus selection register
>
> [Severity: Medium]
> Is this the right way to describe the bus selector? This node claims the
> whole 32-bit control register at <0x200 0x4>, bus selector field
> included. The binding gives the mux no way to reach that field. There is
> no #mux-control-cells and no mux child node, even though the description
> says the buses are reached through a mux.
>
> Later in the series, the example in "dt-bindings: net: dsa: Add SoC-e
> SWIP switch" covers this with a sibling mdio-mux-mmioreg node:
>
> Documentation/devicetree/bindings/net/dsa/soce,swip.yaml:
> mdio-mux@202 {
> ...
> reg = <0x202 0x2>;
> ...
>
> That range is the upper halfword of the register that mdio@204 already
> claims as control. The driver commit "net: mdio: Add SoC-e SWIP MDIO
> controller driver" says the same thing: the selector is bits 26:16, and
> a generic MMIO MDIO mux manages it through the upper 16-bit halfword.
>
> The result is two sibling nodes with overlapping reg ranges for one
> hardware register. This only works because neither driver requests its
> region exclusively. soce_mdio_iomap() in drivers/net/mdio/mdio-soce.c
> does:
>
> return devm_ioremap(dev, res.start, resource_size(&res));
>
> mdio_mux_mmioreg_switch_fn() also does a plain ioremap() on every
> switch. If either driver moved to devm_platform_ioremap_resource(),
> probe would fail with -EBUSY.
>
> Nothing fails with the current series. There is no -EBUSY today. The
> mux's 16-bit read-modify-write and the 32-bit read-modify-write in
> soce_mdio_start() are serialized: mdio_mux_read() and mdio_mux_write()
> hold the parent bus mdio_lock around both switch_fn() and the parent
> access.
>
> The concern is the DT ABI. Once this binding is merged, moving to a
> description without overlapping ranges would break compatibility. Two
> options would avoid the overlap:
>
> - make this controller a mux provider with #mux-control-cells
> - have the controller register its child buses itself
>
> Would it be better to choose one of these before the binding is merged?
>
Yes. I will address this in the MFD rework.
The MFD parent will register both child devices, with mdio-parent-bus
connecting the mux to the controller.
As already mentioned in other thread, this overlap is wrong.
The MDIO controller will use only the lower 16-bit half of the control
register through readw()/writew(). The sibling mdio-mux-mmioreg node
will use the upper half, so the resources will no longer overlap.
pw-bot: cr
next prev parent reply other threads:[~2026-10-07 7:43 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 10:39 [PATCH net-next v3 0/8] net: dsa: Add SoC-e DSA driver Vasilij Strassheim
2026-09-23 10:39 ` [PATCH net-next v3 1/8] dt-bindings: vendor-prefixes: Add soce Vasilij Strassheim
2026-09-23 10:39 ` [PATCH net-next v3 2/8] dt-bindings: net: Add SoC-e SWIP MDIO controller Vasilij Strassheim
2026-09-25 22:55 ` Andrew Lunn
2026-09-30 14:00 ` Vasilij Strassheim
2026-09-30 15:14 ` Andrew Lunn
2026-09-30 17:13 ` Vasilij Strassheim
2026-09-30 18:24 ` Andrew Lunn
2026-10-05 20:01 ` Vasilij Strassheim
2026-09-27 12:28 ` netdev-bot+sashiko
2026-10-07 7:43 ` Vasilij Strassheim [this message]
2026-09-23 10:39 ` [PATCH net-next v3 3/8] dt-bindings: net: dsa: Add SoC-e SWIP switch Vasilij Strassheim
2026-09-25 23:05 ` Andrew Lunn
2026-09-30 17:16 ` Vasilij Strassheim
2026-09-27 12:28 ` netdev-bot+sashiko
2026-10-07 20:54 ` Rob Herring
2026-10-08 9:50 ` Vasilij Strassheim
2026-10-08 12:05 ` Andrew Lunn
2026-10-08 12:52 ` Vasilij Strassheim
2026-09-23 10:39 ` [PATCH net-next v3 4/8] net: dsa: Add tag handling for SoC-e switches Vasilij Strassheim
[not found] ` <20260924104003.A49F31F000FF@smtp.kernel.org>
2026-09-25 12:46 ` Vasilij Strassheim
2026-09-27 12:28 ` netdev-bot+sashiko
2026-10-07 9:09 ` Vasilij Strassheim
2026-09-23 10:39 ` [PATCH net-next v3 5/8] net: mdio: Add SoC-e SWIP MDIO controller driver Vasilij Strassheim
2026-09-25 23:10 ` Andrew Lunn
2026-09-30 17:23 ` Vasilij Strassheim
2026-09-30 18:20 ` Andrew Lunn
2026-09-27 12:28 ` netdev-bot+sashiko
2026-10-07 9:31 ` Vasilij Strassheim
[not found] ` <20260924104004.773F61F00899@smtp.kernel.org>
2026-10-06 7:14 ` Vasilij Strassheim
2026-09-23 10:39 ` [PATCH net-next v3 6/8] net: dsa: soce: Add basic support for SoC-e switch IP cores Vasilij Strassheim
2026-09-25 23:17 ` Andrew Lunn
2026-09-30 17:26 ` Vasilij Strassheim
2026-09-25 23:20 ` Andrew Lunn
2026-09-30 18:15 ` Vasilij Strassheim
2026-09-30 18:29 ` Andrew Lunn
2026-09-30 18:49 ` Vasilij Strassheim
2026-09-27 12:28 ` netdev-bot+sashiko
2026-10-07 9:55 ` Vasilij Strassheim
2026-09-23 10:39 ` [PATCH net-next v3 7/8] net: dsa: soce: Add VLAN offload support Vasilij Strassheim
2026-09-25 23:32 ` Andrew Lunn
2026-09-30 18:32 ` Vasilij Strassheim
2026-09-27 12:28 ` netdev-bot+sashiko
2026-10-08 15:22 ` Vasilij Strassheim
[not found] ` <20260924104005.597041F00898@smtp.kernel.org>
2026-10-06 12:52 ` Vasilij Strassheim
2026-09-23 10:39 ` [PATCH net-next v3 8/8] net: dsa: soce: Disable unsupported hardware STP Vasilij Strassheim
2026-09-25 23:24 ` Andrew Lunn
2026-09-30 18:29 ` Vasilij Strassheim
2026-09-30 18:41 ` Andrew Lunn
2026-09-27 12:28 ` netdev-bot+sashiko
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=c1f48a5caa670ece21e73458787a62f97879346f.camel@linutronix.de \
--to=v.strassheim@linutronix.de \
--cc=andrew+netdev@lunn.ch \
--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=hkallweit1@gmail.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-bot+sashiko@kernel.org \
--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