[PATCH 00/11] net: wwan: t9xx: Add MediaTek T9XX WWAN driver

Jack Wu via B4 Relay posted 11 patches 1 week, 3 days ago
.../networking/device_drivers/wwan/t9xx.rst        |   48 +
MAINTAINERS                                        |   10 +
drivers/net/wwan/Kconfig                           |   17 +
drivers/net/wwan/Makefile                          |    1 +
drivers/net/wwan/t9xx/Makefile                     |   16 +
drivers/net/wwan/t9xx/mtk_ctrl_plane.c             |   95 +
drivers/net/wwan/t9xx/mtk_ctrl_plane.h             |   88 +
drivers/net/wwan/t9xx/mtk_data_plane.c             |  104 +
drivers/net/wwan/t9xx/mtk_data_plane.h             |  105 +
drivers/net/wwan/t9xx/mtk_dev.c                    |   55 +
drivers/net/wwan/t9xx/mtk_dev.h                    |  114 +
drivers/net/wwan/t9xx/mtk_fsm.c                    |  931 +++++++
drivers/net/wwan/t9xx/mtk_fsm.h                    |  140 +
drivers/net/wwan/t9xx/mtk_port.c                   |  967 +++++++
drivers/net/wwan/t9xx/mtk_port.h                   |  176 ++
drivers/net/wwan/t9xx/mtk_port_io.c                |  576 +++++
drivers/net/wwan/t9xx/mtk_port_io.h                |   41 +
drivers/net/wwan/t9xx/mtk_utility.h                |   33 +
drivers/net/wwan/t9xx/mtk_wwan.c                   |  475 ++++
drivers/net/wwan/t9xx/mtk_wwan.h                   |   17 +
drivers/net/wwan/t9xx/pcie/Makefile                |   19 +
drivers/net/wwan/t9xx/pcie/mtk_cldma.c             | 1527 +++++++++++
drivers/net/wwan/t9xx/pcie/mtk_cldma.h             |  176 ++
drivers/net/wwan/t9xx/pcie/mtk_cldma_drv.c         |  373 +++
drivers/net/wwan/t9xx/pcie/mtk_cldma_drv.h         |  174 ++
drivers/net/wwan/t9xx/pcie/mtk_cldma_drv_m9xx.c    |  177 ++
drivers/net/wwan/t9xx/pcie/mtk_cldma_drv_m9xx.h    |  101 +
drivers/net/wwan/t9xx/pcie/mtk_ctrl_cfg_m9xx.c     |   55 +
drivers/net/wwan/t9xx/pcie/mtk_dpmaif.c            | 2714 ++++++++++++++++++++
drivers/net/wwan/t9xx/pcie/mtk_dpmaif.h            |   16 +
drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv.c        | 1586 ++++++++++++
drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv.h        |  268 ++
drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv_m9xx.c   |  687 +++++
drivers/net/wwan/t9xx/pcie/mtk_dpmaif_reg.h        |  387 +++
drivers/net/wwan/t9xx/pcie/mtk_dpmaif_reg_m9xx.h   |   37 +
drivers/net/wwan/t9xx/pcie/mtk_dpmaif_ring.c       |  168 ++
drivers/net/wwan/t9xx/pcie/mtk_dpmaif_ring.h       |  161 ++
drivers/net/wwan/t9xx/pcie/mtk_pci.c               | 1067 ++++++++
drivers/net/wwan/t9xx/pcie/mtk_pci.h               |  219 ++
drivers/net/wwan/t9xx/pcie/mtk_pci_drv_m9xx.c      |   70 +
drivers/net/wwan/t9xx/pcie/mtk_pci_reg.h           |   72 +
drivers/net/wwan/t9xx/pcie/mtk_trans_ctrl.c        |  593 +++++
drivers/net/wwan/t9xx/pcie/mtk_trans_ctrl.h        |  105 +
43 files changed, 14761 insertions(+)
[PATCH 00/11] net: wwan: t9xx: Add MediaTek T9XX WWAN driver
Posted by Jack Wu via B4 Relay 1 week, 3 days ago
T9XX is the PCIe host device driver for MediaTek's
t900 modem. The driver uses the WWAN framework
infrastructure to create the following control ports
and network interfaces for data transactions.
* /dev/wwan0at0 - Interface that supports AT commands.
* /dev/wwan0mbim0 - Interface conforming to the MBIM
  protocol.
* wwan0-X - Primary network interface for IP traffic.

