summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/sound/atmel,at91-ssc.yaml
blob: a05e614318242e1b3c0ca21973c4755f014a797c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/atmel,at91-ssc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel Serial Synchronous Serial (SSC)

maintainers:
  - Andrei Simion <andrei.simion@microchip.com>

description:
  The Atmel Synchronous Serial Controller (SSC) provides a versatile
  synchronous communication link for audio and telecom applications,
  supporting protocols like I2S, Short Frame Sync, and Long Frame Sync.

properties:
  compatible:
    enum:
      - atmel,at91rm9200-ssc
      - atmel,at91sam9g45-ssc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: pclk

  dmas:
    items:
      - description: TX DMA Channel
      - description: RX DMA Channel

  dma-names:
    items:
      - const: tx
      - const: rx

  atmel,clk-from-rk-pin:
    description:
      Specify the clock source for the SSC (Synchronous Serial Controller)
      when operating in slave mode. By default, the clock is sourced from
      the TK pin.
    type: boolean

  "#sound-dai-cells":
    const: 0

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names

allOf:
  - $ref: dai-common.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - atmel,at91sam9g45-ssc
    then:
      required:
        - dmas
        - dma-names

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/at91.h>
    #include <dt-bindings/dma/at91.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    ssc@100000 {
       compatible = "atmel,at91sam9g45-ssc";
       reg = <0x100000 0x4000>;
       interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
       dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
                     AT91_XDMAC_DT_PERID(38))>,
              <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
                     AT91_XDMAC_DT_PERID(39))>;
       dma-names = "tx", "rx";
       clocks = <&pmc PMC_TYPE_PERIPHERAL 28>;
       clock-names = "pclk";
       #sound-dai-cells = <0>;
    };

    ssc@c00000 {
      compatible = "atmel,at91rm9200-ssc";
      reg = <0xc00000 0x4000>;
      interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
      clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
      clock-names = "pclk";
    };