xref: /freebsd/sys/contrib/device-tree/Bindings/sound/microchip,sama7g5-i2smcc.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1*cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*cb7aa33aSEmmanuel Vadot%YAML 1.2
3*cb7aa33aSEmmanuel Vadot---
4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/microchip,sama7g5-i2smcc.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cb7aa33aSEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: Microchip I2S Multi-Channel Controller
8*cb7aa33aSEmmanuel Vadot
9*cb7aa33aSEmmanuel Vadotmaintainers:
10*cb7aa33aSEmmanuel Vadot  - Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
11*cb7aa33aSEmmanuel Vadot
12*cb7aa33aSEmmanuel Vadotdescription:
13*cb7aa33aSEmmanuel Vadot  The I2SMCC complies with the Inter-IC Sound (I2S) bus specification and
14*cb7aa33aSEmmanuel Vadot  supports a Time Division Multiplexed (TDM) interface with external
15*cb7aa33aSEmmanuel Vadot  multi-channel audio codecs. It consists of a receiver, a transmitter and a
16*cb7aa33aSEmmanuel Vadot  common clock generator that can be enabled separately to provide Adapter,
17*cb7aa33aSEmmanuel Vadot  Client or Controller modes with receiver and/or transmitter active.
18*cb7aa33aSEmmanuel Vadot  On later I2SMCC versions (starting with Microchip's SAMA7G5) I2S
19*cb7aa33aSEmmanuel Vadot  multi-channel is supported by using multiple data pins, output and
20*cb7aa33aSEmmanuel Vadot  input, without TDM.
21*cb7aa33aSEmmanuel Vadot
22*cb7aa33aSEmmanuel Vadotproperties:
23*cb7aa33aSEmmanuel Vadot  "#sound-dai-cells":
24*cb7aa33aSEmmanuel Vadot    const: 0
25*cb7aa33aSEmmanuel Vadot
26*cb7aa33aSEmmanuel Vadot  compatible:
27*cb7aa33aSEmmanuel Vadot    enum:
28*cb7aa33aSEmmanuel Vadot      - microchip,sam9x60-i2smcc
29*cb7aa33aSEmmanuel Vadot      - microchip,sama7g5-i2smcc
30*cb7aa33aSEmmanuel Vadot
31*cb7aa33aSEmmanuel Vadot  reg:
32*cb7aa33aSEmmanuel Vadot    maxItems: 1
33*cb7aa33aSEmmanuel Vadot
34*cb7aa33aSEmmanuel Vadot  interrupts:
35*cb7aa33aSEmmanuel Vadot    maxItems: 1
36*cb7aa33aSEmmanuel Vadot
37*cb7aa33aSEmmanuel Vadot  clocks:
38*cb7aa33aSEmmanuel Vadot    items:
39*cb7aa33aSEmmanuel Vadot      - description: Peripheral Bus Clock
40*cb7aa33aSEmmanuel Vadot      - description: Generic Clock (Optional). Should be set mostly when Master
41*cb7aa33aSEmmanuel Vadot          Mode is required.
42*cb7aa33aSEmmanuel Vadot    minItems: 1
43*cb7aa33aSEmmanuel Vadot
44*cb7aa33aSEmmanuel Vadot  clock-names:
45*cb7aa33aSEmmanuel Vadot    items:
46*cb7aa33aSEmmanuel Vadot      - const: pclk
47*cb7aa33aSEmmanuel Vadot      - const: gclk
48*cb7aa33aSEmmanuel Vadot    minItems: 1
49*cb7aa33aSEmmanuel Vadot
50*cb7aa33aSEmmanuel Vadot  dmas:
51*cb7aa33aSEmmanuel Vadot    items:
52*cb7aa33aSEmmanuel Vadot      - description: TX DMA Channel
53*cb7aa33aSEmmanuel Vadot      - description: RX DMA Channel
54*cb7aa33aSEmmanuel Vadot
55*cb7aa33aSEmmanuel Vadot  dma-names:
56*cb7aa33aSEmmanuel Vadot    items:
57*cb7aa33aSEmmanuel Vadot      - const: tx
58*cb7aa33aSEmmanuel Vadot      - const: rx
59*cb7aa33aSEmmanuel Vadot
60*cb7aa33aSEmmanuel Vadot  microchip,tdm-data-pair:
61*cb7aa33aSEmmanuel Vadot    description:
62*cb7aa33aSEmmanuel Vadot      Represents the DIN/DOUT pair pins that are used to receive/send
63*cb7aa33aSEmmanuel Vadot      TDM data. It is optional and it is only needed if the controller
64*cb7aa33aSEmmanuel Vadot      uses the TDM mode.
65*cb7aa33aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint8
66*cb7aa33aSEmmanuel Vadot    enum: [0, 1, 2, 3]
67*cb7aa33aSEmmanuel Vadot    default: 0
68*cb7aa33aSEmmanuel Vadot
69*cb7aa33aSEmmanuel VadotallOf:
70*cb7aa33aSEmmanuel Vadot  - $ref: dai-common.yaml#
71*cb7aa33aSEmmanuel Vadot  - if:
72*cb7aa33aSEmmanuel Vadot      properties:
73*cb7aa33aSEmmanuel Vadot        compatible:
74*cb7aa33aSEmmanuel Vadot          const: microchip,sam9x60-i2smcc
75*cb7aa33aSEmmanuel Vadot    then:
76*cb7aa33aSEmmanuel Vadot      properties:
77*cb7aa33aSEmmanuel Vadot        microchip,tdm-data-pair: false
78*cb7aa33aSEmmanuel Vadot
79*cb7aa33aSEmmanuel Vadotrequired:
80*cb7aa33aSEmmanuel Vadot  - "#sound-dai-cells"
81*cb7aa33aSEmmanuel Vadot  - compatible
82*cb7aa33aSEmmanuel Vadot  - reg
83*cb7aa33aSEmmanuel Vadot  - interrupts
84*cb7aa33aSEmmanuel Vadot  - clocks
85*cb7aa33aSEmmanuel Vadot  - clock-names
86*cb7aa33aSEmmanuel Vadot  - dmas
87*cb7aa33aSEmmanuel Vadot  - dma-names
88*cb7aa33aSEmmanuel Vadot
89*cb7aa33aSEmmanuel VadotunevaluatedProperties: false
90*cb7aa33aSEmmanuel Vadot
91*cb7aa33aSEmmanuel Vadotexamples:
92*cb7aa33aSEmmanuel Vadot  - |
93*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/dma/at91.h>
94*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
95*cb7aa33aSEmmanuel Vadot
96*cb7aa33aSEmmanuel Vadot    i2s@f001c000 {
97*cb7aa33aSEmmanuel Vadot        #sound-dai-cells = <0>;
98*cb7aa33aSEmmanuel Vadot        compatible = "microchip,sam9x60-i2smcc";
99*cb7aa33aSEmmanuel Vadot        reg = <0xf001c000 0x100>;
100*cb7aa33aSEmmanuel Vadot        interrupts = <34 IRQ_TYPE_LEVEL_HIGH 7>;
101*cb7aa33aSEmmanuel Vadot        dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
102*cb7aa33aSEmmanuel Vadot                       AT91_XDMAC_DT_PERID(36))>,
103*cb7aa33aSEmmanuel Vadot               <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
104*cb7aa33aSEmmanuel Vadot                       AT91_XDMAC_DT_PERID(37))>;
105*cb7aa33aSEmmanuel Vadot        dma-names = "tx", "rx";
106*cb7aa33aSEmmanuel Vadot        clocks = <&i2s_clk>, <&i2s_gclk>;
107*cb7aa33aSEmmanuel Vadot        clock-names = "pclk", "gclk";
108*cb7aa33aSEmmanuel Vadot        pinctrl-names = "default";
109*cb7aa33aSEmmanuel Vadot        pinctrl-0 = <&pinctrl_i2s_default>;
110*cb7aa33aSEmmanuel Vadot    };
111