From 300a18d13f7eaec789e79dc45bce026e098b45da Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Thu, 3 Nov 2016 15:55:53 +0800 Subject: ASoC: sun4i-codec: Add support for A31 board level audio routing The A31 SoC's codec has various inputs, outputs and microphone bias supplies. These can be routed on the board in different ways, such as: - HPCOM may be connected to have the headphone DC coupled. - Microphones all use the MBIAS main microphone supply or one mic may use the HBIAS supply, which supports headset detection and buttons. - Line Out may be routed to an audio jack, or an onboard speaker amp with power controls. Add support for specifying the audio routes in the device tree. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/sun4i-codec.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'Documentation/devicetree/bindings/sound/sun4i-codec.txt') diff --git a/Documentation/devicetree/bindings/sound/sun4i-codec.txt b/Documentation/devicetree/bindings/sound/sun4i-codec.txt index bf480e9683a3..d91a95377f49 100644 --- a/Documentation/devicetree/bindings/sound/sun4i-codec.txt +++ b/Documentation/devicetree/bindings/sound/sun4i-codec.txt @@ -22,6 +22,31 @@ Optional properties: Required properties for the following compatibles: - "allwinner,sun6i-a31-codec" - resets: phandle to the reset control for this device +- 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" + "LINEOUT" + "MIC1" + "MIC2" + "MIC3" + + Microphone biases from the SoC: + "HBIAS" + "MBIAS" + + Board connectors: + "Headphone" + "Headset Mic" + "Line In" + "Line Out" + "Mic" + "Speaker" Example: codec: codec@01c22c00 { @@ -45,4 +70,12 @@ codec: codec@01c22c00 { resets = <&ccu RST_APB1_CODEC>; dmas = <&dma 15>, <&dma 15>; dma-names = "rx", "tx"; + allwinner,audio-routing = + "Headphone", "HP", + "Speaker", "LINEOUT", + "LINEIN", "Line In", + "MIC1", "MBIAS", + "MIC1", "Mic", + "MIC2", "HBIAS", + "MIC2", "Headset Mic"; }; -- cgit