The main blocks in the T9XX driver are:
* HW layer - Abstracts the hardware bus operations for
   the device, and provides generic interfaces for the
   transaction layer to get the device's information and
   control the device's behavior. It includes:

   * PCIe - Implements probe, removal and interrupt
     handling.
   * MHCCIF (Modem Host Cross-Core Interface) - Provides
     interrupt channels for bidirectional event
     notification such as handshake and port enumeration.

* Transaction layer - Implements data transactions for
   the control plane and the data plane. It includes:

   * DPMAIF (Data Plane Modem AP Interface) - Controls
     the hardware that provides uplink and downlink
     queues for the data path. The data exchange takes
     place using circular buffers to share data buffer
     addresses and metadata to describe the packets.
   * CLDMA (Cross Layer DMA) - Manages the hardware
     used by the port layer to send control messages to
     the device using MediaTek's CCCI (Cross-Core
     Communication Interface) protocol.
   * TX Services - Dispatch packets from the port layer
     to the device.
   * RX Services - Dispatch packets to the port layer
     when receiving packets from the device.

* Port layer - Provides control plane and data plane
   interfaces to userspace. It includes:

   * Control Plane - Provides device node interfaces
     for controlling data transactions.
   * Data Plane - Provides network link interfaces
     wwanX (0, 1, 2...) for IP data transactions.

* Core logic - Contains the core logic to keep the
   device working. It includes:

   * FSM (Finite State Machine) - Monitors the state
     of the device, and notifies each module when the
     state changes.

The compilation of the T9XX driver is enabled by the
CONFIG_MTK_T9XX and CONFIG_MTK_T9XX_PCI config option
which depends on CONFIG_WWAN.

---
Jack Wu (11):
      net: wwan: t9xx: Add PCIe core
      net: wwan: t9xx: Add control plane transaction layer
      net: wwan: t9xx: Add control DMA interface
      net: wwan: t9xx: Add control port
      net: wwan: t9xx: Add FSM thread
      net: wwan: t9xx: Add AT & MBIM WWAN ports
      net: wwan: t9xx: Introduce data plane hardware
      net: wwan: t9xx: Add data plane transaction layer
      net: wwan: t9xx: Introduce WWAN interface
      net: wwan: t9xx: Add power management support
      net: wwan: t9xx: Add maintainers and documentation

 .../networking/device_drivers/wwan/t9xx.rst        |   48 +
 MAINTAINERS                                        |   10 +
 drivers/net/wwan/Kconfig                           |   17 +
 drivers/net/wwan/Makefile                          |    1 +
 drivers/net/wwan/t9xx/Makefile                     |   16 +
 drivers/net/wwan/t9xx/mtk_ctrl_plane.c             |   95 +
 drivers/net/wwan/t9xx/mtk_ctrl_plane.h             |   88 +
 drivers/net/wwan/t9xx/mtk_data_plane.c             |  104 +
 drivers/net/wwan/t9xx/mtk_data_plane.h             |  105 +
 drivers/net/wwan/t9xx/mtk_dev.c                    |   55 +
 drivers/net/wwan/t9xx/mtk_dev.h                    |  114 +
 drivers/net/wwan/t9xx/mtk_fsm.c                    |  931 +++++++
 drivers/net/wwan/t9xx/mtk_fsm.h                    |  140 +
 drivers/net/wwan/t9xx/mtk_port.c                   |  967 +++++++
 drivers/net/wwan/t9xx/mtk_port.h                   |  176 ++
 drivers/net/wwan/t9xx/mtk_port_io.c                |  576 +++++
 drivers/net/wwan/t9xx/mtk_port_io.h                |   41 +
 drivers/net/wwan/t9xx/mtk_utility.h                |   33 +
 drivers/net/wwan/t9xx/mtk_wwan.c                   |  475 ++++
 drivers/net/wwan/t9xx/mtk_wwan.h                   |   17 +
 drivers/net/wwan/t9xx/pcie/Makefile                |   19 +
 drivers/net/wwan/t9xx/pcie/mtk_cldma.c             | 1527 +++++++++++
 drivers/net/wwan/t9xx/pcie/mtk_cldma.h             |  176 ++
 drivers/net/wwan/t9xx/pcie/mtk_cldma_drv.c         |  373 +++
 drivers/net/wwan/t9xx/pcie/mtk_cldma_drv.h         |  174 ++
 drivers/net/wwan/t9xx/pcie/mtk_cldma_drv_m9xx.c    |  177 ++
 drivers/net/wwan/t9xx/pcie/mtk_cldma_drv_m9xx.h    |  101 +
 drivers/net/wwan/t9xx/pcie/mtk_ctrl_cfg_m9xx.c     |   55 +
 drivers/net/wwan/t9xx/pcie/mtk_dpmaif.c            | 2714 ++++++++++++++++++++
 drivers/net/wwan/t9xx/pcie/mtk_dpmaif.h            |   16 +
 drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv.c        | 1586 ++++++++++++
 drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv.h        |  268 ++
 drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv_m9xx.c   |  687 +++++
 drivers/net/wwan/t9xx/pcie/mtk_dpmaif_reg.h        |  387 +++
 drivers/net/wwan/t9xx/pcie/mtk_dpmaif_reg_m9xx.h   |   37 +
 drivers/net/wwan/t9xx/pcie/mtk_dpmaif_ring.c       |  168 ++
 drivers/net/wwan/t9xx/pcie/mtk_dpmaif_ring.h       |  161 ++
 drivers/net/wwan/t9xx/pcie/mtk_pci.c               | 1067 ++++++++
 drivers/net/wwan/t9xx/pcie/mtk_pci.h               |  219 ++
 drivers/net/wwan/t9xx/pcie/mtk_pci_drv_m9xx.c      |   70 +
 drivers/net/wwan/t9xx/pcie/mtk_pci_reg.h           |   72 +
 drivers/net/wwan/t9xx/pcie/mtk_trans_ctrl.c        |  593 +++++
 drivers/net/wwan/t9xx/pcie/mtk_trans_ctrl.h        |  105 +
 43 files changed, 14761 insertions(+)
