[lkml]   [2021]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH net-next v2 0/4] net: wwan: Add Qualcomm BAM-DMUX WWAN network driver
The BAM Data Multiplexer provides access to the network data channels
of modems integrated into many older Qualcomm SoCs, e.g. Qualcomm MSM8916
or MSM8974. This series adds a driver that allows using it.

For more information about BAM-DMUX, see PATCH 4/4.

Shortly said, BAM-DMUX is built using a simple protocol layer on top of
a DMA engine (Qualcomm BAM DMA). For BAM-DMUX, the BAM DMA engine runs in
a special mode where the modem/remote side is responsible for powering
on the BAM when needed but we are responsible to initialize it.
The BAM is powered off when unneeded by coordinating power control
via bidirectional interrupts from the BAM-DMUX driver.

The series first adds one possible solution for handling the "powered
remotely" mode in the bam_dma driver, then it adds the BAM-DMUX driver.
In combination with the RPMSG_WWAN_CTRL driver the WWAN control ports
(QMI/AT) are exposed via the WWAN subsystem. However, the driver does
not currently make use of the link management of the WWAN subsystem.
Unifying the link management for the many different Qualcomm modem
setups is a huge undertaking that I believe is better addressed
separately. I discuss this in detail in PATCH 4/4.

All the changes in this patch series are based on a fairly complicated
driver from Qualcomm [1]. I do not have access to documentation about
"BAM-DMUX", although Jeffrey Hugo has shared many helpful insights
about the creation process of BAM-DMUX [2].

The driver has been used in postmarketOS [3] on various smartphones/tablets
based on Qualcomm MSM8916 and MSM8974 for more than a year now with
no reported problems. It works out of the box with ModemManager and only
requires minor changes in oFono (in particular since it does not support
WWAN control ports, e.g. /dev/wwan0qmi0 yet).

Changes in v2:
- Rename "qcom,remote-power-collapse" -> "qcom,powered-remotely"
- Rebase on net-net and fix conflicts
- Rename network interfaces from "rmnet%d" -> "wwan%d"
- Fix wrong file name in MAINTAINERS entry


Stephan Gerhold (4):
dt-bindings: dmaengine: bam_dma: Add "powered remotely" mode
dmaengine: qcom: bam_dma: Add "powered remotely" mode
dt-bindings: net: Add schema for Qualcomm BAM-DMUX
net: wwan: Add Qualcomm BAM-DMUX WWAN network driver

.../devicetree/bindings/dma/qcom_bam_dma.txt | 2 +
.../bindings/net/qcom,bam-dmux.yaml | 87 ++
drivers/dma/qcom/bam_dma.c | 88 +-
drivers/net/wwan/Kconfig | 13 +
drivers/net/wwan/Makefile | 1 +
drivers/net/wwan/qcom_bam_dmux.c | 907 ++++++++++++++++++
7 files changed, 1074 insertions(+), 32 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml
create mode 100644 drivers/net/wwan/qcom_bam_dmux.c


 \ /
  Last update: 2021-10-11 16:43    [W:0.203 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site