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