2015-09-12 13:26:23 +00:00
|
|
|
* Allwinner A10 Codec
|
|
|
|
|
|
|
|
Required properties:
|
2016-11-03 07:55:48 +00:00
|
|
|
- compatible: must be one of the following compatibles:
|
|
|
|
- "allwinner,sun4i-a10-codec"
|
|
|
|
- "allwinner,sun6i-a31-codec"
|
|
|
|
- "allwinner,sun7i-a20-codec"
|
2016-11-25 12:34:36 +00:00
|
|
|
- "allwinner,sun8i-a23-codec"
|
2016-11-25 12:34:40 +00:00
|
|
|
- "allwinner,sun8i-h3-codec"
|
2015-09-12 13:26:23 +00:00
|
|
|
- reg: must contain the registers location and length
|
|
|
|
- interrupts: must contain the codec interrupt
|
|
|
|
- dmas: DMA channels for tx and rx dma. See the DMA client binding,
|
|
|
|
Documentation/devicetree/bindings/dma/dma.txt
|
|
|
|
- dma-names: should include "tx" and "rx".
|
|
|
|
- clocks: a list of phandle + clock-specifer pairs, one for each entry
|
|
|
|
in clock-names.
|
2017-02-27 22:29:56 +00:00
|
|
|
- clock-names: should contain the following:
|
2015-09-12 13:26:23 +00:00
|
|
|
- "apb": the parent APB clock for this controller
|
|
|
|
- "codec": the parent module clock
|
|
|
|
|
2015-12-11 18:43:57 +00:00
|
|
|
Optional properties:
|
|
|
|
- allwinner,pa-gpios: gpio to enable external amplifier
|
|
|
|
|
2016-11-03 07:55:48 +00:00
|
|
|
Required properties for the following compatibles:
|
|
|
|
- "allwinner,sun6i-a31-codec"
|
2016-11-25 12:34:36 +00:00
|
|
|
- "allwinner,sun8i-a23-codec"
|
2016-11-25 12:34:40 +00:00
|
|
|
- "allwinner,sun8i-h3-codec"
|
2016-11-03 07:55:48 +00:00
|
|
|
- resets: phandle to the reset control for this device
|
2016-11-03 07:55:53 +00:00
|
|
|
- allwinner,audio-routing: A list of the connections between audio components.
|
|
|
|
Each entry is a pair of strings, the first being the
|
|
|
|
connection's sink, the second being the connection's
|
|
|
|
source. Valid names include:
|
|
|
|
|
|
|
|
Audio pins on the SoC:
|
|
|
|
"HP"
|
|
|
|
"HPCOM"
|
|
|
|
"LINEIN"
|
2016-11-25 12:34:36 +00:00
|
|
|
"LINEOUT" (not on sun8i-a23)
|
2016-11-03 07:55:53 +00:00
|
|
|
"MIC1"
|
|
|
|
"MIC2"
|
2016-11-25 12:34:36 +00:00
|
|
|
"MIC3" (sun6i-a31 only)
|
2016-11-03 07:55:53 +00:00
|
|
|
|
|
|
|
Microphone biases from the SoC:
|
|
|
|
"HBIAS"
|
|
|
|
"MBIAS"
|
|
|
|
|
|
|
|
Board connectors:
|
|
|
|
"Headphone"
|
|
|
|
"Headset Mic"
|
|
|
|
"Line In"
|
|
|
|
"Line Out"
|
|
|
|
"Mic"
|
|
|
|
"Speaker"
|
2016-11-03 07:55:48 +00:00
|
|
|
|
2016-11-25 12:34:36 +00:00
|
|
|
Required properties for the following compatibles:
|
|
|
|
- "allwinner,sun8i-a23-codec"
|
2016-11-25 12:34:40 +00:00
|
|
|
- "allwinner,sun8i-h3-codec"
|
2016-11-25 12:34:36 +00:00
|
|
|
- allwinner,codec-analog-controls: A phandle to the codec analog controls
|
|
|
|
block in the PRCM.
|
|
|
|
|
2015-09-12 13:26:23 +00:00
|
|
|
Example:
|
|
|
|
codec: codec@01c22c00 {
|
|
|
|
#sound-dai-cells = <0>;
|
|
|
|
compatible = "allwinner,sun7i-a20-codec";
|
|
|
|
reg = <0x01c22c00 0x40>;
|
|
|
|
interrupts = <0 30 4>;
|
|
|
|
clocks = <&apb0_gates 0>, <&codec_clk>;
|
|
|
|
clock-names = "apb", "codec";
|
|
|
|
dmas = <&dma 0 19>, <&dma 0 19>;
|
|
|
|
dma-names = "rx", "tx";
|
|
|
|
};
|
2016-11-03 07:55:48 +00:00
|
|
|
|
|
|
|
codec: codec@01c22c00 {
|
|
|
|
#sound-dai-cells = <0>;
|
|
|
|
compatible = "allwinner,sun6i-a31-codec";
|
|
|
|
reg = <0x01c22c00 0x98>;
|
|
|
|
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
|
|
|
|
clocks = <&ccu CLK_APB1_CODEC>, <&ccu CLK_CODEC>;
|
|
|
|
clock-names = "apb", "codec";
|
|
|
|
resets = <&ccu RST_APB1_CODEC>;
|
|
|
|
dmas = <&dma 15>, <&dma 15>;
|
|
|
|
dma-names = "rx", "tx";
|
2016-11-03 07:55:53 +00:00
|
|
|
allwinner,audio-routing =
|
|
|
|
"Headphone", "HP",
|
|
|
|
"Speaker", "LINEOUT",
|
|
|
|
"LINEIN", "Line In",
|
|
|
|
"MIC1", "MBIAS",
|
|
|
|
"MIC1", "Mic",
|
|
|
|
"MIC2", "HBIAS",
|
|
|
|
"MIC2", "Headset Mic";
|
2016-11-03 07:55:48 +00:00
|
|
|
};
|