---
base-commit: eb3f4b7426cfd2b79d65b7d37155480b32259a11
change-id: 20260529-t9xx_driver_v1-1744f8af7739

Best regards,
--  
Jack Wu <jackbb_wu@compal.com>
Re: [PATCH 00/11] net: wwan: t9xx: Add MediaTek T9XX WWAN driver
Posted by Jakub Kicinski 6 days, 10 hours ago
On Fri, 29 May 2026 18:31:39 +0800 Jack Wu via B4 Relay wrote:
>  43 files changed, 14761 insertions(+)

Please try to cut this down to ~5kLoC for the initial submission.
Whatever the absolute minimum sensible chunk of code is.

Each patch must build cleanly with W=1
RE: [External Mail] Re: [PATCH 00/11] net: wwan: t9xx: Add MediaTek T9XX WWAN driver
Posted by Wu. JackBB (GSM) 6 days ago
Hi Jakub,

> On Fri, 29 May 2026 18:31:39 +0800 Jack Wu via B4 Relay wrote:
> > 43 files changed, 14761 insertions(+)
>
> Please try to cut this down to ~5kLoC for the initial submission.
> Whatever the absolute minimum sensible chunk of code is.
>
> Each patch must build cleanly with W=1

We've already reduced this significantly from the original 41k LoC
down to ~14.7k by stripping out non-essential features such as
exception handling, memory logging, devlink, statistics, debug
tracing, and others.

We even removed some arguably necessary features (PM, mdlog,
throughput optimizations) that we plan to submit as follow-up
series.

Note that the line count may slightly increase in v2, as we plan
to add missing kdoc comments based on review feedback.

For reference, the t7xx driver (two generations older, simpler HW)
had an initial submission of ~11.3k LoC [1]. The t9xx hardware is
more complex, so we believe being in a similar range is reasonable.

We'd like to keep the driver functional and reviewable in its
current scope. Do you have any suggestions on how we could further
reduce the size while maintaining a working initial submission?

[1] https://patchwork.kernel.org/project/netdevbpf/cover/20220506181310.2183829-1-ricardo.martinez@linux.intel.com/

Thanks.


================================================================================================================================================================
This message may contain information which is private, privileged or confidential of Compal Electronics, Inc. If you are not the intended recipient of this message, please notify the sender and destroy/delete the message. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by persons or entities other than the intended recipient is prohibited.
================================================================================================================================================================
Re: [PATCH 00/11] net: wwan: t9xx: Add MediaTek T9XX WWAN driver
Posted by Sergey Ryazanov 5 days, 14 hours ago
Hi,

let me join the discussion and put my 2c.

On 6/2/26 13:58, Wu. JackBB (GSM) wrote:
> Hi Jakub,
> 
>> On Fri, 29 May 2026 18:31:39 +0800 Jack Wu via B4 Relay wrote:
>>> 43 files changed, 14761 insertions(+)
>>
>> Please try to cut this down to ~5kLoC for the initial submission.
>> Whatever the absolute minimum sensible chunk of code is.
>>
>> Each patch must build cleanly with W=1
> 
> We've already reduced this significantly from the original 41k LoC
> down to ~14.7k by stripping out non-essential features such as
> exception handling, memory logging, devlink, statistics, debug
> tracing, and others.
> 
> We even removed some arguably necessary features (PM, mdlog,
> throughput optimizations) that we plan to submit as follow-up
> series.

