🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21745

Re: [PATCH net-next v5 2/9] dt-bindings: net: Add SoC-e SWIP MDIO controller

#21745
From: Vasilij Strassheim
Date: Tue, 24 Nov 2026 12:04
105 lines
12979 bytes
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.
Technical Details
Message-ID: <2914e08473cb0827bff626e17c9bcaeba93720c9.camel@linutronix.de>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370302-linux-kernel-netdev=dewy.ru
References: <20261120-devel-vstrassheim-soce-dsa-ml-v5-0-5de9225715e6@linutronix.de> <20261120-devel-vstrassheim-soce-dsa-ml-v5-2-5de9225715e6@linutronix.de> <sashiko-outbox-227106@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370302-linux-kernel-netdev=dewy.ru
From: v.strassheim@linutronix.de (Vasilij Strassheim)
Newsgroups: linux.kernel.netdev
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
Organization: Usenet Network
Message-ID: <2914e08473cb0827bff626e17c9bcaeba93720c9.camel@linutronix.de>
References: <20261120-devel-vstrassheim-soce-dsa-ml-v5-0-5de9225715e6@linutronix.de>
	 <20261120-devel-vstrassheim-soce-dsa-ml-v5-2-5de9225715e6@linutronix.de>
	 <sashiko-outbox-227106@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="4129211"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:yJmzucSZ3ZEyZ7wCfYz1K1R/uxw= sha256:ImlZNdLjMzOtBwYSgHRASQAgfnnXkd0yFEh02z+e7bE=
	sha1:iNXcDKpMRra30J1hFjUnp9wlkcI= sha256:sn0u8g6aboJ6khzoDo3wRBekFTJipwMmnikDUz1+AQ8=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id C7AA0125E02; Tue, 24 Nov 2026 15:04:35 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=linutronix.de header.b=0RIDOwA3; dkim=neutral
	reason="invalid (unsupported algorithm ed25519-sha256)"
	header.d=linutronix.de header.b=kDmbdYqP
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id oSWmvsbjVZqv;
	Tue, 24 Nov 2026 15:04:27 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-370302-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linutronix.de
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 4E205125DFE; Tue, 24 Nov 2026 15:04:14 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 7350B38526; Tue, 24 Nov 2026 12:04:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795521851;
	b=nAH8dYHYYSKRg57o3IxvjYZVWSybtFI+LLrkByKCwFrxoUyYjcadETtbvoQlQFuC8pfd
	 AokTFFc8BIGr0vGoXe7tCrhkRFJ/jgYijzVfAqZ7V4JtJ19UmKPqzQgvOjwU3rTDfwAWL
	 xvw7bpiH7V80mJmoB2zm4DlJ2KjHJt+l2YL+Pvr5IMhIjtI1w1YhjbguBUP3t1piAMWwJ
	 xGj2fXZR1WxfeZ4mzjklVK+O2S0Q26T5ZW2TpREmYrhPjt3pIOHd5odBP0SEDwu33PrTV
	 hQf4xVkcayA4feCI1wQyjg9gMCMsxw90Pp6grPN5bX/y3tlB0WwaBPIacpu5smGOdkg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795521851;
	h=X-Original-To:Received:DMARC-Filter:Message-ID:DKIM-Signature:
	 DKIM-Signature:Subject:From:To:Cc:Date:In-Reply-To:References:
	 Organization:Content-Type:Content-Transfer-Encoding:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version;
	bh=dOtQLZCrhUQO5+77tG8G7mFA+K9A/7D/ufirbjE1Ndc=;
	b=1nQWgelTb+Vri6yM2JlUnX/+nSJECL+x6qH+s3iOJ7zeZ7UdSXW5I7cY2rAHwwjm8ONl
	 4fDRe8NE673W7QlUJOgL9XnDPNGnV0upi2FwQlcXihsNEmd1FNSwW7oM/Jr0tLA5NmCc/
	 nfiPFDVOrvDz9h+Jv5LYHEbNlHadGO1RcQnsmXaV8mZHzITCXna9p85fUW7tHAkRJSIw/
	 tk0eLmo+dqIXGTOC5as0mjMX2CYEAnrS841OVdyjPRLJWLvV8o0ku2XV8iOkOp67iPzaI
	 msW6BoLwRr7vRBKamoH6WLCwPa8+wmNsnq5OpRB6KAHeEYRxA3ew8K+z23TWfyh66nQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=0RIDOwA3;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=kDmbdYqP;
	dmarc=pass header.from=linutronix.de;
	spf=pass smtp.mailfrom=linutronix.de;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 16BA7606A332;
	Tue, 24 Nov 2026 12:04:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=0RIDOwA3;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=kDmbdYqP
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795521850;
	b=IiwyY14Nk7M+E5M6QxVdX4Rg7Z19dz6Qzsm4wVh+dV50SmRrp5vcONpEuMDbzUbzzuIs
	 y3ibuwHmGxLx6TXmwqbfxqZMnjUx1iTyskqriwV6Y63/37XiGyDGO9DhmA0KEHjXOotB+
	 +tH4Rdfyv9Gg9ejFnJTFFcMX7jKjAJHZWfld2boSACGJKzkBYIzv6bYOdVZHiG8YRZPoZ
	 c5j45FzaMbC4gcqOoT85r1m6Sau1V5sJAaI3zG22mHzIWk0mOxr9p/mFXXBF3GAC0r/7u
	 RNgytkQz2o3xpqeDhA70ZyyuPtSyhYS8q8y4YgYS+tOiAyz2Xi2nQp/RGpV/3Yz1inw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795521850;
	h=DMARC-Filter:Message-ID:DKIM-Signature:DKIM-Signature:Subject:From:
	 To:Cc:Date:In-Reply-To:References:Organization:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=dOtQLZCrhUQO5+77tG8G7mFA+K9A/7D/ufirbjE1Ndc=;
	b=fldbN4n0PgMA0x75uj12cwddBOvrmroseYWmsvcKNJU5nHGayky+TllYENYygb1gaATO
	 duN3+Pn32q2rMtK/6H/F/5KSy9XENZNMm3Q9TMSpFqCK5LeZpgdzwkT+PEEckgvYefw9y
	 HGw43VaSH2z5RExQll+4SA3l0bYSqigJXm5k4mswdl9quoZB1e1K8qhajYrvS3eiYr9+L
	 6+hfeWI8ymIjGwXgK1HMGw941y/nfU2wKzZfXPeU4zS+e7DAHiYlhpNzn/TSR9Jo9bEEx
	 CBQyr6FiMzdUWaYEwggrlvbyQuEOOVBV1ryo4YSMiV5kzH/adt/HJCuTjJcAGbEl4eA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linutronix.de;
	spf=pass smtp.mailfrom=linutronix.de;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=0RIDOwA3;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=kDmbdYqP;
	arc=none smtp.remote-ip=193.142.43.55
