xref: /linux/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml (revision 26b8eb8a98c18b2ee4ea76d99fa2b2a5ccbc1b6c)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/qcom,bam-dmux.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm BAM Data Multiplexer
8
9maintainers:
10  - Stephan Gerhold <stephan@gerhold.net>
11
12description: |
13  The BAM Data Multiplexer provides access to the network data channels
14  of modems integrated into many older Qualcomm SoCs, e.g. Qualcomm MSM8916
15  or MSM8974. It is built using a simple protocol layer on top of a DMA engine
16  (Qualcomm BAM DMA) and bidirectional interrupts to coordinate power control.
17
18  Note that this schema does not directly describe a hardware block but rather
19  a firmware convention that combines several other hardware blocks (such as the
20  DMA engine). As such it is specific to a firmware version, not a particular
21  SoC or hardware version.
22
23properties:
24  compatible:
25    const: qcom,bam-dmux
26
27  interrupts:
28    description:
29      Interrupts used by the modem to signal the AP.
30      Both interrupts must be declared as IRQ_TYPE_EDGE_BOTH.
31    items:
32      - description: Power control
33      - description: Power control acknowledgment
34
35  interrupt-names:
36    items:
37      - const: pc
38      - const: pc-ack
39
40  qcom,smem-states:
41    $ref: /schemas/types.yaml#/definitions/phandle-array
42    description: State bits used by the AP to signal the modem.
43    items:
44      - description: Power control
45        items:
46          - description: Phandle to the Shared Memory Point 2 Point device
47              handling the communication with a remote processor
48          - description: Single bit index to toggle in the value sent to
49              the remote processor
50            maximum: 32
51      - description: Power control acknowledgment
52        items:
53          - description: Phandle to the Shared Memory Point 2 Point device
54              handling the communication with a remote processor
55          - description: Single bit index to toggle in the value sent to
56              the remote processor
57            maximum: 32
58
59  qcom,smem-state-names:
60    description: Names for the state bits used by the AP to signal the modem.
61    items:
62      - const: pc
63      - const: pc-ack
64
65  dmas:
66    items:
67      - description: TX DMA channel phandle
68      - description: RX DMA channel phandle
69
70  dma-names:
71    items:
72      - const: tx
73      - const: rx
74
75required:
76  - compatible
77  - interrupts
78  - interrupt-names
79  - qcom,smem-states
80  - qcom,smem-state-names
81  - dmas
82  - dma-names
83
84additionalProperties: false
85
86examples:
87  - |
88    #include <dt-bindings/interrupt-controller/irq.h>
89
90    mpss: remoteproc {
91        bam-dmux {
92            compatible = "qcom,bam-dmux";
93
94            interrupt-parent = <&modem_smsm>;
95            interrupts = <1 IRQ_TYPE_EDGE_BOTH>, <11 IRQ_TYPE_EDGE_BOTH>;
96            interrupt-names = "pc", "pc-ack";
97
98            qcom,smem-states = <&apps_smsm 1>, <&apps_smsm 11>;
99            qcom,smem-state-names = "pc", "pc-ack";
100
101            dmas = <&bam_dmux_dma 4>, <&bam_dmux_dma 5>;
102            dma-names = "tx", "rx";
103        };
104    };
105