Great work. Highly appreciate!

> Note that the line count may slightly increase in v2, as we plan
> to add missing kdoc comments based on review feedback.
> 
> For reference, the t7xx driver (two generations older, simpler HW)
> had an initial submission of ~11.3k LoC [1]. The t9xx hardware is
> more complex, so we believe being in a similar range is reasonable.

Let me elaborate a bit here. The size problem is not due to a git or a 
mailbox limitation. It arise due to the human limitation. The T7xx 
submission review took something about 4 months and 8 iterations. And it 
was 'only' 11.3k lines. Let's do some extrapolation assuming that 
function is linear. 14.7k is 30% bigger, thus, estimated reviewing time 
should be 5 months and 2 weeks. And this looks optimistic.

Recommendation, shared by Jakub, is practical. 5k lines might be 
reviewed in a reasonable time and merged with the full confidence of the 
quality.

> We'd like to keep the driver functional and reviewable in its
> current scope. Do you have any suggestions on how we could further
> reduce the size while maintaining a working initial submission?

Off the top of my head, I would suggest joining T7xx and T9xx code 
bases. It could be done through factoring out a core functionality of 
T7xx into a library, or through making the driver layered.

I am not pretending being an expert in any of these drivers, but 
generally divide-n-conqueror together with code reuse work reliable. As 
an alternative, I could spend a couple of weeks reviewing the new 
submission and will come with more specific ideas on what can be thrown 
away or reused.

> [1] https://patchwork.kernel.org/project/netdevbpf/cover/20220506181310.2183829-1-ricardo.martinez@linux.intel.com/
> 
> Thanks.
> 
> 
> ================================================================================================================================================================
> This message may contain information which is private, privileged or confidential of Compal Electronics, Inc. If you are not the intended recipient of this message, please notify the sender and destroy/delete the message. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by persons or entities other than the intended recipient is prohibited.
> ================================================================================================================================================================

And this disclaimer does not facilitate the review. Am I 'intended' 
recipient or should I destroy the message ASAP?

--
Sergey
RE: [External Mail] Re: [PATCH 00/11] net: wwan: t9xx: Add MediaTek T9XX WWAN driver
Posted by Wu. JackBB (GSM) 4 days, 2 hours ago
Hi

> let me join the discussion and put my 2c.
>
> On 6/2/26 13:58, Wu. JackBB (GSM) wrote:
> > Hi Jakub,
> >
> > > On Fri, 29 May 2026 18:31:39 +0800 Jack Wu via B4 Relay wrote:
> > > > 43 files changed, 14761 insertions(+)
> > >
> > > Please try to cut this down to ~5kLoC for the initial submission.
> > > Whatever the absolute minimum sensible chunk of code is.
> > >
> > > Each patch must build cleanly with W=1
> >
> > We've already reduced this significantly from the original 41k LoC
> > down to ~14.7k by stripping out non-essential features such as
> > exception handling, memory logging, devlink, statistics, debug
> > tracing, and others.
> >
> > We even removed some arguably necessary features (PM, mdlog,
> > throughput optimizations) that we plan to submit as follow-up
> > series.
>
> Great work. Highly appreciate!
>
> > Note that the line count may slightly increase in v2, as we plan
> > to add missing kdoc comments based on review feedback.
> >
> > For reference, the t7xx driver (two generations older, simpler HW)
> > had an initial submission of ~11.3k LoC [1]. The t9xx hardware is
> > more complex, so we believe being in a similar range is reasonable.
>
> Let me elaborate a bit here. The size problem is not due to a git or a
> mailbox limitation. It arise due to the human limitation. The T7xx
> submission review took something about 4 months and 8 iterations. And it
> was 'only' 11.3k lines. Let's do some extrapolation assuming that
> function is linear. 14.7k is 30% bigger, thus, estimated reviewing time
> should be 5 months and 2 weeks. And this looks optimistic.
>
> Recommendation, shared by Jakub, is practical. 5k lines might be
> reviewed in a reasonable time and merged with the full confidence of the
> quality.
>
> > We'd like to keep the driver functional and reviewable in its
> > current scope. Do you have any suggestions on how we could further
> > reduce the size while maintaining a working initial submission?
>
> Off the top of my head, I would suggest joining T7xx and T9xx code
> bases. It could be done through factoring out a core functionality of
> T7xx into a library, or through making the driver layered.
>
> I am not pretending being an expert in any of these drivers, but
> generally divide-n-conqueror together with code reuse work reliable. As
> an alternative, I could spend a couple of weeks reviewing the new
> submission and will come with more specific ideas on what can be thrown
> away or reused.
>

