Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / sound / sun4i-codec.txt
1 * Allwinner A10 Codec
2
3 Required properties:
4 - compatible: must be one of the following compatibles:
5                 - "allwinner,sun4i-a10-codec"
6                 - "allwinner,sun6i-a31-codec"
7                 - "allwinner,sun7i-a20-codec"
8                 - "allwinner,sun8i-a23-codec"
9                 - "allwinner,sun8i-h3-codec"
10 - reg: must contain the registers location and length
11 - interrupts: must contain the codec interrupt
12 - dmas: DMA channels for tx and rx dma. See the DMA client binding,
13         Documentation/devicetree/bindings/dma/dma.txt
14 - dma-names: should include "tx" and "rx".
15 - clocks: a list of phandle + clock-specifer pairs, one for each entry
16   in clock-names.
17 - clock-names: should contain followings:
18    - "apb": the parent APB clock for this controller
19    - "codec": the parent module clock
20
21 Optional properties:
22 - allwinner,pa-gpios: gpio to enable external amplifier
23
24 Required properties for the following compatibles:
25                 - "allwinner,sun6i-a31-codec"
26                 - "allwinner,sun8i-a23-codec"
27                 - "allwinner,sun8i-h3-codec"
28 - resets: phandle to the reset control for this device
29 - allwinner,audio-routing: A list of the connections between audio components.
30                            Each entry is a pair of strings, the first being the
31                            connection's sink, the second being the connection's
32                            source. Valid names include:
33
34                            Audio pins on the SoC:
35                            "HP"
36                            "HPCOM"
37                            "LINEIN"
38                            "LINEOUT"    (not on sun8i-a23)
39                            "MIC1"
40                            "MIC2"
41                            "MIC3"       (sun6i-a31 only)
42
43                            Microphone biases from the SoC:
44                            "HBIAS"
45                            "MBIAS"
46
47                            Board connectors:
48                            "Headphone"
49                            "Headset Mic"
50                            "Line In"
51                            "Line Out"
52                            "Mic"
53                            "Speaker"
54
55 Required properties for the following compatibles:
56                 - "allwinner,sun8i-a23-codec"
57                 - "allwinner,sun8i-h3-codec"
58 - allwinner,codec-analog-controls: A phandle to the codec analog controls
59                                    block in the PRCM.
60
61 Example:
62 codec: codec@01c22c00 {
63         #sound-dai-cells = <0>;
64         compatible = "allwinner,sun7i-a20-codec";
65         reg = <0x01c22c00 0x40>;
66         interrupts = <0 30 4>;
67         clocks = <&apb0_gates 0>, <&codec_clk>;
68         clock-names = "apb", "codec";
69         dmas = <&dma 0 19>, <&dma 0 19>;
70         dma-names = "rx", "tx";
71 };
72
73 codec: codec@01c22c00 {
74         #sound-dai-cells = <0>;
75         compatible = "allwinner,sun6i-a31-codec";
76         reg = <0x01c22c00 0x98>;
77         interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
78         clocks = <&ccu CLK_APB1_CODEC>, <&ccu CLK_CODEC>;
79         clock-names = "apb", "codec";
80         resets = <&ccu RST_APB1_CODEC>;
81         dmas = <&dma 15>, <&dma 15>;
82         dma-names = "rx", "tx";
83         allwinner,audio-routing =
84                 "Headphone", "HP",
85                 "Speaker", "LINEOUT",
86                 "LINEIN", "Line In",
87                 "MIC1", "MBIAS",
88                 "MIC1", "Mic",
89                 "MIC2", "HBIAS",
90                 "MIC2", "Headset Mic";
91 };