d06db2cc931eb120f2b4e1d02541db67ef905a72
[linux-block.git] / Documentation / devicetree / bindings / dma / qcom,gpi.yaml
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,gpi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Qualcomm Technologies Inc GPI DMA controller
8
9 maintainers:
10   - Vinod Koul <vkoul@kernel.org>
11
12 description: |
13   QCOM GPI DMA controller provides DMA capabilities for
14   peripheral buses such as I2C, UART, and SPI.
15
16 allOf:
17   - $ref: dma-controller.yaml#
18
19 properties:
20   compatible:
21     oneOf:
22       - enum:
23           - qcom,sdm845-gpi-dma
24           - qcom,sm6350-gpi-dma
25       - items:
26           - enum:
27               - qcom,qcm2290-gpi-dma
28               - qcom,qdu1000-gpi-dma
29               - qcom,sc7280-gpi-dma
30               - qcom,sm6115-gpi-dma
31               - qcom,sm6375-gpi-dma
32               - qcom,sm8350-gpi-dma
33               - qcom,sm8450-gpi-dma
34               - qcom,sm8550-gpi-dma
35               - qcom,x1e80100-gpi-dma
36           - const: qcom,sm6350-gpi-dma
37       - items:
38           - enum:
39               - qcom,sdm670-gpi-dma
40               - qcom,sm6125-gpi-dma
41               - qcom,sm8150-gpi-dma
42               - qcom,sm8250-gpi-dma
43           - const: qcom,sdm845-gpi-dma
44
45   reg:
46     maxItems: 1
47
48   interrupts:
49     description:
50       Interrupt lines for each GPI instance
51     minItems: 1
52     maxItems: 13
53
54   "#dma-cells":
55     const: 3
56     description: >
57       DMA clients must use the format described in dma.txt, giving a phandle
58       to the DMA controller plus the following 3 integer cells:
59       - channel: if set to 0xffffffff, any available channel will be allocated
60         for the client. Otherwise, the exact channel specified will be used.
61       - seid: serial id of the client as defined in the SoC documentation.
62       - client: type of the client as defined in dt-bindings/dma/qcom-gpi.h
63
64   iommus:
65     maxItems: 1
66
67   dma-channels:
68     maximum: 31
69
70   dma-channel-mask:
71     maxItems: 1
72
73   dma-coherent: true
74
75 required:
76   - compatible
77   - reg
78   - interrupts
79   - "#dma-cells"
80   - iommus
81   - dma-channels
82   - dma-channel-mask
83
84 additionalProperties: false
85
86 examples:
87   - |
88     #include <dt-bindings/interrupt-controller/arm-gic.h>
89     #include <dt-bindings/dma/qcom-gpi.h>
90     gpi_dma0: dma-controller@800000 {
91         compatible = "qcom,sdm845-gpi-dma";
92         #dma-cells = <3>;
93         reg = <0x00800000 0x60000>;
94         iommus = <&apps_smmu 0x0016 0x0>;
95         dma-channels = <13>;
96         dma-channel-mask = <0xfa>;
97         interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>,
98                      <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>,
99                      <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>,
100                      <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>,
101                      <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>,
102                      <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>,
103                      <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH>,
104                      <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>,
105                      <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>,
106                      <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>,
107                      <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>,
108                      <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>,
109                      <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>;
110     };
111
112 ...