Thank you for the detailed explanation and the practical suggestions.

We discussed this with MediaTek. The T7XX and T9XX hardware architectures
have diverged significantly, so developing a shared driver would require
substantial effort and risk introducing regressions in the existing T7XX
driver, requiring extensive testing to ensure reliability.

MediaTek also confirmed that the current driver cannot be reduced further
without removing functionality. One option would be to remove the data
plane and power management patches, which would bring the submission down
to approximately 9,000 lines:

[0/7] net: wwan: t9xx: Add MediaTek T9XX WWAN driver
[1/7] net: wwan: t9xx: Add PCIe core
[2/7] net: wwan: t9xx: Add control plane transaction layer
[3/7] net: wwan: t9xx: Add control DMA interface
[4/7] net: wwan: t9xx: Add control port
[5/7] net: wwan: t9xx: Add FSM thread
[6/7] net: wwan: t9xx: Add AT & MBIM WWAN ports
[7/7] net: wwan: t9xx: Add maintainers and documentation

We have verified that the MBIM and AT ports work independently in this
configuration — the control plane is fully functional, just without the
network interface.

That said, we would prefer to continue the review with the current 14.7k
line submission if the community is open to it, as it represents a more
complete and testable driver. We are happy to go either way based on your
preference.

Thanks.
> > [1]
> > https://patchwork.kernel.org/project/netdevbpf/cover/20220506181310.2183829-1-ricardo.martinez@linux.intel.com/
> >
> > Thanks.
> >
> >
> > ================================================================================================================================================================
> > This message may contain information which is private, privileged or
> > confidential of Compal Electronics, Inc. If you are not the intended
> > recipient of this message, please notify the sender and destroy/delete the
> > message. Any review, retransmission, dissemination or other use of, or
> > taking of any action in reliance upon this information, by persons or
> > entities other than the intended recipient is prohibited.
> > ================================================================================================================================================================
>
> And this disclaimer does not facilitate the review. Am I 'intended'
> recipient or should I destroy the message ASAP?

Please ignore this message.
Our company's mail server automatically adds this announcement to all external emails.
We apologize for the inconvenience.

Thanks.


================================================================================================================================================================
This message may contain information which is private, privileged or confidential of Compal Electronics, Inc. If you are not the intended recipient of this message, please notify the sender and destroy/delete the message. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by persons or entities other than the intended recipient is prohibited.
================================================================================================================================================================
Re: [PATCH 00/11] net: wwan: t9xx: Add MediaTek T9XX WWAN driver
Posted by Loic Poulain 1 week, 2 days ago
Hi Jack,

On Fri, May 29, 2026 at 12:31 PM Jack Wu via B4 Relay
<devnull+jackbb_wu.compal.com@kernel.org> wrote:
>
> T9XX is the PCIe host device driver for MediaTek's
> t900 modem. The driver uses the WWAN framework
> infrastructure to create the following control ports
> and network interfaces for data transactions.
> * /dev/wwan0at0 - Interface that supports AT commands.
> * /dev/wwan0mbim0 - Interface conforming to the MBIM
>   protocol.
> * wwan0-X - Primary network interface for IP traffic.
>
> The main blocks in the T9XX driver are:
> * HW layer - Abstracts the hardware bus operations for
>    the device, and provides generic interfaces for the
>    transaction layer to get the device's information and
>    control the device's behavior. It includes:
>
>    * PCIe - Implements probe, removal and interrupt
>      handling.
>    * MHCCIF (Modem Host Cross-Core Interface) - Provides
>      interrupt channels for bidirectional event
>      notification such as handshake and port enumeration.
>
> * Transaction layer - Implements data transactions for
>    the control plane and the data plane. It includes:
>
>    * DPMAIF (Data Plane Modem AP Interface) - Controls
>      the hardware that provides uplink and downlink
>      queues for the data path. The data exchange takes
>      place using circular buffers to share data buffer
>      addresses and metadata to describe the packets.
>    * CLDMA (Cross Layer DMA) - Manages the hardware
>      used by the port layer to send control messages to
>      the device using MediaTek's CCCI (Cross-Core
>      Communication Interface) protocol.
>    * TX Services - Dispatch packets from the port layer
>      to the device.
>    * RX Services - Dispatch packets to the port layer
>      when receiving packets from the device.
>
> * Port layer - Provides control plane and data plane
>    interfaces to userspace. It includes:
>
>    * Control Plane - Provides device node interfaces
>      for controlling data transactions.
>    * Data Plane - Provides network link interfaces
>      wwanX (0, 1, 2...) for IP data transactions.
>
> * Core logic - Contains the core logic to keep the
>    device working. It includes:
>
>    * FSM (Finite State Machine) - Monitors the state
>      of the device, and notifies each module when the
>      state changes.
>
> The compilation of the T9XX driver is enabled by the
> CONFIG_MTK_T9XX and CONFIG_MTK_T9XX_PCI config option
> which depends on CONFIG_WWAN.

