summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2016-11-25 15:34:39 +0300
committerMaxime Ripard <maxime.ripard@free-electrons.com>2017-01-10 20:52:52 +0300
commitbd85e90c66bfa0a60b6610e647a2c9871146da53 (patch)
treefded5afb0af935c29662a7e63da1d20391d0b301 /arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
parentad2151c5427f36e556af6db551d387cf1d5787db (diff)
downloadlinux-bd85e90c66bfa0a60b6610e647a2c9871146da53.tar.xz
ARM: dts: sun8i-a23: q8-tablet: Enable internal audio codec
The A23 Q8 tablets have an internal mono speaker w/ external amp which has a shutdown control tied to a GPIO pin. Both the speaker amp and the headphone jack are tied to the HP output pins. While the speaker is mono, the headset jack is stereo. Unfortunately the driver does not support automatic switching of this. In addition, the headset is DC coupled, or "direct drive" enabled. The headset's microphone is tied to MIC2 with HBIAS providing power. A separate internal microphone is tied to MIC1 with MBIAS providing power. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'arch/arm/boot/dts/sun8i-a23-q8-tablet.dts')
-rw-r--r--arch/arm/boot/dts/sun8i-a23-q8-tablet.dts23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts b/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
index 956320a6cc78..3ab5c0c09d93 100644
--- a/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
+++ b/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
@@ -48,3 +48,26 @@
model = "Q8 A23 Tablet";
compatible = "allwinner,q8-a23", "allwinner,sun8i-a23";
};
+
+&codec {
+ pinctrl-0 = <&codec_pa_pin>;
+ allwinner,pa-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
+ allwinner,audio-routing =
+ "Headphone", "HP",
+ "Headphone", "HPCOM",
+ "Speaker", "HP",
+ "MIC1", "Mic",
+ "MIC2", "Headset Mic",
+ "Mic", "MBIAS",
+ "Headset Mic", "HBIAS";
+ status = "okay";
+};
+
+&pio {
+ codec_pa_pin: codec_pa_pin@0 {
+ allwinner,pins = "PH9";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+};