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