Can you specify which userspace counterpart you need (e.g., a
ModemManager version or a link to the relevant patch series)?


>
> ---
> Jack Wu (11):
>       net: wwan: t9xx: Add PCIe core
>       net: wwan: t9xx: Add control plane transaction layer
>       net: wwan: t9xx: Add control DMA interface
>       net: wwan: t9xx: Add control port
>       net: wwan: t9xx: Add FSM thread
>       net: wwan: t9xx: Add AT & MBIM WWAN ports
>       net: wwan: t9xx: Introduce data plane hardware
>       net: wwan: t9xx: Add data plane transaction layer
>       net: wwan: t9xx: Introduce WWAN interface
>       net: wwan: t9xx: Add power management support
>       net: wwan: t9xx: Add maintainers and documentation
>
>  .../networking/device_drivers/wwan/t9xx.rst        |   48 +
>  MAINTAINERS                                        |   10 +
>  drivers/net/wwan/Kconfig                           |   17 +
>  drivers/net/wwan/Makefile                          |    1 +
>  drivers/net/wwan/t9xx/Makefile                     |   16 +
>  drivers/net/wwan/t9xx/mtk_ctrl_plane.c             |   95 +
>  drivers/net/wwan/t9xx/mtk_ctrl_plane.h             |   88 +
>  drivers/net/wwan/t9xx/mtk_data_plane.c             |  104 +
>  drivers/net/wwan/t9xx/mtk_data_plane.h             |  105 +
>  drivers/net/wwan/t9xx/mtk_dev.c                    |   55 +
>  drivers/net/wwan/t9xx/mtk_dev.h                    |  114 +
>  drivers/net/wwan/t9xx/mtk_fsm.c                    |  931 +++++++
>  drivers/net/wwan/t9xx/mtk_fsm.h                    |  140 +
>  drivers/net/wwan/t9xx/mtk_port.c                   |  967 +++++++
>  drivers/net/wwan/t9xx/mtk_port.h                   |  176 ++
>  drivers/net/wwan/t9xx/mtk_port_io.c                |  576 +++++
>  drivers/net/wwan/t9xx/mtk_port_io.h                |   41 +
>  drivers/net/wwan/t9xx/mtk_utility.h                |   33 +
>  drivers/net/wwan/t9xx/mtk_wwan.c                   |  475 ++++
>  drivers/net/wwan/t9xx/mtk_wwan.h                   |   17 +
>  drivers/net/wwan/t9xx/pcie/Makefile                |   19 +
>  drivers/net/wwan/t9xx/pcie/mtk_cldma.c             | 1527 +++++++++++
>  drivers/net/wwan/t9xx/pcie/mtk_cldma.h             |  176 ++
>  drivers/net/wwan/t9xx/pcie/mtk_cldma_drv.c         |  373 +++
>  drivers/net/wwan/t9xx/pcie/mtk_cldma_drv.h         |  174 ++
>  drivers/net/wwan/t9xx/pcie/mtk_cldma_drv_m9xx.c    |  177 ++
>  drivers/net/wwan/t9xx/pcie/mtk_cldma_drv_m9xx.h    |  101 +
>  drivers/net/wwan/t9xx/pcie/mtk_ctrl_cfg_m9xx.c     |   55 +
>  drivers/net/wwan/t9xx/pcie/mtk_dpmaif.c            | 2714 ++++++++++++++++++++
>  drivers/net/wwan/t9xx/pcie/mtk_dpmaif.h            |   16 +
>  drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv.c        | 1586 ++++++++++++
>  drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv.h        |  268 ++
>  drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv_m9xx.c   |  687 +++++
>  drivers/net/wwan/t9xx/pcie/mtk_dpmaif_reg.h        |  387 +++
>  drivers/net/wwan/t9xx/pcie/mtk_dpmaif_reg_m9xx.h   |   37 +
>  drivers/net/wwan/t9xx/pcie/mtk_dpmaif_ring.c       |  168 ++
>  drivers/net/wwan/t9xx/pcie/mtk_dpmaif_ring.h       |  161 ++
>  drivers/net/wwan/t9xx/pcie/mtk_pci.c               | 1067 ++++++++
>  drivers/net/wwan/t9xx/pcie/mtk_pci.h               |  219 ++
>  drivers/net/wwan/t9xx/pcie/mtk_pci_drv_m9xx.c      |   70 +
>  drivers/net/wwan/t9xx/pcie/mtk_pci_reg.h           |   72 +
>  drivers/net/wwan/t9xx/pcie/mtk_trans_ctrl.c        |  593 +++++
>  drivers/net/wwan/t9xx/pcie/mtk_trans_ctrl.h        |  105 +
>  43 files changed, 14761 insertions(+)
> ---
> base-commit: eb3f4b7426cfd2b79d65b7d37155480b32259a11
> change-id: 20260529-t9xx_driver_v1-1744f8af7739
>
> Best regards,
> --
> Jack Wu <jackbb_wu@compal.com>
>
>
RE: [External Mail] Re: [PATCH 00/11] net: wwan: t9xx: Add MediaTek T9XX WWAN driver
Posted by Wu. JackBB (GSM) 6 days, 1 hour ago
Hi Loic,

