]>
Commit | Line | Data |
---|---|---|
da23173d | 1 | STMicroelectronics STM32 SPI/I2S Controller |
2 | ||
3 | The SPI/I2S block supports I2S/PCM protocols when configured on I2S mode. | |
4 | Only some SPI instances support I2S. | |
5 | ||
6 | Required properties: | |
7 | - compatible: Must be "st,stm32h7-i2s" | |
8 | - reg: Offset and length of the device's register set. | |
9 | - interrupts: Must contain the interrupt line id. | |
10 | - clocks: Must contain phandle and clock specifier pairs for each entry | |
11 | in clock-names. | |
12 | - clock-names: Must contain "i2sclk", "pclk", "x8k" and "x11k". | |
13 | "i2sclk": clock which feeds the internal clock generator | |
14 | "pclk": clock which feeds the peripheral bus interface | |
15 | "x8k": I2S parent clock for sampling rates multiple of 8kHz. | |
16 | "x11k": I2S parent clock for sampling rates multiple of 11.025kHz. | |
17 | - dmas: DMA specifiers for tx and rx dma. | |
18 | See Documentation/devicetree/bindings/dma/stm32-dma.txt. | |
19 | - dma-names: Identifier for each DMA request line. Must be "tx" and "rx". | |
20 | - pinctrl-names: should contain only value "default" | |
6c0215f5 | 21 | - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml |
da23173d | 22 | |
23 | Optional properties: | |
24 | - resets: Reference to a reset controller asserting the reset controller | |
25 | ||
26 | The device node should contain one 'port' child node with one child 'endpoint' | |
27 | node, according to the bindings defined in Documentation/devicetree/bindings/ | |
28 | graph.txt. | |
29 | ||
30 | Example: | |
31 | sound_card { | |
32 | compatible = "audio-graph-card"; | |
33 | dais = <&i2s2_port>; | |
34 | }; | |
35 | ||
36 | i2s2: audio-controller@40003800 { | |
37 | compatible = "st,stm32h7-i2s"; | |
38 | reg = <0x40003800 0x400>; | |
39 | interrupts = <36>; | |
40 | clocks = <&rcc PCLK1>, <&rcc SPI2_CK>, <&rcc PLL1_Q>, <&rcc PLL2_P>; | |
41 | clock-names = "pclk", "i2sclk", "x8k", "x11k"; | |
42 | dmas = <&dmamux2 2 39 0x400 0x1>, | |
43 | <&dmamux2 3 40 0x400 0x1>; | |
44 | dma-names = "rx", "tx"; | |
45 | pinctrl-names = "default"; | |
46 | pinctrl-0 = <&pinctrl_i2s2>; | |
47 | ||
48 | i2s2_port: port@0 { | |
49 | cpu_endpoint: endpoint { | |
50 | remote-endpoint = <&codec_endpoint>; | |
51 | format = "i2s"; | |
52 | }; | |
53 | }; | |
54 | }; | |
55 | ||
56 | audio-codec { | |
57 | codec_port: port@0 { | |
58 | codec_endpoint: endpoint { | |
59 | remote-endpoint = <&cpu_endpoint>; | |
60 | }; | |
61 | }; | |
62 | }; |