mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vasilij Strassheim <v.strassheim@linutronix.de>
To: sashiko-reviews@lists.linux.dev
Cc: devicetree@vger.kernel.org, mfd@lists.linux.dev, robh@kernel.org,
	 conor+dt@kernel.org, lee@kernel.org,
	linux-kernel@vger.kernel.org,  netdev@vger.kernel.org
Subject: Re: [PATCH net-next v5 2/9] dt-bindings: net: Add SoC-e SWIP MDIO controller
Date: Tue, 24 Nov 2026 13:04:05 +0100	[thread overview]
Message-ID: <2914e08473cb0827bff626e17c9bcaeba93720c9.camel@linutronix.de> (raw)
In-Reply-To: <sashiko-outbox-227106@kernel.org>

On Sat, 2026-11-21 at 14:53 +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] dt-bindings: net: soce,swip-mdio splits contiguous register
>   block and 32-bit control register
> --
> 
> commit 9edcf12a958c9e727ec0bdb9d997f3a5d2655e08
> Author: Vasilij Strassheim <v.strassheim@linutronix.de>
> 
> dt-bindings: net: Add SoC-e SWIP MDIO controller
> 
> This commit adds a Device Tree binding schema for the MDIO controller
> integrated into SoC-e SWIP Ethernet switch IP cores.
> 
> > 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..7a0b8bd3ab71b
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/soce,swip-mdio.yaml
> > @@ -0,0 +1,47 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/soce,swip-mdio.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: SoC-e SWIP FPGA MDIO controller
> > +
> > +maintainers:
> > +  - Vasilij Strassheim <v.strassheim@linutronix.de>
> > +
> > +description:
> > +  MDIO controller integrated into the SoC-e Switch IP (SWIP) FPGA core.
> > +  External MDIO buses are selected through a sibling MMIO MDIO mux.
> > +
> > +$ref: mdio.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    const: soce,swip-mdio
> > +
> > +  reg:
> > +    items:
> > +      - description: MDIO parameter, write data, and read data registers
> > +      - description: Lower 16-bit half of the MDIO transaction control register
> > +
> > +  reg-names:
> > +    items:
> > +      - const: data
> > +      - const: control
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - reg-names
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    mdio@204 {
> > +        compatible = "soce,swip-mdio";
> > +        reg = <0x204 0xc>, <0x200 0x2>;
> > +        reg-names = "data", "control";
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +    };
> 
> [Severity: Medium]
> As reported by Andrew Lunn on v3 [1], should this binding describe the
> controller's contiguous 16-byte register block at <0x200 0x10> instead of
> splitting it into out-of-order sub-ranges (<0x204 0xc> and <0x200 0x2>) and
> slicing the 32-bit control register at 0x200 across two DT nodes?
> 
> In hardware, the 32-bit control register at 0x200 holds both the MDIO
> transaction control bits and the external bus selector bits, followed by the
> three data registers at 0x204..0x20f.  Partitioning that single 32-bit
> register into 16-bit halves so a sibling mdio-mux-mmioreg node can claim
> <0x202 0x2> encodes Linux driver details, little-endian byte offsets, 16-bit
> MMIO access assumptions, and an artificial mdio@204 unit address into the DT
> binding ABI.  Describing reg = <0x200 0x10> on mdio@200 and modeling the
> integrated bus mux directly in the controller binding would match the
> hardware layout.
> 
> [1] https://lore.kernel.org/r/e5aa5cd8-e805-47d3-a105-07bf1b9eb9b8@lunn.ch

The comment in [1] was based on an error in a previous version of the
example.

A separate discussion led me to use mdio-mux-mmioreg.
The two 16-bit halves can be accessed independently by the controller
and mux. I would prefer to represent those ranges separately in this
binding.



  parent reply	other threads:[~2026-11-24 12:04 UTC|newest]

Thread overview: 15+ 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
     [not found]   ` <sashiko-outbox-227106@kernel.org>
2026-11-24 12:04     ` Vasilij Strassheim [this message]
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-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-11-20 14:52 ` [PATCH net-next v5 5/9] net: dsa: Add tag handling for SoC-e switches 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-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=2914e08473cb0827bff626e17c9bcaeba93720c9.camel@linutronix.de \
    --to=v.strassheim@linutronix.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®