xref: /freebsd/sys/contrib/device-tree/Bindings/dma/apple,admac.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2b97ee269SEmmanuel Vadot%YAML 1.2
3b97ee269SEmmanuel Vadot---
4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/dma/apple,admac.yaml#
5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6b97ee269SEmmanuel Vadot
7b97ee269SEmmanuel Vadottitle: Apple Audio DMA Controller (ADMAC)
8b97ee269SEmmanuel Vadot
9b97ee269SEmmanuel Vadotdescription: |
10b97ee269SEmmanuel Vadot  Apple's Audio DMA Controller (ADMAC) is used to fetch and store audio samples
11b97ee269SEmmanuel Vadot  on SoCs from the "Apple Silicon" family.
12b97ee269SEmmanuel Vadot
13b97ee269SEmmanuel Vadot  The controller has been seen with up to 24 channels. Even-numbered channels
14b97ee269SEmmanuel Vadot  are TX-only, odd-numbered are RX-only. Individual channels are coupled to
15b97ee269SEmmanuel Vadot  fixed device endpoints.
16b97ee269SEmmanuel Vadot
17b97ee269SEmmanuel Vadotmaintainers:
18b97ee269SEmmanuel Vadot  - Martin Povišer <povik+lin@cutebit.org>
19b97ee269SEmmanuel Vadot
20b97ee269SEmmanuel VadotallOf:
21cb7aa33aSEmmanuel Vadot  - $ref: dma-controller.yaml#
22b97ee269SEmmanuel Vadot
23b97ee269SEmmanuel Vadotproperties:
24b97ee269SEmmanuel Vadot  compatible:
25b97ee269SEmmanuel Vadot    items:
26b97ee269SEmmanuel Vadot      - enum:
27b97ee269SEmmanuel Vadot          - apple,t6000-admac
28b97ee269SEmmanuel Vadot          - apple,t8103-admac
29*fac71e4eSEmmanuel Vadot          - apple,t8112-admac
30b97ee269SEmmanuel Vadot      - const: apple,admac
31b97ee269SEmmanuel Vadot
32b97ee269SEmmanuel Vadot  reg:
33b97ee269SEmmanuel Vadot    maxItems: 1
34b97ee269SEmmanuel Vadot
35b97ee269SEmmanuel Vadot  '#dma-cells':
36b97ee269SEmmanuel Vadot    const: 1
37b97ee269SEmmanuel Vadot    description:
38b97ee269SEmmanuel Vadot      Clients specify a single cell with channel number.
39b97ee269SEmmanuel Vadot
40b97ee269SEmmanuel Vadot  dma-channels:
41b97ee269SEmmanuel Vadot    maximum: 24
42b97ee269SEmmanuel Vadot
43b97ee269SEmmanuel Vadot  interrupts:
44b97ee269SEmmanuel Vadot    minItems: 4
45b97ee269SEmmanuel Vadot    maxItems: 4
46b97ee269SEmmanuel Vadot    description:
47b97ee269SEmmanuel Vadot      Interrupts that correspond to the 4 IRQ outputs of the controller. Usually
48b97ee269SEmmanuel Vadot      only one of the controller outputs will be connected as an usable interrupt
49b97ee269SEmmanuel Vadot      source. The remaining interrupts will be left without a valid value, e.g.
50b97ee269SEmmanuel Vadot      in an interrupts-extended list the disconnected positions will contain
51b97ee269SEmmanuel Vadot      an empty phandle reference <0>.
52b97ee269SEmmanuel Vadot
537ef62cebSEmmanuel Vadot  iommus:
547ef62cebSEmmanuel Vadot    minItems: 1
557ef62cebSEmmanuel Vadot    maxItems: 2
567ef62cebSEmmanuel Vadot
577ef62cebSEmmanuel Vadot  power-domains:
587ef62cebSEmmanuel Vadot    maxItems: 1
597ef62cebSEmmanuel Vadot
608bab661aSEmmanuel Vadot  resets:
618bab661aSEmmanuel Vadot    maxItems: 1
628bab661aSEmmanuel Vadot
63b97ee269SEmmanuel Vadotrequired:
64b97ee269SEmmanuel Vadot  - compatible
65b97ee269SEmmanuel Vadot  - reg
66b97ee269SEmmanuel Vadot  - '#dma-cells'
67b97ee269SEmmanuel Vadot  - dma-channels
68b97ee269SEmmanuel Vadot  - interrupts
69b97ee269SEmmanuel Vadot
70b97ee269SEmmanuel VadotadditionalProperties: false
71b97ee269SEmmanuel Vadot
72b97ee269SEmmanuel Vadotexamples:
73b97ee269SEmmanuel Vadot  - |
74b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/apple-aic.h>
75b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
76b97ee269SEmmanuel Vadot
77b97ee269SEmmanuel Vadot    aic: interrupt-controller {
78b97ee269SEmmanuel Vadot      interrupt-controller;
79b97ee269SEmmanuel Vadot      #interrupt-cells = <3>;
80b97ee269SEmmanuel Vadot    };
81b97ee269SEmmanuel Vadot
82b97ee269SEmmanuel Vadot    admac: dma-controller@238200000 {
83b97ee269SEmmanuel Vadot      compatible = "apple,t8103-admac", "apple,admac";
84b97ee269SEmmanuel Vadot      reg = <0x38200000 0x34000>;
85b97ee269SEmmanuel Vadot      dma-channels = <24>;
86b97ee269SEmmanuel Vadot      interrupts-extended = <0>,
87b97ee269SEmmanuel Vadot                            <&aic AIC_IRQ 626 IRQ_TYPE_LEVEL_HIGH>,
88b97ee269SEmmanuel Vadot                            <0>,
89b97ee269SEmmanuel Vadot                            <0>;
90b97ee269SEmmanuel Vadot      #dma-cells = <1>;
91b97ee269SEmmanuel Vadot    };
92