From: Alex Elder <elder@riscstar.com>
To: 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, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, linusw@kernel.org,
brgl@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org
Cc: daniel@riscstar.com, 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, matthew.gerlach@altera.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
Subject: Re: [PATCH net-next 00/12] net: enable TC956x support
Date: Fri, 15 May 2026 12:59:27 -0500 [thread overview]
Message-ID: <2414c9e9-0672-417a-a3d1-993bd06d62db@riscstar.com> (raw)
In-Reply-To: <20260501155421.3329862-1-elder@riscstar.com>
On 5/1/26 10:54 AM, Alex Elder wrote:
> This series introduces stmmac driver support for the Toshiba TC9564
> (also known as Qualcomm QPS615). This is an Ethernet-AVB/TSN bridge IC
> that provides a high-speed connection between a host SoC and Ethernet
> devices on a network. It incorporates a PCIe switch, and implements
> two 10 Gbps capable Ethernet MACs (along with other IP blocks), and
> is essentially a small and highly-specialized SoC. The TC9564 is a
> member of a family of similar chips, and the driver code uses "tc956x"
> to reflect this.
I'm writing now to just state what the plan is for version 2
of this series. I had hoped to get something out this week,
but it won't be available today, so I wanted to at least let
people know what to expect.
First, we received a great deal of really good feedback on
this series. I/we sincerely appreciate it, and have already
addressed almost all of the suggestions people have made.
Andrew Lunn asked a number of questions about the way that
the TC956x device is represented, and in particular questioned
whether having the GPIO controller as a device subordinate to
a PCIe function even made sense. This led to some additional
discussion, including some offline work exploring what other
options might be reasonable.
The plan for version 2 is to submit it fairly soon, to include
updates that address *most* of the feedback received so far.
(I have sent e-mail with clear confirmation of what we intend
to do--and these changes would be incorporated in version 2).
However, because there remain other outstanding issues,
including "big picture" questions about how to represent the
hardware, the series will be sent as RFC.
This will allow others to see the changes we made based on
feedback, but also makes it clear there is more work that
needs to be done before we're confident in our final proposal.
-Alex
> TC956x chips incorporate a PCIe gen 3 switch, with one upstream and
> three downstream ports. Its PCIe functionality is already supported
> upstream, including a power control driver that performs some early
> configuration of the PCI ports ("pci-pwrctrl-tc9563.c").
>
> One of the PCIe switch's downstream ports has an internal PCIe endpoint,
> which implements two PCIe functions, each of which has an Ethernet MAC
> (eMAC) subsystem. The eMAC is composed of a Synopsis Designware XGMAC
> combined with an XPCS and PMA. Each MAC is capable of operating at
> 10M/100M/1G/2.5G/5Gps and 10Gps. The initial target platform is the
> Qualcomm RB3gen2, which supports a 10Gbps Marvell PHY on port A, and
> a 2.5Gbps Qualcomm PHY on port B. (The Marvell PHY is not populated on
> all RB3gen2 boards, and only 2.5 Gbps support is included initially.)
>
> TC956x chips also implement several other blocks of functionality,
> including a GPIO controller, interrupt controllers (MSIGEN), I2C
> and SPI, a UART, and an Arm Cortex M3 CPU with 128KB SRAM. The GPIO
> interface exposes several lines to manage external resets. The
> interrupt controllers are used internally by the MAC functions. The
> UART, SPI, microcontroller, and SRAM are currently unused.
>
> ----------------------------------
> | Host |
> ------+...+----------+........+---
> |i2c| | PCIe |
> ----------------+...+----------+........+------
> | TC956x |I2C| |upstream| |
> | ----- --+--------+--- |
> | ----- ------ ------- | PCIe switch | |
> | |SPI| |GPIO| |reset| | | |
> | ----- ------ |clock| | DS3 DS2 DS1 | |
> | ------- ---++--++--++-- |
> | ----- ------ downstream// \\ \\ | downstream
> | |MCU| |SRAM| /==========/ \\ \===== PCIe port 1
> | ----- ------ //PCIe port 3 \\ |
> | || \======= downstream
> | ----+-----------++-----------+---- | PCIe port 2
> | | M | internal PCIe endpoint | M | |
> | | S |------------------------| S | ------ |
> | | I | PCIe | | PCIe | I | |UART| |
> | | G |function 0| |function 1| G | ------ |
> | | E |----++----| |----++----| E | |
> | | N | eMAC 0 | | eMAC 1 | N | |
> --------+.......+------+.....+-----------------
> |USXGMII| |SGMII|
> --+.......+-- --+.....+--
> | ARQ113C | | QEP8121 |
> | PHY | | PHY |
> ------------- -----------
>
> The primary objective for this series is to support the Ethernet
> functionality provided by the TC956x. The code providing this
> support has been structured into three distinct modules.
> - A driver for the GPIO controller
> - Code enabling the TC956x-specific eMAC/MSIGEN hardware
> - A "chip" driver, associated with the PCIe functions
>
> The GPIO driver is implemented separately because in some hardware
> configurations, these GPIO lines are used to manage resets for
> external Ethernet PHYs. We describe these PHYs via devicetree,
> where the GPIO-based reset signals are defined using phandles.
>
> The code for the eMAC/MSIGEN consists of a new source file that
> populates hardware-specific details about the two MACs, and integrates
> with the existing stmmac driver. This also required implementing some
> enhancements to the core stmmac driver, described further below.
>
> To manage the common functionality (including configuring address
> translation and controlling internal reset and clock signals), a
> "chip" driver is implemented. This chip driver is associated with
> the PCIe function *itself*, not the eMAC associated with the function.
>
> The driver binds to the internal PCI functions 0 and 1, and creates
> a shared data structure describing the common chip elements the two
> driver instances share. Three auxiliary bus devices are created to
> represent the GPIO controller and the two Synopsys MAC controllers.
>
> The driver instance for PCIe function 0 has responsibility for
> controlling the common chip functionality--creating the GPIO
> controller auxiliary device, configuring address translation
> between PCIe address space and internal addresses, and controlling
> clocks and resets. It creates a data structure--shared via its
> platform data pointer with PCIe function 1--to represent shared
> "chip" information. In addition, PCIe function 0 creates an
> auxiliary device to represent its attached eMAC. It allocates
> IRQs and maps BAR address ranges for use by the stmmac driver,
> passing them in a structure via the auxiliary device's platform
> data.
>
> PCIe function 1 defers probing until after PCIe function 0 has
> created the shared data structure. After that its only job is
> to set up IRQs and mapped memory and create the eMAC1 auxiliary
> device.
>
> The version of the Synopsys MAC IP is 3.01, which is largely compatible
> with version 2.20. The core stmmac driver required several changes to
> enable support for the TC956x.
> - A change to dwxgmac2 support changes the interrupt mode when
> multi_msi_en is enabled.
> - While most support for version 3.01 simply uses the 2.20 code,
> an erratum related to the RX ring length is implemented for
> 3.01 DMA operations.
> - Having the PCIe device be separate from an auxiliarly device
> implementing the eMAC required allowing a distinct DMA device
> to be maintained for an stmmac interface.
>
> In addition:
> - A new source file provides memory-mapped access to XPCS using
> regmap. The alignment of the TC956x MDIO registers aren't
> suitable for using simple MMIO.
> - Two additional XPCS changes are implemented that provides
> support for the XPCS as implemented in the TC956x.
>
> This series is available here:
> https://github.com/riscstar/linux/tree/tc956x/stmmac-v1
>
> -Alex (and Daniel)
>
> Alex Elder (3):
> net: stmmac: dma: create a separate dma_device pointer
> gpio: tc956x: add TC956x/QPS615 support
> misc: tc956x_pci: add TC956x/QPS615 support
>
> Daniel Thompson (9):
> net: pcs: pcs-xpcs-regmap: support XPCS memory-mapped MDIO bus via
> regmap
> net: pcs: pcs-xpcs: select operating mode for 10G-baseR capable PCS
> net: pcs: pcs-xpcs: Preserve BMCR_ANENBLE during link up
> net: stmmac: dwxgmac2: Add multi MSI interrupt mode
> net: stmmac: dwxgmac2: Add XGMAC 3.01a support
> net: stmmac: dwxgmac2: export symbols for XGMAC 3.01a DMA
> dt-bindings: net: toshiba,tc965x-dwmac: add TC956x Ethernet bridge
> net: stmmac: tc956x: add TC956x/QPS615 support
> arm64: dts: qcom: qcs6490-rb3gen2: enable TC9564 with a single QCS8081
> phy
>
> .../bindings/net/toshiba,tc956x-dwmac.yaml | 111 +++
> arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 45 +-
> drivers/gpio/Kconfig | 11 +
> drivers/gpio/Makefile | 1 +
> drivers/gpio/gpio-tc956x.c | 209 +++++
> drivers/misc/Kconfig | 10 +
> drivers/misc/Makefile | 1 +
> drivers/misc/tc956x_pci.c | 667 +++++++++++++++
> drivers/net/ethernet/stmicro/stmmac/Kconfig | 13 +
> drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +
> .../net/ethernet/stmicro/stmmac/chain_mode.c | 12 +-
> .../ethernet/stmicro/stmmac/dwmac-tc956x.c | 791 ++++++++++++++++++
> .../net/ethernet/stmicro/stmmac/dwxgmac2.h | 12 +
> .../ethernet/stmicro/stmmac/dwxgmac2_core.c | 1 +
> .../ethernet/stmicro/stmmac/dwxgmac2_descs.c | 1 +
> .../ethernet/stmicro/stmmac/dwxgmac2_dma.c | 78 +-
> .../net/ethernet/stmicro/stmmac/ring_mode.c | 12 +-
> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 +
> .../net/ethernet/stmicro/stmmac/stmmac_main.c | 59 +-
> .../net/ethernet/stmicro/stmmac/stmmac_xdp.c | 2 +-
> drivers/net/pcs/Makefile | 4 +-
> drivers/net/pcs/pcs-xpcs-regmap.c | 203 +++++
> drivers/net/pcs/pcs-xpcs.c | 43 +-
> include/linux/pcs/pcs-xpcs-regmap.h | 20 +
> include/linux/stmmac.h | 1 +
> include/soc/toshiba/tc956x-dwmac.h | 84 ++
> 26 files changed, 2341 insertions(+), 53 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/net/toshiba,tc956x-dwmac.yaml
> create mode 100644 drivers/gpio/gpio-tc956x.c
> create mode 100644 drivers/misc/tc956x_pci.c
> create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c
> create mode 100644 drivers/net/pcs/pcs-xpcs-regmap.c
> create mode 100644 include/linux/pcs/pcs-xpcs-regmap.h
> create mode 100644 include/soc/toshiba/tc956x-dwmac.h
>
>
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
prev parent reply other threads:[~2026-05-15 17:59 UTC|newest]
Thread overview: 99+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 15:54 [PATCH net-next 00/12] net: enable TC956x support Alex Elder
2026-05-01 15:54 ` [PATCH net-next 01/12] net: pcs: pcs-xpcs-regmap: support XPCS memory-mapped MDIO bus via regmap Alex Elder
2026-05-01 15:54 ` [PATCH net-next 02/12] net: pcs: pcs-xpcs: select operating mode for 10G-baseR capable PCS Alex Elder
2026-05-01 16:50 ` Andrew Lunn
2026-05-01 18:07 ` Alex Elder
2026-05-05 15:58 ` Daniel Thompson
2026-05-01 15:54 ` [PATCH net-next 03/12] net: pcs: pcs-xpcs: Preserve BMCR_ANENBLE during link up Alex Elder
2026-05-01 17:06 ` Andrew Lunn
2026-05-06 9:46 ` Daniel Thompson
2026-05-01 15:54 ` [PATCH net-next 04/12] net: stmmac: dma: create a separate dma_device pointer Alex Elder
2026-05-01 17:13 ` Andrew Lunn
2026-05-01 18:06 ` Alex Elder
2026-05-01 20:55 ` Andrew Lunn
2026-05-04 13:36 ` Alex Elder
2026-05-01 15:54 ` [PATCH net-next 05/12] net: stmmac: dwxgmac2: Add multi MSI interrupt mode Alex Elder
2026-05-01 17:21 ` Andrew Lunn
2026-05-01 15:54 ` [PATCH net-next 06/12] net: stmmac: dwxgmac2: Add XGMAC 3.01a support Alex Elder
2026-05-01 15:54 ` [PATCH net-next 07/12] net: stmmac: dwxgmac2: export symbols for XGMAC 3.01a DMA Alex Elder
2026-05-01 15:54 ` [PATCH net-next 08/12] dt-bindings: net: toshiba,tc965x-dwmac: add TC956x Ethernet bridge Alex Elder
2026-05-01 17:38 ` Andrew Lunn
2026-05-03 2:22 ` Alex Elder
2026-05-07 22:17 ` Alex Elder
2026-05-07 23:39 ` Rob Herring
2026-05-04 11:00 ` Krzysztof Kozlowski
2026-05-04 13:34 ` Alex Elder
2026-05-07 14:47 ` Daniel Thompson
2026-05-07 14:12 ` Bjorn Andersson
2026-05-07 14:19 ` Andrew Lunn
2026-05-07 16:12 ` Bjorn Andersson
2026-05-07 18:37 ` Alex Elder
2026-05-10 2:25 ` Bjorn Andersson
2026-05-07 23:41 ` Rob Herring
2026-05-01 15:54 ` [PATCH net-next 09/12] gpio: tc956x: add TC956x/QPS615 support Alex Elder
2026-05-01 18:36 ` Andrew Lunn
2026-05-03 1:45 ` Alex Elder
2026-05-03 2:48 ` Andrew Lunn
2026-05-07 18:39 ` Alex Elder
2026-05-03 3:05 ` Andrew Lunn
2026-05-06 18:21 ` Alex Elder
2026-05-06 19:43 ` Andrew Lunn
2026-05-06 20:25 ` Alex Elder
2026-05-06 21:43 ` Andrew Lunn
2026-05-06 22:41 ` Alex Elder
2026-05-03 3:42 ` Julian Braha
2026-05-06 18:51 ` Alex Elder
2026-05-04 12:46 ` Bartosz Golaszewski
2026-05-04 13:07 ` Alex Elder
2026-05-07 12:15 ` Linus Walleij
2026-05-07 12:20 ` Alex Elder
2026-05-01 15:54 ` [PATCH net-next 10/12] net: stmmac: " Alex Elder
2026-05-01 19:04 ` Andrew Lunn
2026-05-07 16:03 ` Daniel Thompson
2026-05-07 16:29 ` Andrew Lunn
2026-05-08 11:25 ` Daniel Thompson
2026-05-08 13:34 ` Andrew Lunn
2026-05-08 15:54 ` Daniel Thompson
2026-05-05 16:38 ` Mohd Ayaan Anwar
2026-05-05 16:46 ` Alex Elder
2026-05-06 2:30 ` Xilin Wu
2026-05-06 17:44 ` Alex Elder
2026-05-07 13:57 ` Xilin Wu
2026-05-07 14:14 ` Andrew Lunn
2026-05-11 15:41 ` Daniel Thompson
2026-05-06 12:59 ` Xilin Wu
2026-05-06 14:19 ` Andrew Lunn
2026-05-06 14:35 ` Xilin Wu
2026-05-06 14:45 ` Andrew Lunn
2026-05-06 15:38 ` Xilin Wu
2026-05-06 15:39 ` Daniel Thompson
2026-05-06 15:44 ` Xilin Wu
2026-05-06 15:56 ` Andrew Lunn
2026-05-06 16:00 ` Xilin Wu
2026-05-06 15:28 ` Daniel Thompson
2026-05-06 19:52 ` Andrew Lunn
2026-05-07 18:44 ` Alex Elder
2026-05-08 13:09 ` Xilin Wu
2026-05-08 13:36 ` Andrew Lunn
2026-05-08 13:41 ` Xilin Wu
2026-05-01 15:54 ` [PATCH net-next 11/12] misc: tc956x_pci: " Alex Elder
2026-05-01 21:07 ` Andrew Lunn
2026-05-03 2:06 ` Alex Elder
2026-05-02 16:45 ` Jakub Kicinski
2026-05-03 2:06 ` Alex Elder
2026-05-03 2:14 ` Jakub Kicinski
2026-05-03 2:23 ` Alex Elder
2026-05-01 15:54 ` [PATCH net-next 12/12] arm64: dts: qcom: qcs6490-rb3gen2: enable TC9564 with a single QCS8081 phy Alex Elder
2026-05-01 21:09 ` Andrew Lunn
2026-05-05 16:25 ` Daniel Thompson
2026-05-05 16:42 ` Mohd Ayaan Anwar
2026-05-05 16:46 ` Alex Elder
2026-05-08 14:03 ` Konrad Dybcio
2026-05-13 12:49 ` Daniel Thompson
2026-05-13 14:35 ` Andrew Lunn
2026-05-14 15:23 ` Daniel Thompson
2026-05-14 16:14 ` Andrew Lunn
2026-05-15 14:42 ` Daniel Thompson
2026-05-02 16:47 ` [PATCH net-next 00/12] net: enable TC956x support Jakub Kicinski
2026-05-03 2:07 ` Alex Elder
2026-05-15 17:59 ` Alex Elder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2414c9e9-0672-417a-a3d1-993bd06d62db@riscstar.com \
--to=elder@riscstar.com \
--cc=a0987203069@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andersson@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--cc=ast@kernel.org \
--cc=boon.khai.ng@altera.com \
--cc=bpf@vger.kernel.org \
--cc=brgl@kernel.org \
--cc=chenchuangyu@xiaomi.com \
--cc=chenhuacai@kernel.org \
--cc=conor+dt@kernel.org \
--cc=daniel@iogearbox.net \
--cc=daniel@riscstar.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hawk@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=inochiama@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=julianbraha@gmail.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=livelycarpet87@gmail.com \
--cc=matthew.gerlach@altera.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=me@ziyao.cc \
--cc=mohd.anwar@oss.qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=richardcochran@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh@kernel.org \
--cc=rohan.g.thomas@altera.com \
--cc=sdf@fomichev.me \
--cc=siyanteng@cqsoftware.com.cn \
--cc=weishangjuan@eswincomputing.com \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox