xref: /linux/Documentation/devicetree/bindings/dma/apple,admac.yaml (revision 20bed0d6ff62d985fe8222958825504b8aad4e88)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/dma/apple,admac.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Apple Audio DMA Controller (ADMAC)
8
9description: |
10  Apple's Audio DMA Controller (ADMAC) is used to fetch and store audio samples
11  on SoCs from the "Apple Silicon" family.
12
13  The controller has been seen with up to 32 channels. Even-numbered channels
14  are TX-only, odd-numbered are RX-only. Individual channels are coupled to
15  fixed device endpoints.
16
17maintainers:
18  - Martin Povišer <povik+lin@cutebit.org>
19
20allOf:
21  - $ref: dma-controller.yaml#
22
23properties:
24  compatible:
25    oneOf:
26      - items:
27          - const: apple,t6020-admac
28          - const: apple,t8103-admac
29      - items:
30          - enum:
31              # Do not add additional SoC to this list.
32              - apple,t6000-admac
33              - apple,t8103-admac
34              - apple,t8112-admac
35          - const: apple,admac
36      - items:
37          - enum:
38              - apple,t6030-admac
39              - apple,t6031-admac
40          - const: apple,t8122-admac
41      - const: apple,t8122-admac
42
43  reg:
44    maxItems: 1
45
46  '#dma-cells':
47    const: 1
48    description:
49      Clients specify a single cell with channel number.
50
51  dma-channels:
52    maximum: 32
53
54  interrupts:
55    minItems: 4
56    maxItems: 4
57    description:
58      Interrupts that correspond to the 4 IRQ outputs of the controller. Usually
59      only one of the controller outputs will be connected as an usable interrupt
60      source. The remaining interrupts will be left without a valid value, e.g.
61      in an interrupts-extended list the disconnected positions will contain
62      an empty phandle reference <0>.
63
64  iommus:
65    minItems: 1
66    maxItems: 2
67
68  power-domains:
69    maxItems: 1
70
71  resets:
72    maxItems: 1
73
74required:
75  - compatible
76  - reg
77  - '#dma-cells'
78  - dma-channels
79  - interrupts
80
81additionalProperties: false
82
83examples:
84  - |
85    #include <dt-bindings/interrupt-controller/apple-aic.h>
86    #include <dt-bindings/interrupt-controller/irq.h>
87
88    aic: interrupt-controller {
89      interrupt-controller;
90      #interrupt-cells = <3>;
91    };
92
93    admac: dma-controller@238200000 {
94      compatible = "apple,t8103-admac", "apple,admac";
95      reg = <0x38200000 0x34000>;
96      dma-channels = <24>;
97      interrupts-extended = <0>,
98                            <&aic AIC_IRQ 626 IRQ_TYPE_LEVEL_HIGH>,
99                            <0>,
100                            <0>;
101      #dma-cells = <1>;
102    };
103