1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/samsung-i2s.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Samsung SoC I2S controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Krzysztof Kozlowski <krzk@kernel.org>
11c66ec88fSEmmanuel Vadot  - Sylwester Nawrocki <s.nawrocki@samsung.com>
12c66ec88fSEmmanuel Vadot
138bab661aSEmmanuel VadotallOf:
148bab661aSEmmanuel Vadot  - $ref: dai-common.yaml#
158bab661aSEmmanuel Vadot
16c66ec88fSEmmanuel Vadotproperties:
17c66ec88fSEmmanuel Vadot  compatible:
18c66ec88fSEmmanuel Vadot    description: |
19c66ec88fSEmmanuel Vadot      samsung,s3c6410-i2s: for 8/16/24bit stereo I2S.
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel Vadot      samsung,s5pv210-i2s: for 8/16/24bit multichannel (5.1) I2S with
22c66ec88fSEmmanuel Vadot      secondary FIFO, s/w reset control and internal mux for root clock
23c66ec88fSEmmanuel Vadot      source.
24c66ec88fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadot      samsung,exynos5420-i2s: for 8/16/24bit multichannel (5.1) I2S for
26c66ec88fSEmmanuel Vadot      playback, stereo channel capture, secondary FIFO using internal
27c66ec88fSEmmanuel Vadot      or external DMA, s/w reset control, internal mux for root clock
28c66ec88fSEmmanuel Vadot      source and 7.1 channel TDM support for playback; TDM (Time division
29c66ec88fSEmmanuel Vadot      multiplexing) is to allow transfer of multiple channel audio data on
30c66ec88fSEmmanuel Vadot      single data line.
31c66ec88fSEmmanuel Vadot
32c66ec88fSEmmanuel Vadot      samsung,exynos7-i2s: with all the available features of Exynos5 I2S.
33c66ec88fSEmmanuel Vadot      Exynos7 I2S has 7.1 channel TDM support for capture, secondary FIFO
34c66ec88fSEmmanuel Vadot      with only external DMA and more number of root clock sampling
35c66ec88fSEmmanuel Vadot      frequencies.
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot      samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports
38c66ec88fSEmmanuel Vadot      stereo channels. Exynos7 I2S1 upgraded to 5.1 multichannel with
39c66ec88fSEmmanuel Vadot      slightly modified bit offsets.
40cb7aa33aSEmmanuel Vadot
41cb7aa33aSEmmanuel Vadot      tesla,fsd-i2s: for 8/16/24bit stereo channel I2S for playback and
42cb7aa33aSEmmanuel Vadot      capture, secondary FIFO using external DMA, s/w reset control,
43cb7aa33aSEmmanuel Vadot      internal mux for root clock source with all root clock sampling
44cb7aa33aSEmmanuel Vadot      frequencies supported by Exynos7 I2S and 7.1 channel TDM support
45cb7aa33aSEmmanuel Vadot      for playback and capture TDM (Time division multiplexing) to allow
46cb7aa33aSEmmanuel Vadot      transfer of multiple channel audio data on single data line.
47*8d13bc63SEmmanuel Vadot    oneOf:
48*8d13bc63SEmmanuel Vadot      - enum:
49c66ec88fSEmmanuel Vadot          - samsung,s3c6410-i2s
50c66ec88fSEmmanuel Vadot          - samsung,s5pv210-i2s
51c66ec88fSEmmanuel Vadot          - samsung,exynos5420-i2s
52c66ec88fSEmmanuel Vadot          - samsung,exynos7-i2s
53c66ec88fSEmmanuel Vadot          - samsung,exynos7-i2s1
54cb7aa33aSEmmanuel Vadot          - tesla,fsd-i2s
55*8d13bc63SEmmanuel Vadot      - items:
56*8d13bc63SEmmanuel Vadot          - enum:
57*8d13bc63SEmmanuel Vadot              - samsung,exynos5433-i2s
58*8d13bc63SEmmanuel Vadot          - const: samsung,exynos7-i2s
59c66ec88fSEmmanuel Vadot
606be33864SEmmanuel Vadot  '#address-cells':
616be33864SEmmanuel Vadot    const: 1
626be33864SEmmanuel Vadot
636be33864SEmmanuel Vadot  '#size-cells':
646be33864SEmmanuel Vadot    const: 0
656be33864SEmmanuel Vadot
66c66ec88fSEmmanuel Vadot  reg:
67c66ec88fSEmmanuel Vadot    maxItems: 1
68c66ec88fSEmmanuel Vadot
69c66ec88fSEmmanuel Vadot  dmas:
70c66ec88fSEmmanuel Vadot    minItems: 2
71c66ec88fSEmmanuel Vadot    maxItems: 3
72c66ec88fSEmmanuel Vadot
73c66ec88fSEmmanuel Vadot  dma-names:
74c66ec88fSEmmanuel Vadot    oneOf:
75c66ec88fSEmmanuel Vadot      - items:
76c66ec88fSEmmanuel Vadot          - const: tx
77c66ec88fSEmmanuel Vadot          - const: rx
78c66ec88fSEmmanuel Vadot      - items:
79c66ec88fSEmmanuel Vadot          - const: tx
80c66ec88fSEmmanuel Vadot          - const: rx
81c66ec88fSEmmanuel Vadot          - const: tx-sec
82c66ec88fSEmmanuel Vadot
83c66ec88fSEmmanuel Vadot  clocks:
84c66ec88fSEmmanuel Vadot    minItems: 1
85c66ec88fSEmmanuel Vadot    maxItems: 3
86c66ec88fSEmmanuel Vadot
87c66ec88fSEmmanuel Vadot  clock-names:
88c66ec88fSEmmanuel Vadot    oneOf:
89c66ec88fSEmmanuel Vadot      - items:
90c66ec88fSEmmanuel Vadot          - const: iis
91c66ec88fSEmmanuel Vadot      - items: # for I2S0
92c66ec88fSEmmanuel Vadot          - const: iis
93c66ec88fSEmmanuel Vadot          - const: i2s_opclk0
94c66ec88fSEmmanuel Vadot          - const: i2s_opclk1
95c66ec88fSEmmanuel Vadot      - items: # for I2S1 and I2S2
96c66ec88fSEmmanuel Vadot          - const: iis
97c66ec88fSEmmanuel Vadot          - const: i2s_opclk0
98c66ec88fSEmmanuel Vadot    description: |
99c66ec88fSEmmanuel Vadot      "iis" is the I2S bus clock and i2s_opclk0, i2s_opclk1 are sources
100c66ec88fSEmmanuel Vadot      of the root clock. I2S0 has internal mux to select the source
101c66ec88fSEmmanuel Vadot      of root clock and I2S1 and I2S2 doesn't have any such mux.
102c66ec88fSEmmanuel Vadot
103c66ec88fSEmmanuel Vadot  "#clock-cells":
104c66ec88fSEmmanuel Vadot    const: 1
105c66ec88fSEmmanuel Vadot
106c66ec88fSEmmanuel Vadot  clock-output-names:
107c66ec88fSEmmanuel Vadot    deprecated: true
108c66ec88fSEmmanuel Vadot    oneOf:
109c66ec88fSEmmanuel Vadot      - items: # for I2S0
110c66ec88fSEmmanuel Vadot          - const: i2s_cdclk0
111c66ec88fSEmmanuel Vadot      - items: # for I2S1
112c66ec88fSEmmanuel Vadot          - const: i2s_cdclk1
113c66ec88fSEmmanuel Vadot      - items: # for I2S2
114c66ec88fSEmmanuel Vadot          - const: i2s_cdclk2
115c66ec88fSEmmanuel Vadot    description: Names of the CDCLK I2S output clocks.
116c66ec88fSEmmanuel Vadot
1176be33864SEmmanuel Vadot  interrupts:
1186be33864SEmmanuel Vadot    maxItems: 1
1196be33864SEmmanuel Vadot
120c66ec88fSEmmanuel Vadot  samsung,idma-addr:
121c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
122c66ec88fSEmmanuel Vadot    description: |
123c66ec88fSEmmanuel Vadot      Internal DMA register base address of the audio
124c66ec88fSEmmanuel Vadot      subsystem (used in secondary sound source).
125c66ec88fSEmmanuel Vadot
1266be33864SEmmanuel Vadot  power-domains:
1276be33864SEmmanuel Vadot    maxItems: 1
1286be33864SEmmanuel Vadot
129c66ec88fSEmmanuel Vadot  "#sound-dai-cells":
130c66ec88fSEmmanuel Vadot    const: 1
131c66ec88fSEmmanuel Vadot
132c66ec88fSEmmanuel Vadotrequired:
133c66ec88fSEmmanuel Vadot  - compatible
134c66ec88fSEmmanuel Vadot  - reg
135c66ec88fSEmmanuel Vadot  - dmas
136c66ec88fSEmmanuel Vadot  - dma-names
137c66ec88fSEmmanuel Vadot  - clocks
138c66ec88fSEmmanuel Vadot  - clock-names
139c66ec88fSEmmanuel Vadot
1408bab661aSEmmanuel VadotunevaluatedProperties: false
141c66ec88fSEmmanuel Vadot
142c66ec88fSEmmanuel Vadotexamples:
143c66ec88fSEmmanuel Vadot  - |
144c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/exynos-audss-clk.h>
145c66ec88fSEmmanuel Vadot
146c66ec88fSEmmanuel Vadot    i2s0: i2s@3830000 {
147c66ec88fSEmmanuel Vadot        compatible = "samsung,s5pv210-i2s";
148c66ec88fSEmmanuel Vadot        reg = <0x03830000 0x100>;
149c66ec88fSEmmanuel Vadot        dmas = <&pdma0 10>,
150c66ec88fSEmmanuel Vadot                <&pdma0 9>,
151c66ec88fSEmmanuel Vadot                <&pdma0 8>;
152c66ec88fSEmmanuel Vadot        dma-names = "tx", "rx", "tx-sec";
153c66ec88fSEmmanuel Vadot        clocks = <&clock_audss EXYNOS_I2S_BUS>,
154c66ec88fSEmmanuel Vadot                <&clock_audss EXYNOS_I2S_BUS>,
155c66ec88fSEmmanuel Vadot                <&clock_audss EXYNOS_SCLK_I2S>;
156c66ec88fSEmmanuel Vadot        clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
157c66ec88fSEmmanuel Vadot        #clock-cells = <1>;
158c66ec88fSEmmanuel Vadot        samsung,idma-addr = <0x03000000>;
159c66ec88fSEmmanuel Vadot        pinctrl-names = "default";
160c66ec88fSEmmanuel Vadot        pinctrl-0 = <&i2s0_bus>;
161c66ec88fSEmmanuel Vadot        #sound-dai-cells = <1>;
162c66ec88fSEmmanuel Vadot    };
163