X-Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 625E3606A33B;
	Tue, 24 Nov 2026 12:04:09 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 625E3606A33B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020; t=1795521847;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=dOtQLZCrhUQO5+77tG8G7mFA+K9A/7D/ufirbjE1Ndc=;
	b=0RIDOwA3IRp+6mtG2XAbHpHG1LG4Drv4w4QJpDvVCmFAQYdbAhXbtRn6wZOXbAZfFanRAE
	Csq8cQH3IGtQmKsoePL+OxYJoDz0e6ltPfkrEZP3wR5gzlYdqnFdM0jAaBbRobwB1EFdeJ
	kdOUGE3MbEEKpnWJPIDrDdRdkkklYAzBxFLmW/8OvGeqIoGyBC5BEWOCMsutahjyiR7YoE
	dVrNnnKuik83Y4WQEqNtq5onoz01/ShIbre2MZb5xq4A2xUX24OimAowyOWGR9RIT3V0VD
	psQ9HL6XWvf1mKSCKIdkeHwXe1on/wacTpmohD+wUyVbi4qoILcHbBqtO7OrSg==
X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020e; t=1795521847;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=dOtQLZCrhUQO5+77tG8G7mFA+K9A/7D/ufirbjE1Ndc=;
	b=kDmbdYqPhCxpxPelHe40FjJ5MfVh7rjlk4AxUvLpjfZDFFPgXYlTgvV0mSOxvwhuATdmu4
	cldDa+pgcxafB9CQ==
X-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
X-In-Reply-To: <sashiko-outbox-227106@kernel.org>
X-Organization: Linutronix GmbH
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list