1 Allwinner SUN8I audio codec
2 ------------------------------------
4 On Sun8i-A33 SoCs, the audio is separated in different parts:
5 - A DAI driver. It uses the "sun4i-i2s" driver which is
7 Documentation/devicetree/bindings/sound/sun4i-i2s.txt
8 - An analog part of the codec which is handled as PRCM registers.
9 See Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt
10 - An digital part of the codec which is documented in this current
11 binding documentation.
12 - And finally, an audio card which links all the above components.
13 The simple-audio card will be used.
14 See Documentation/devicetree/bindings/sound/simple-card.txt
16 This bindings documentation exposes Sun8i codec (digital part).
19 - compatible: must be "allwinner,sun8i-a33-codec"
20 - reg: must contain the registers location and length
21 - interrupts: must contain the codec interrupt
22 - clocks: a list of phandle + clock-specifer pairs, one for each entry
24 - clock-names: should contain followings:
25 - "bus": the parent APB clock for this controller
26 - "mod": the parent module clock
28 Here is an example to add a sound card and the codec binding on sun8i SoCs that
29 are similar to A33 using simple-card:
32 compatible = "simple-audio-card";
33 simple-audio-card,name = "sun8i-a33-audio";
34 simple-audio-card,format = "i2s";
35 simple-audio-card,frame-master = <&link_codec>;
36 simple-audio-card,bitclock-master = <&link_codec>;
37 simple-audio-card,mclk-fs = <512>;
38 simple-audio-card,aux-devs = <&codec_analog>;
39 simple-audio-card,routing =
40 "Left DAC", "Digital Left DAC",
41 "Right DAC", "Digital Right DAC";
43 simple-audio-card,cpu {
47 link_codec: simple-audio-card,codec {
55 #sound-dai-cells = <0>;
56 compatible = "allwinner,sun8i-a33-codec";
57 reg = <0x01c22e00 0x400>;
58 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
59 clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
60 clock-names = "bus", "mod";