From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796236547; b=b14R6J9aO1FOArzCy7/csSN+jUP3t8usaZZhGt0txmOEYgH04eh1PGGlDa3ghymbfLmu 324XotfMIvyGnMiCOygUxLGLUmHX+ki9KnRT6gmWepgyxob2m6iWxiVH7Dawdl+uGv1tD AfvX6xzW+NlWGybsaEnX2B6wMshdM9HZfzMbIxUjL9A8w11nGo36GBpARRicv9tcVtw5P v6B0iw7Avfo2FediivPucchQxjTVlyCoTWlZ5izAuHWM0kW4KO4ermYtQ95bMNp7uf137 A+Oy4OXRjOMG+hdeNFAnaZTxOGktm2+aMztYOLRj1csurqdBAncTz7OQmUl1j2Yc2zQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796236547; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=mtPR9399hCWKgXhlSlWtq0F0mIlEt1pm4QPYDDEgptI=; b=kjc5lI1HtHA9hArAjQCzSeqcEuFJ7w1Ly+/XcZYb/Ju85Ht08Ijq6Oj771L5p15HnzCi 0iQPDrjIMJgVvbgMaj/Sf+rcM2roAEg6JHdReWVEqjz3fWN9/VNAuhMbnnACPObHDqg8D 9t4Erl4GxEcdTdxf9UKOy0En/Xda3eltW2a1Unfktm4BElmByQhpJUB6WywRCK2XyY4cI 20fpGZq6dqriCwxwLksOV6fw9M05TCQVdsD0qxjtLmdSzwUQBT/JhYN0dKA7R5jRX/AR6 6P9wjXu3+wK52s4je2ZBj6HGqYwQ3M4MhKt21KyOY6i0Dm8DfIxu6PCHSjYqnJ4vn0w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cYLQ3iBq; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C877606A69B; Wed, 2 Dec 2026 18:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cYLQ3iBq Received: by smtp.kernel.org (Postfix) with ESMTPSA id 547FF1F0089A; Wed, 2 Dec 2026 18:35:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796236546; bh=mtPR9399hCWKgXhlSlWtq0F0mIlEt1pm4QPYDDEgptI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=cYLQ3iBqRu6+LR2McLSGiKAX5sXH076JPI/kztIxCeGIFy9Xo0OnKqYB5Eb9Jn/CV iOu9U6ggTJD0ywNcO/03DxCmvErY6Jf5A9/ywSweTmAL5rsljmC7+Xb5EYsLYKdmuD Q39PkqtPG18OCdQzazHg58FBjHs/gu03oEBNuTPf/+zfUuzTaLShKG8hs4Q7P4zUGl n49lotzdw5dA1vBw/4fQT9/4gBXqSFTmmArx04BVjImfTyeGc6GbihQU82sIIiA1DP 3Paz2xgZ0AuNTrryfRHQ38bJvOXQgjlEWfSthXWIyGvwHAK0knFXUWpq4ZdUy4/OJv VD92ogkTzNwoA== Date: Wed, 2 Dec 2026 12:35:43 -0600 From: Rob Herring To: Benedikt Spranger Cc: Vasilij Strassheim , Krzysztof Kozlowski , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Simon Horman , Russell King , Andrew Lunn , Heiner Kallweit , Eric Dumazet , Lee Jones , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, mfd@lists.linux.dev, Martin Kaistra Subject: Re: [PATCH net-next v5 4/9] dt-bindings: mfd: Add SoC-e SWIP parent Message-ID: <20261202183543.GA4076212-robh@kernel.org> References: <20261120-devel-vstrassheim-soce-dsa-ml-v5-0-5de9225715e6@linutronix.de> <20261120-devel-vstrassheim-soce-dsa-ml-v5-4-5de9225715e6@linutronix.de> <20261121-lurking-bulky-crab-b9619f@quoll> <4d56bd92d27429c3ac2cbcefac74c0327b3b3af8.camel@linutronix.de> <20261201224803.GA3882869-robh@kernel.org> <20261202112644.483fd845@mitra> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261202112644.483fd845@mitra> On Wed, Dec 02, 2026 at 11:26:44AM +0100, Benedikt Spranger wrote: > On Tue, 1 Dec 2026 16:48:03 -0600 > Rob Herring 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