>
> Hi Jack,
>
> On Fri, May 29, 2026 at 12:31 PM Jack Wu via B4 Relay
> <devnull+jackbb_wu.compal.com@kernel.org> wrote:
> >
> > T9XX is the PCIe host device driver for MediaTek's
> > t900 modem. The driver uses the WWAN framework
> > infrastructure to create the following control ports
> > and network interfaces for data transactions.
> > * /dev/wwan0at0 - Interface that supports AT commands.
> > * /dev/wwan0mbim0 - Interface conforming to the MBIM
> > protocol.
> > * wwan0-X - Primary network interface for IP traffic.
> >
> > The main blocks in the T9XX driver are:
> > * HW layer - Abstracts the hardware bus operations for
> > the device, and provides generic interfaces for the
> > transaction layer to get the device's information and
> > control the device's behavior. It includes:
> >
> > * PCIe - Implements probe, removal and interrupt
> > handling.
> > * MHCCIF (Modem Host Cross-Core Interface) - Provides
> > interrupt channels for bidirectional event
> > notification such as handshake and port enumeration.
> >
> > * Transaction layer - Implements data transactions for
> > the control plane and the data plane. It includes:
> >
> > * DPMAIF (Data Plane Modem AP Interface) - Controls
> > the hardware that provides uplink and downlink
> > queues for the data path. The data exchange takes
> > place using circular buffers to share data buffer
> > addresses and metadata to describe the packets.
> > * CLDMA (Cross Layer DMA) - Manages the hardware
> > used by the port layer to send control messages to
> > the device using MediaTek's CCCI (Cross-Core
> > Communication Interface) protocol.
> > * TX Services - Dispatch packets from the port layer
> > to the device.
> > * RX Services - Dispatch packets to the port layer
> > when receiving packets from the device.
> >
> > * Port layer - Provides control plane and data plane
> > interfaces to userspace. It includes:
> >
> > * Control Plane - Provides device node interfaces
> > for controlling data transactions.
> > * Data Plane - Provides network link interfaces
> > wwanX (0, 1, 2...) for IP data transactions.
> >
> > * Core logic - Contains the core logic to keep the
> > device working. It includes:
> >
> > * FSM (Finite State Machine) - Monitors the state
> > of the device, and notifies each module when the
> > state changes.
> >
> > The compilation of the T9XX driver is enabled by the
> > CONFIG_MTK_T9XX and CONFIG_MTK_T9XX_PCI config option
> > which depends on CONFIG_WWAN.
>
> Can you specify which userspace counterpart you need (e.g., a
> ModemManager version or a link to the relevant patch series)?
>
The driver is agnostic to the userspace application. We verified
functionality using ModemManager v1.23.4 and v1.25.95, and both
work out of the box.
>
> >
> > ---
> > Jack Wu (11):
> > net: wwan: t9xx: Add PCIe core
> > net: wwan: t9xx: Add control plane transaction layer
> > net: wwan: t9xx: Add control DMA interface
> > net: wwan: t9xx: Add control port
> > net: wwan: t9xx: Add FSM thread
> > net: wwan: t9xx: Add AT & MBIM WWAN ports
> > net: wwan: t9xx: Introduce data plane hardware
> > net: wwan: t9xx: Add data plane transaction layer
> > net: wwan: t9xx: Introduce WWAN interface
> > net: wwan: t9xx: Add power management support
> > net: wwan: t9xx: Add maintainers and documentation
> >
> > .../networking/device_drivers/wwan/t9xx.rst | 48 +
> > MAINTAINERS | 10 +
> > drivers/net/wwan/Kconfig | 17 +
> > drivers/net/wwan/Makefile | 1 +
> > drivers/net/wwan/t9xx/Makefile | 16 +
> > drivers/net/wwan/t9xx/mtk_ctrl_plane.c | 95 +
> > drivers/net/wwan/t9xx/mtk_ctrl_plane.h | 88 +
> > drivers/net/wwan/t9xx/mtk_data_plane.c | 104 +
> > drivers/net/wwan/t9xx/mtk_data_plane.h | 105 +
> > drivers/net/wwan/t9xx/mtk_dev.c | 55 +
> > drivers/net/wwan/t9xx/mtk_dev.h | 114 +
> > drivers/net/wwan/t9xx/mtk_fsm.c | 931 +++++++
> > drivers/net/wwan/t9xx/mtk_fsm.h | 140 +
> > drivers/net/wwan/t9xx/mtk_port.c | 967 +++++++
> > drivers/net/wwan/t9xx/mtk_port.h | 176 ++
> > drivers/net/wwan/t9xx/mtk_port_io.c | 576 +++++
> > drivers/net/wwan/t9xx/mtk_port_io.h | 41 +
> > drivers/net/wwan/t9xx/mtk_utility.h | 33 +
> > drivers/net/wwan/t9xx/mtk_wwan.c | 475 ++++
> > drivers/net/wwan/t9xx/mtk_wwan.h | 17 +
> > drivers/net/wwan/t9xx/pcie/Makefile | 19 +
> > drivers/net/wwan/t9xx/pcie/mtk_cldma.c | 1527 +++++++++++
> > drivers/net/wwan/t9xx/pcie/mtk_cldma.h | 176 ++
> > drivers/net/wwan/t9xx/pcie/mtk_cldma_drv.c | 373 +++
> > drivers/net/wwan/t9xx/pcie/mtk_cldma_drv.h | 174 ++
> > drivers/net/wwan/t9xx/pcie/mtk_cldma_drv_m9xx.c | 177 ++
> > drivers/net/wwan/t9xx/pcie/mtk_cldma_drv_m9xx.h | 101 +
> > drivers/net/wwan/t9xx/pcie/mtk_ctrl_cfg_m9xx.c | 55 +
> > drivers/net/wwan/t9xx/pcie/mtk_dpmaif.c | 2714 ++++++++++++++++++++
> > drivers/net/wwan/t9xx/pcie/mtk_dpmaif.h | 16 +
> > drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv.c | 1586 ++++++++++++
> > drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv.h | 268 ++
> > drivers/net/wwan/t9xx/pcie/mtk_dpmaif_drv_m9xx.c | 687 +++++
> > drivers/net/wwan/t9xx/pcie/mtk_dpmaif_reg.h | 387 +++
> > drivers/net/wwan/t9xx/pcie/mtk_dpmaif_reg_m9xx.h | 37 +
> > drivers/net/wwan/t9xx/pcie/mtk_dpmaif_ring.c | 168 ++
> > drivers/net/wwan/t9xx/pcie/mtk_dpmaif_ring.h | 161 ++
> > drivers/net/wwan/t9xx/pcie/mtk_pci.c | 1067 ++++++++
> > drivers/net/wwan/t9xx/pcie/mtk_pci.h | 219 ++
> > drivers/net/wwan/t9xx/pcie/mtk_pci_drv_m9xx.c | 70 +
> > drivers/net/wwan/t9xx/pcie/mtk_pci_reg.h | 72 +
> > drivers/net/wwan/t9xx/pcie/mtk_trans_ctrl.c | 593 +++++
> > drivers/net/wwan/t9xx/pcie/mtk_trans_ctrl.h | 105 +
> > 43 files changed, 14761 insertions(+)
> > ---
> > base-commit: eb3f4b7426cfd2b79d65b7d37155480b32259a11
> > change-id: 20260529-t9xx_driver_v1-1744f8af7739
> >
> > Best regards,
> > --
> > Jack Wu <jackbb_wu@compal.com>


================================================================================================================================================================
This message may contain information which is private, privileged or confidential of Compal Electronics, Inc. If you are not the intended recipient of this message, please notify the sender and destroy/delete the message. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by persons or entities other than the intended recipient is prohibited.
================================================================================================================================================================