-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: David S. Miller <davem@davemloft.net>
- Loading branch information
Showing
5 changed files
with
1,021 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# 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"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.