Commit 688e0757 authored by David S. Miller's avatar David S. Miller

Merge branch 'qualcomm-bam-dmux'

Stephan Gerhold says:

====================
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.

All the changes in this patch series are based on a quite complicated
driver from Qualcomm [1]. The driver has been used in postmarketOS [2]
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 open-source WWAN userspace such as ModemManager.

[1]: https://source.codeaurora.org/quic/la/kernel/msm-3.10/tree/drivers/soc/qcom/bam_dmux.c?h=LA.BR.1.2.9.1-02310-8x16.0
[2]: https://postmarketos.org/

Changes in v3:
  - Clarify DT schema based on discussion
  - Drop bam_dma/dmaengine patches since they already landed in 5.16
  - Rebase on net-next
  - Simplify cover letter and commit messages

Changes in v2:
  - Rename "qcom,remote-power-collapse" -> "qcom,powered-remotely"
  - Rebase on net-next and fix conflicts
  - Rename network interfaces from "rmnet%d" -> "wwan%d"
  - Fix wrong file name in MAINTAINERS entry
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents fc1e5a36 21a0ffd9
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/qcom,bam-dmux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm BAM Data Multiplexer
maintainers:
- Stephan Gerhold <stephan@gerhold.net>
description: |
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. It is built using a simple protocol layer on top of a DMA engine
(Qualcomm BAM DMA) and bidirectional interrupts to coordinate power control.
Note that this schema does not directly describe a hardware block but rather
a firmware convention that combines several other hardware blocks (such as the
DMA engine). As such it is specific to a firmware version, not a particular
SoC or hardware version.
properties:
compatible:
const: qcom,bam-dmux
interrupts:
description:
Interrupts used by the modem to signal the AP.
Both interrupts must be declared as IRQ_TYPE_EDGE_BOTH.
items:
- description: Power control
- description: Power control acknowledgment
interrupt-names:
items:
- const: pc
- const: pc-ack
qcom,smem-states:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: State bits used by the AP to signal the modem.
items:
- description: Power control
- description: Power control acknowledgment
qcom,smem-state-names:
description: Names for the state bits used by the AP to signal the modem.
items:
- const: pc
- const: pc-ack
dmas:
items:
- description: TX DMA channel phandle
- description: RX DMA channel phandle
dma-names:
items:
- const: tx
- const: rx
required:
- compatible
- interrupts
- interrupt-names
- qcom,smem-states
- qcom,smem-state-names
- dmas
- dma-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
mpss: remoteproc {
bam-dmux {
compatible = "qcom,bam-dmux";
interrupt-parent = <&modem_smsm>;
interrupts = <1 IRQ_TYPE_EDGE_BOTH>, <11 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "pc", "pc-ack";
qcom,smem-states = <&apps_smsm 1>, <&apps_smsm 11>;
qcom,smem-state-names = "pc", "pc-ack";
dmas = <&bam_dmux_dma 4>, <&bam_dmux_dma 5>;
dma-names = "tx", "rx";
};
};
......@@ -15727,6 +15727,14 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
F: Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
F: drivers/net/wireless/ath/ath9k/
QUALCOMM BAM-DMUX WWAN NETWORK DRIVER
M: Stephan Gerhold <stephan@gerhold.net>
L: netdev@vger.kernel.org
L: linux-arm-msm@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml
F: drivers/net/wwan/qcom_bam_dmux.c
QUALCOMM CAMERA SUBSYSTEM DRIVER
M: Robert Foss <robert.foss@linaro.org>
M: Todor Tomov <todor.too@gmail.com>
......
......@@ -50,6 +50,19 @@ config MHI_WWAN_MBIM
To compile this driver as a module, choose M here: the module will be
called mhi_wwan_mbim.
config QCOM_BAM_DMUX
tristate "Qualcomm BAM-DMUX WWAN network driver"
depends on (DMA_ENGINE && PM && QCOM_SMEM_STATE) || COMPILE_TEST
help
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. The connection can be established via QMI/AT from
userspace with control ports available through the WWAN subsystem
(CONFIG_RPMSG_WWAN_CTRL) or QRTR network sockets (CONFIG_QRTR).
To compile this driver as a module, choose M here: the module will be
called qcom_bam_dmux.
config RPMSG_WWAN_CTRL
tristate "RPMSG WWAN control driver"
depends on RPMSG
......
......@@ -10,5 +10,6 @@ obj-$(CONFIG_WWAN_HWSIM) += wwan_hwsim.o
obj-$(CONFIG_MHI_WWAN_CTRL) += mhi_wwan_ctrl.o
obj-$(CONFIG_MHI_WWAN_MBIM) += mhi_wwan_mbim.o
obj-$(CONFIG_QCOM_BAM_DMUX) += qcom_bam_dmux.o
obj-$(CONFIG_RPMSG_WWAN_CTRL) += rpmsg_wwan_ctrl.o
obj-$(CONFIG_IOSM) += iosm/
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment