From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796304452; b=IjSjR01/i/5L/4/uvfV5+wvNJ+Lzbbzpr0X1HGQCrdGnt0nRKY6KvTsvAdA/3r/mRUhu lkORCQvw+MLTyn5GhE0aFs5QJHFp08GgnzOkf1KaNJLtOfTlzRawcq/R5M4uNqvcz3wbo mkBTer9UAp10DMWPHVpVtxbppABuof8jxcMygIHqCdf4gxzVTfDIGnfQy9vAk6jqaNNH4 WhrskOOvFSyg3OqoMt3riwv1s0/f7zP8TR3rWjTcOdMG/P39JxaWnYoVUor7SblcXEC9X GSba3BHBzMFVQ91jtonRJjIZI7Sq4duQt6O88g/Zub6VKiqA9Sgnk1JUw5P6P6qz0HA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796304452; h=DMARC-Filter:Date:DKIM-Signature:DKIM-Signature:From:To:Cc:Subject: Message-ID:In-Reply-To:References:Organization:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=RKV3QJpLr37TlPvoIP8yWXJlmrM5xdmBATQX3PC/Kt0=; b=UKpiQVWx6q4ocNMInLq4FrIFgPz31WLFv9BJhK9M/sDcIYp33YPDCZZIpzZrcB1phj3K 1DbjUWM5Aw+yXt5Eh1CWNlLLq8TagP1kcwM3cJfLOBhCeaXYM9GeVqEzK3yJYA8mW+bxA v3/6Q88CTSuoJ2M/K1PYZVdSGMunG5uc7sM/5Ipzae8k8mX+dPO6S2yLM72KbQKFAzMgv v+Hk96WS4fhJD6DNE8jIqTwr6g0Gp80ab1Z7wcMULUnBs1OBfHcHE+JjG5xa8KDh1qnba sdEtyLyUAUAJNMSzBp3Tyv5NYnZBth5qDCpo/m1zgfVRQ4To/HCPezLhQFI/L3fNbSw== 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=KK8Aa7F5; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=cX8JcVQB; arc=none smtp.remote-ip=193.142.43.55 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 964C6606A33E; Thu, 3 Dec 2026 13:27:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 964C6606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de 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=KK8Aa7F5; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=cX8JcVQB Date: Thu, 3 Dec 2026 14:27:27 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796304449; 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=RKV3QJpLr37TlPvoIP8yWXJlmrM5xdmBATQX3PC/Kt0=; b=KK8Aa7F5RYC1a0x4a+ftYwbH0XVowPsH2si0gOktzVqXk4i2TSco7JVJbEVl0rPZ3TRjGw 1BJN+YBWNIrrAmMieIzQbF60tsya11HS904FafRoQzLVxC1BHBS7QmOW7W2OY19B+e3nHx gk4QKR86AnbwcZM/ssZBofuoBr+2BtUYP7PWYEj8g/hAJgCBWSHP6mRLkY+kIk5uuHPSyG sdIvidjJCZixURNcrLv99O5XcJyrYPQCxX5PGFvpB7BQ4Drc9AjNhRMyLmDPs3gjBgvtMT k6vaivzXzQeQpT+CZ/CoMd2uzo5ShfSWr2OMASLSKbhY48arwDc5WWeTolGOGg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796304449; 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=RKV3QJpLr37TlPvoIP8yWXJlmrM5xdmBATQX3PC/Kt0=; b=cX8JcVQBd6HO3rL0P6+AKhfaKnW/MU5iwSPNhG/dWBv3Wa02KUtORry466eOv6OTckJIFM JeTlUnW2st9IlkAQ== From: Benedikt Spranger To: Rob Herring 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: <20261203142727.00b19361@mitra> In-Reply-To: <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> <20261202183543.GA4076212-robh@kernel.org> Organization: Linutronix GmbH X-Mailing-List: devicetree@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-Transfer-Encoding: 7bit On Wed, 2 Dec 2026 12:35:43 -0600 Rob Herring wrote: > 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: > > 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. Vasilij mentioned the different IPs and I thought it was clear enough. That's our fault... > 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. Here the things start to become *REALLY* messy: The Switch IP itself is a shell. It contains different IPs: The switch itself, an interrupt controller, the MDIO controller, the MDIO mux, an I2C controller, and so on. Some of these IP blocks need a runtime license to be enabled. The license management is dealt in hardware, so no interaction is needed by the linux driver. But to handle these IPs by a driver, we need to enable/disable parts of the device tree at runtime. MFD cells are handy here. And there are variants. What makes it hard to handle is, that these variants share same IPs on different addresses or even worse use the same registers with different layout. Vasilij is working on that (regmap). And there are PCIe cards with this switch... > > 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? Yes. In the config space (a RO register space) are information stored about what IPs are available and unsable. BUT thre are also informations whitch are needed by the individual drivers. > Or the child drivers will access the config space? As described above: Both need access. > 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. For now: yes. But we have to handle the variants and runtime license stuff. With that in mind I am not shure. > 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? For now we are not talking about runtime reload or reconfiguration of the FPGA. Therfore the config space is fixed during runtime. Regards Bene