xref: /linux/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml (revision 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/dma/qcom,bam-dma.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm Technologies Inc BAM DMA controller
8
9maintainers:
10  - Andy Gross <agross@kernel.org>
11  - Bjorn Andersson <andersson@kernel.org>
12
13allOf:
14  - $ref: dma-controller.yaml#
15
16properties:
17  compatible:
18    oneOf:
19      - enum:
20          # APQ8064, IPQ8064 and MSM8960
21          - qcom,bam-v1.3.0
22          # MSM8974, APQ8074 and APQ8084
23          - qcom,bam-v1.4.0
24          # MSM8916, SDM630
25          - qcom,bam-v1.7.0
26          # Kaanapali
27          - qcom,bam-v2.0.0
28      - items:
29          - enum:
30              # SDM845, SM6115, SM8150, SM8250 and QCM2290
31              - qcom,bam-v1.7.4
32          - const: qcom,bam-v1.7.0
33
34  clocks:
35    maxItems: 1
36
37  clock-names:
38    items:
39      - const: bam_clk
40
41  "#dma-cells":
42    const: 1
43
44  interrupts:
45    maxItems: 1
46
47  dma-coherent: true
48
49  iommus:
50    minItems: 1
51    maxItems: 7
52
53  num-channels:
54    $ref: /schemas/types.yaml#/definitions/uint32
55    description:
56      Indicates supported number of DMA channels in a remotely controlled bam.
57
58  qcom,controlled-remotely:
59    type: boolean
60    description:
61      Indicates that the bam is controlled by remote processor i.e. execution
62      environment.
63
64  qcom,ee:
65    $ref: /schemas/types.yaml#/definitions/uint32
66    minimum: 0
67    maximum: 7
68    description:
69      Indicates the active Execution Environment identifier (0-7) used in the
70      secure world.
71
72  qcom,num-ees:
73    $ref: /schemas/types.yaml#/definitions/uint32
74    description:
75      Indicates supported number of Execution Environments in a remotely
76      controlled bam.
77
78  qcom,powered-remotely:
79    type: boolean
80    description:
81      Indicates that the bam is powered up by a remote processor but must be
82      initialized by the local processor.
83
84  reg:
85    maxItems: 1
86
87required:
88  - compatible
89  - "#dma-cells"
90  - interrupts
91  - qcom,ee
92  - reg
93
94anyOf:
95  - required:
96      - qcom,powered-remotely
97      - num-channels
98      - qcom,num-ees
99  - required:
100      - qcom,controlled-remotely
101      - num-channels
102      - qcom,num-ees
103  - required:
104      - clocks
105      - clock-names
106
107additionalProperties: false
108
109examples:
110  - |
111    #include <dt-bindings/interrupt-controller/arm-gic.h>
112    #include <dt-bindings/clock/qcom,gcc-msm8974.h>
113
114    dma-controller@f9944000 {
115        compatible = "qcom,bam-v1.4.0";
116        reg = <0xf9944000 0x19000>;
117        interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH>;
118        clocks = <&gcc GCC_BLSP2_AHB_CLK>;
119        clock-names = "bam_clk";
120        #dma-cells = <1>;
121        qcom,ee = <0>;
122    };
123  - |
124    #include <dt-bindings/interrupt-controller/arm-gic.h>
125
126    soc {
127        #address-cells = <2>;
128        #size-cells = <2>;
129
130        dma-controller@1dc4000 {
131            compatible = "qcom,bam-v2.0.0";
132            reg = <0x0 0x01dc4000 0x0 0x22000>;
133            interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
134            #dma-cells = <1>;
135            iommus = <&apps_smmu 0xc0 0>, <&apps_smmu 0xc1 0>;
136            qcom,ee = <0>;
137            qcom,num-ees = <4>;
138            num-channels = <20>;
139            qcom,controlled-remotely;
140        };
141    };
142...
143