From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 850223EEACF for ; Tue, 9 Jun 2026 21:31:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781040720; cv=none; b=saGpJytUs9HlBvf9wy6VXnLKE0iJpHINz4G98jEYYsxG7B30mRsHmRCJ2N8Mi5ubHEQBzq2mENkcshihiLxHw37p51mujFArpA7SZVEfz/GiRqBuKlzRotg3YDav6IDWqE6CX4JvJl2xWqprb1+9iAaCamEdsMZIf3delhdNdPo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781040720; c=relaxed/simple; bh=WAiXRaxAM4Z1bZ828ygiu2QGKA8btwndyvH6LWkBmvs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hzqgfKD3z6uLz2gxqOwBHSIeib9j2hDOzEog126lbjYzbYKE96cvpwyfCtTyOM1SLN3F1kPVGlIZjQxkkAgtrAApCASiZDMaVtC++bi4ftJh984x7IINyFNGnsZtuatMlzeFSowgwA+66xZhEP0iY5dhXx3QRB31jgUOuZGT6yQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b=uoS8Wc2e; arc=none smtp.client-ip=209.85.167.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b="uoS8Wc2e" Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-4854166e1efso6014816b6e.3 for ; Tue, 09 Jun 2026 14:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1781040718; x=1781645518; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kQKbERiB0ntPOS/R2wMXRwGJAn2HHwIq3s8Tu7uVMO4=; b=uoS8Wc2e1VeGoY7G1XUBEHm43nmS5gaWrdYwUmiNUbR6nAUt8w6us5wXqa8zvD0j8H pElFvyvcXDwQRbA7XsXg25ZJRHvM8K6goHxTNObZ69eH7g4DY9o3ebLH0iTTxx0j3y5M VKauDGWMkjgBFheiP8YjscG+JfsiNeZJp9RizPBwnWb2BY01EYdCMVKjHh58PXuq6py0 aKLhGhGkk7vUvFMeaqQ3OwEj7d8vo+rsKGKph1+Ix/B9kDz3fL8ZlaUpliFLu5oek+3b oYjsUvyheB3NSko8ugKmu0mQq0yhwZCWmxtPvlx7+eF5c3u1n/XFljjOak4mPeOyK6q4 D2YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781040718; x=1781645518; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kQKbERiB0ntPOS/R2wMXRwGJAn2HHwIq3s8Tu7uVMO4=; b=BWkDwxCBuvdrKUO2lmqIYmkyAVVY1SIs4hP7UJT0aNmV5S7AuqkMAWhwIrGsXdyQPo dmAgbdSlmw2Wy6bzi1sqTMGbK703BVu4OCTcKDBND1fnbk6rx18OO0R4a056I6UDX8gb jOuoeQwYJ2/Bog3txVzJ34ddb7+NCWdleGIthYiTZQQP9dDpyDefV8kVBAZn0b+JdBzq m9+qUjlsNC9gkctdVEIHdSTeanS8So+ImajD18DIXlZBaex65aJBG8IJ5fAQFmbO6rSV 4w9ChCf8sg+uYl78I2T26SLvPoNunZJjsKYGwfeuO/d515fVkNgNoicMrrlS3JHyNGvT sUeQ== X-Forwarded-Encrypted: i=1; AFNElJ9UynqRl9S5Jl6az73lPEDN++Utdp0G1Ctem82aJg0WEOrVVflPhRcMuQYPr4MfaIgkhMeh94draxib7/k=@vger.kernel.org X-Gm-Message-State: AOJu0Yy6hEOArZMGVfiE11s6f6zLsvYm9FUE/KAR+XN5+luDIMp89pSI b4MBtnbzjqoXmC9HtUzRsIsoQ6lfiJ2WgzWTaJvBE9WyvYPBpKgh+3kxEzdQhChU1i8= X-Gm-Gg: Acq92OGvKZj/yUIoowcZpdk1C9kkP27/6+wN4Cn7Q7inFDfLdISPl+4NI9dmJOP8ZA6 vylKnDKgVgLv+NDL7TDw+YgChknfV3/sxzeMRfkfU7rlOuQV0cSI9kBKutO8HK7qOLsxIMmHfvu mqVyl3OkVM1lHx4R9Jo3Wc7qNY+pQOy9qKlOaN4PhaLwmZX+387dTN3YFaL8migeYDGTMlQlP/7 qL+7tLHG9ZdUVYjvW1R5QDAUL1B99b9+X15J4Es3rW/9Z3AFRY8ROdahQPAw8mMjN27X3xSPD7j /kCYGGyxr4Bl6GvIg1HvmAEZM6LYjxF2kJ40QHiwdgxhIYzGMYkovSN6l4HsqoIxGrt3kllOwCT IvmW+CsX4C5GyvIjCdwcPWjXiVQrF++fO2n60vBkofLFNNkqFXsiiO2QGfrjED+lgaLaY0a+M77 vP5L05QaGY2YNogy855/Kzcvc+rCTke60uqQPHE1/XnHjI X-Received: by 2002:a05:6808:4fe2:b0:485:a9b2:5457 with SMTP id 5614622812f47-4868df63ae3mr15052790b6e.35.1781040718541; Tue, 09 Jun 2026 14:31:58 -0700 (PDT) Received: from [172.22.22.28] ([73.62.185.64]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4865b5a5a64sm17024127b6e.4.2026.06.09.14.31.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Jun 2026 14:31:58 -0700 (PDT) Message-ID: Date: Tue, 9 Jun 2026 16:31:55 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v2 13/14] net: stmmac: tc956x: add TC956x/QPS615 support To: Rob Herring Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, maxime.chevallier@bootlin.com, rmk+kernel@armlinux.org.uk, andersson@kernel.org, konradybcio@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linusw@kernel.org, brgl@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, Daniel Thompson , mohd.anwar@oss.qualcomm.com, a0987203069@gmail.com, alexandre.torgue@foss.st.com, ast@kernel.org, boon.khai.ng@altera.com, chenchuangyu@xiaomi.com, chenhuacai@kernel.org, daniel@iogearbox.net, hawk@kernel.org, hkallweit1@gmail.com, inochiama@gmail.com, john.fastabend@gmail.com, julianbraha@gmail.com, livelycarpet87@gmail.com, mcoquelin.stm32@gmail.com, me@ziyao.cc, prabhakar.mahadev-lad.rj@bp.renesas.com, richardcochran@gmail.com, rohan.g.thomas@altera.com, sdf@fomichev.me, siyanteng@cqsoftware.com.cn, weishangjuan@eswincomputing.com, wens@kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260605010022.968612-1-elder@riscstar.com> <20260605010022.968612-14-elder@riscstar.com> <20260605144758.GB3659201-robh@kernel.org> Content-Language: en-US From: Alex Elder In-Reply-To: <20260605144758.GB3659201-robh@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/5/26 9:47 AM, Rob Herring wrote: > On Thu, Jun 04, 2026 at 08:00:20PM -0500, Alex Elder wrote: >> From: Daniel Thompson >> >> Toshiba TC956x is an Ethernet AVB/TSN bridge and is essentially a >> small and highly-specialized SoC. TC956x includes an "eMAC" subsystem >> that can be accessed, along with several other peripherals, via two >> PCIe endpoint functions. There is a main driver for the endpoint that >> decomposes things and creates auxiliary bus devices to model the SoC. >> >> The eMAC consists of a Designware XGMAC, XPCS and PMA. Each eMAC is >> supported by an MSIGEN that bridges TC956x level interrupts to PCIe >> MSIs. >> >> Add a driver for the eMAC/MSIGEN combination. >> >> Co-developed-by: Alex Elder >> Signed-off-by: Alex Elder >> Signed-off-by: Daniel Thompson > > The order is wrong here unless you worked on it and then Daniel took > over. Tags should be chronological order. I think this was a dumb reorder I did to address a complaint from checkpatch, but in any case I'll fix this. Yes, my signoff should "wrap" the others. >> --- >> MAINTAINERS | 2 + >> drivers/net/ethernet/stmicro/stmmac/Kconfig | 14 + >> drivers/net/ethernet/stmicro/stmmac/Makefile | 2 + >> .../ethernet/stmicro/stmmac/dwmac-tc956x.c | 818 ++++++++++++++++++ >> 4 files changed, 836 insertions(+) >> create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 0439607d1155f..418537cbefbbb 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -27059,6 +27059,8 @@ S: Maintained >> F: Documentation/devicetree/bindings/net/toshiba,tc956x-dwmac.yaml >> F: drivers/gpio/gpio-tc956x.c >> F: drivers/misc/tc956x_pci.c >> +F: drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c >> +F: include/soc/toshiba/tc956x-dwmac.h >> >> TOSHIBA WMI HOTKEYS DRIVER >> M: Azael Avalos >> diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig >> index e3dd5adda5aca..8d247e033e356 100644 >> --- a/drivers/net/ethernet/stmicro/stmmac/Kconfig >> +++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig >> @@ -404,6 +404,20 @@ config DWMAC_MOTORCOMM >> This enables glue driver for Motorcomm DWMAC-based PCI Ethernet >> controllers. Currently only YT6801 is supported. >> >> +config DWMAC_TC956X >> + tristate "Toshiba TC956X DWMAC support" >> + depends on PCI >> + depends on COMMON_CLK >> + depends on TOSHIBA_TC956X_PCI >> + default TOSHIBA_TC956X_PCI >> + select GENERIC_IRQ_CHIP >> + help >> + This selects the Toshiba TC956X (and Qualcomm QPS615) support in the >> + stmmac driver. >> + >> + This provides support for the ethernet controllers found on these >> + devices. >> + >> config STMMAC_PCI >> tristate "STMMAC PCI bus support" >> depends on PCI >> diff --git a/drivers/net/ethernet/stmicro/stmmac/Makefile b/drivers/net/ethernet/stmicro/stmmac/Makefile >> index a1cea2f57252e..e8e7f95dbe3e8 100644 >> --- a/drivers/net/ethernet/stmicro/stmmac/Makefile >> +++ b/drivers/net/ethernet/stmicro/stmmac/Makefile >> @@ -51,4 +51,6 @@ obj-$(CONFIG_STMMAC_PCI) += stmmac-pci.o >> obj-$(CONFIG_DWMAC_INTEL) += dwmac-intel.o >> obj-$(CONFIG_DWMAC_LOONGSON) += dwmac-loongson.o >> obj-$(CONFIG_DWMAC_MOTORCOMM) += dwmac-motorcomm.o >> +obj-$(CONFIG_TC956X_PCI) += tc956x-pci.o >> +obj-$(CONFIG_DWMAC_TC956X) += dwmac-tc956x.o >> stmmac-pci-objs:= stmmac_pci.o >> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c >> new file mode 100644 >> index 0000000000000..c77585e4a50e6 >> --- /dev/null >> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c >> @@ -0,0 +1,818 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> + >> +/* >> + * Copyright (C) 2026 by RISCstar Solutions Corporation. All rights reserved. >> + * >> + * Derived from code having the following copyrights: >> + * Copyright (C) 2011-2012 Vayavya Labs Pvt Ltd >> + * Copyright (C) 2025 Toshiba Electronic Devices & Storage Corporation >> + */ >> + >> +#include > > Based on the block diagram, these are PCI devices. Auxiliary bus is the > wrong thing to use here. As I said in the other message, I'm going to rearrange this to use pci-ep-bus and platform drivers. Most of the core code should be stay the same but the overall structure will change. Thanks for your suggestions. -Alex > > Rob