Article View: linux.kernel.netdev
Article #15950Re: [PATCH net-next v4 4/8] dt-bindings: mfd: Add SoC-e SWIP parent
From: Vasilij Strassheim
Date: Fri, 13 Nov 2026 18:58
Date: Fri, 13 Nov 2026 18:58
149 lines
16016 bytes
16016 bytes
On Tue, 2026-11-10 at 13:21 -0600, Rob Herring wrote: > On Tue, Nov 10, 2026 at 05:10:15PM +0100, Vasilij Strassheim wrote: > > On Fri, 2026-11-06 at 22:51 +0100, Vasilij Strassheim wrote: > > > On Fri, 2026-11-06 at 12:13 +0100, Krzysztof Kozlowski wrote: > > > > On Thu, Nov 05, 2026 at 03:16:48PM +0100, Vasilij Strassheim wrote: > > > > > Add a binding for the SoC-e SWIP multifunction FPGA IP core. > > > > > > > > > > Describe the shared MMIO address space and address translation for > > > > > the required Ethernet switch child and the optional integrated MDIO > > > > > controller and MMIO-controlled MDIO multiplexer. > > > > > > > > > > Signed-off-by: Vasilij Strassheim <v.strassheim@linutronix.de> > > > > > --- > > > > > .../devicetree/bindings/mfd/soce,swip.yaml | 137 +++++++++++++++++++++ > > > > > 1 file changed, 137 insertions(+) > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/mfd/soce,swip.yaml b/Documentation/devicetree/bindings/mfd/soce,swip.yaml > > > > > new file mode 100644 > > > > > index 000000000000..625be299e262 > > > > > --- /dev/null > > > > > +++ b/Documentation/devicetree/bindings/mfd/soce,swip.yaml > > > > > @@ -0,0 +1,137 @@ > > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > > +%YAML 1.2 > > > > > +--- > > > > > +$id: http://devicetree.org/schemas/mfd/soce,swip.yaml# > > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > > > + > > > > > +title: SoC-e SWIP multifunction Ethernet switch FPGA IP core > > > > > + > > > > > +maintainers: > > > > > + - Vasilij Strassheim <v.strassheim@linutronix.de> > > > > > + > > > > > +description: > > > > > + SoC-e Switch IP (SWIP) cores integrate Ethernet switching logic, an > > > > > + MDIO controller, and an MDIO bus multiplexer in one memory-mapped device. > > > > > + The MDIO bus multiplexer is wired to the integrated MDIO controller. > > > > > + > > > > > +properties: > > > > > + compatible: > > > > > + const: soce,swip > > > > > + > > > > > + reg: > > > > > + maxItems: 1 > > > > > + > > > > > + '#address-cells': > > > > > + const: 1 > > > > > + > > > > > + '#size-cells': > > > > > + const: 1 > > > > > + > > > > > + ranges: true > > > > > + > > > > > + mdio@204: > > > > > + $ref: /schemas/net/soce,swip-mdio.yaml# > > > > > + unevaluatedProperties: false > > > > > + > > > > > + mdio-mux@202: > > > > > + $ref: /schemas/net/mdio-mux-mmioreg.yaml# > > > > > + unevaluatedProperties: false > > Given the MDIO bus and mux registers are adjacent, I don't know that > putting the mux into its own node and driver really buys you anything. > Can't your MDIO driver handle the muxing directly? mdio-mux-mmioreg was > created for when you have mux registers in some completely unrelated > block. > What it buys me is less custom code to maintain for bus selection and selector-value validation. The MDIO controller and mux were combined in a previous version. Following Andrew's suggestion [1], I moved the controller into its own driver and stacked mdio-mux-mmioreg on top of it. Sure, the selector is part of the same MDIO control register. But the generic driver already provides the masked register update and selector-value checks. My preference is to keep the current approach to reuse existing code, even if it requires some integration and documentation efforts. I don't mind changing to a combined MDIO controller and mux, as done in mdio-mux-bcm6368.c, while still using the generic MDIO mux core. Could we agree on the preferred approach so that the binding and driver changes stay aligned? > > > > > + > > > > > + ethernet-switch: > > > > > > > > Why are you mixing children with and without bus addresses? This is > > > > discouraged and shows that device is not correctly represented, e.g. if > > > > the ethernet-switch does not have resources, then THIS device is the > > > > ethernet switch. > > > > > > > > > > There is no hardware reason for leaving the switch child unaddressed. > > > Just an error that occurred while converting the binding to the MFD > > > model. > > > I will describe the switch function as an ethernet-switch@0 child node > > > with a reg property for it's register resources, like the ocelot MFD > > > binding. > > > > It looks like I need a different name for the MFD parent to avoid a > > naming collision with the ethernet-switch@0 child. I checked other > > bindings but could not find a suitable example. > > > > I would appreciate any suggestions for a suitable name for the parent > > node representing the FPGA IP core. It mainly acts as a container for > > its child devices. I am considering "bus", "ip-core" or "shell". > > Krzysztof's point was combine the child and parent nodes into the > parent. This is not really an MFD. Almost every ethernet MAC has an MDIO > controller in it and none of those bindings are MFDs. The suggestion to consider an MFD also came from Andrew in an earlier discussion [2]. Since this FPGA design contains several functional blocks, I liked the approach of grouping them under a common parent. The IP core can also include an I2C master for accessing external devices as a synthesis option. It also supports synchronization with external PPS and 10 MHz reference signals. I had future Linux support for these functions in mind. Ocelot is another switch described as an MFD, with additional functions such as GPIO and pin control. I am open to either approach. Could we agree on the preferred hardware model before I update the binding and driver? I can also provide more information if any hardware details are still unclear. > > Rob Thanks, Vasilij
Technical Details
Message-ID:
<5a6183e3480a0d910e275acf591e2db8700da827.camel@linutronix.de>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362857-linux-kernel-netdev=dewy.ruReferences:
<20261105-devel-vstrassheim-soce-dsa-ml-v4-0-02f3cde2afa1@linutronix.de> <20261105-devel-vstrassheim-soce-dsa-ml-v4-4-02f3cde2afa1@linutronix.de> <20261106-judicious-penguin-of-enhancement-b28c8b@quoll> <f5c7c9901aca84f0b814e5b6c153db84af826dd7.camel@linutronix.de> <cc35b2127b04772f05948ac51c8faa5ef07da0b0.camel@linutronix.de> <20261110192118.GA1412882-robh@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362857-linux-kernel-netdev=dewy.ru From: v.strassheim@linutronix.de (Vasilij Strassheim) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v4 4/8] dt-bindings: mfd: Add SoC-e SWIP parent Date: Fri, 13 Nov 2026 19:58:21 +0100 Organization: Usenet Network Message-ID: <5a6183e3480a0d910e275acf591e2db8700da827.camel@linutronix.de> References: <20261105-devel-vstrassheim-soce-dsa-ml-v4-0-02f3cde2afa1@linutronix.de> <20261105-devel-vstrassheim-soce-dsa-ml-v4-4-02f3cde2afa1@linutronix.de> <20261106-judicious-penguin-of-enhancement-b28c8b@quoll> <f5c7c9901aca84f0b814e5b6c153db84af826dd7.camel@linutronix.de> <cc35b2127b04772f05948ac51c8faa5ef07da0b0.camel@linutronix.de> <20261110192118.GA1412882-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1429085"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:L2n+HTm6N9pA+epb889n7HEWCQE= sha256:aQNIm+pLzOW1nkyYAP25NgzYD1nzvKbTQP+MZJFd4Dc= sha1:3sE3Gnp37lsaQhS6yMmHfVPQ7b8= sha256:272uIlTComVO4qOkQLE+f0Kbi+032crOv1MIYyejkO0= 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 EEF92114589; Fri, 13 Nov 2026 23:14:46 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.95 X-Spam-Status: No, score=-1.95 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, 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, URIBL_BLOCKED=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=Nsa5LHdz; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b=+/Q+661T 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 7lnhDm1rV80f; Fri, 13 Nov 2026 23:14:42 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-362857-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id C110011464D; Fri, 13 Nov 2026 23:14:28 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 9936134648E; Fri, 13 Nov 2026 19:01:56 +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=1794596307; b=BBtGda5IfoOxBoq3EmVQkdW6VihKIpCbaMioRzAbNDR9kcuEmjxdHs+suimmBE4qxY5f HIHhOwA+7pyROijqoBpBvRgSmbBAZruJFslxFu76M04su4ol8MV7gkL5HfMhPH5sWNvAm jY7SHrH4OHjPF9IN0ORXDmyNynLIY78VDpIfC9LfKa9NgF2PUehqKv/ZKID4lUzUjgWeO 0QhZD3bCCn+MwNOH7AlqEgvwcatOrPZifsvYPgdaMzZL2zX9FN9RNbJOiT7vEiNmBCB9A StMlXzcflW0tuFCRR83y8PmBMBU3UX2CXkZr/qDdtJ53uH8BXXZIa+zbUpFe1PoepTg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794596307; 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=lEeskuJPkdiI8gE2TYZrxOjdiP0LZZey/2Bh096XvUk=; b=jbJWx4nC8VsFigUavFw4t3iEO4HyxKlT6lU0suTa5JtqBP7pxmSo/PgvfEUpww7ypbfa yb2lNNXoGnvLv3bdRMoWxInKY6tiNFrEsnDeILTQDbBOHb7j3FaBIu4Sd5glllMzcg+bV BH8c92igJBmDueO1k9lA/7P+08OQ77fqUtN5UZTVS+EwcIuFkp8qnsINNCpTvuVxCPjwb 3t/3bJy3VJOZm88MfynUBMIyKE6QS9A0+1uujntuH7vX71Ek/hcXwSUoiGIx0P5Hyzefp 2dHacCkqfnZTdKFPzUSjaWlaokpaqHrEHzq+7vjN27YtNPyOF3oDH1FknSCBRR7iF5A== 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=Nsa5LHdz; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b="+/Q+661T"; 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 D294C6071079; Fri, 13 Nov 2026 18:58:27 +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=Nsa5LHdz; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=+/Q+661T 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=1794596307; b=W84tTn2GzDw842WBCb+8h+7EZA5uYZeBBafkNmWzJka+ohPkFJTpFfIYdFhf/9WgIbaS jxRpzY8qY7ueJ58KtKRXtl7gLq04N4LZDC7bsSrSQ5Irbd3nhG/DygYWrEZ7fYKbmRb+K jPgVyI0GaqaQmZoyYjGI+W/adZtjBrrgscBBCbe2sR3xBz34Z9FGpztXGJ+HAkwdBrbKR ggfeSEjTsxa4WExUg6KEeHQ9JrPPNKbAf/+SV7/G+TLTvWF9MmAuq1705QEgO3gOT67YV 3O+P56sURtpeJvJGGPiewqnNRpiDF4GFYK/bfgWw58qEU0xI0HlmyHd+0+Gd+2/ndkg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794596307; 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=lEeskuJPkdiI8gE2TYZrxOjdiP0LZZey/2Bh096XvUk=; b=Ic/u5TAUfed0xmSi3K3Bzsi3IhsZ3Mc6JmzbexayKRXhI3AtLLGZ0dyFZW/6xzXLO0TN ZQnoM51mdBkNR6KRL41Kw9bRVTCmwtIXSs4zF4sb5NP4camMAEheqsbZR9vH3mLJoPus9 Tfo0PntJmUp4OaN8BD3M8qU6mV/+L6/PyHNfDpRVuBbosY+HxIDkgdfJ8lYmpmPtWEEl9 R0jZ4M1JqIRCzZX1/vLjZDaguFWRTvi1FiY/02rBjBk9yaDrymLF1sHZut2/Cqoo/csKU Mmb3BlVJHxkrXqmIlzMosWtuoiDKX/gTHC3daaBjQpfEJV/7tj17PQsxCqRxDoSt+9A== 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=Nsa5LHdz; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b="+/Q+661T"; 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 379D16071069; Fri, 13 Nov 2026 18:58:25 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 379D16071069 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=1794596304; 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=lEeskuJPkdiI8gE2TYZrxOjdiP0LZZey/2Bh096XvUk=; b=Nsa5LHdz+ZYikhtmHbjxEddO/69fFul88+8iEoKxSL3lTvhRV1XLziHTU3MeQJ3m85tJeb 2Kd2ZM3rvEnfGugLwHF3OZt+vfXsl3gaBBE7aGESxEYk2fh/Xs6aWabHfnXb6qozVC3Ijc btF/VsGDwPDS7lJzT0J1HHBG6C4hnnDf2PUHntndrG6ju0R13uLb6VnDbkxPpQoCOpILUq uFekou8wbBekyhInQWdA9plgpMznKFC8iTfKdW8K1FaXLC6BZ0lKADdgf/QHcvjbhXAF/S s89ezdujqXDPsv8Za0myV9KOVA+64E+v3yvyI2gKyWq6ddU7nkBrP3KWiT17UQ== X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1794596304; 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=lEeskuJPkdiI8gE2TYZrxOjdiP0LZZey/2Bh096XvUk=; b=+/Q+661TL+IzyNJ7cFVuJ+g+Wd94X6upSp9cBnHdlJnTfdeNxCSPFyYNSd6A5eAhlhLKSm HqZhgCH0i26RAqBw== X-Cc: 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>, Benedikt Spranger <b.spranger@linutronix.de> X-In-Reply-To: <20261110192118.GA1412882-robh@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