About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / devicetree / bindings / sound / sun8i-a33-codec.txt


Based on kernel version 4.16.1. Page generated on 2018-04-09 11:52 EST.

1	Allwinner SUN8I audio codec
2	------------------------------------
3	
4	On Sun8i-A33 SoCs, the audio is separated in different parts:
5		  - A DAI driver. It uses the "sun4i-i2s" driver which is
6		  documented here:
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
15	
16	This bindings documentation exposes Sun8i codec (digital part).
17	
18	Required properties:
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
23	  in clock-names.
24	- clock-names: should contain followings:
25	   - "bus": the parent APB clock for this controller
26	   - "mod": the parent module clock
27	
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:
30	
31		sound {
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";
42	
43			simple-audio-card,cpu {
44				sound-dai = <&dai>;
45			};
46	
47			link_codec: simple-audio-card,codec {
48				sound-dai = <&codec>;
49			};
50	
51		soc@1c00000 {
52			[...]
53	
54			audio-codec@1c22e00 {
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";
61			};
62		};
Hide Line Numbers


About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog