arm64: dts: allwinner: a64: bananapi-m64: Enable audio codec
authorChen-Yu Tsai <wens@csie.org>
Mon, 26 Nov 2018 05:59:46 +0000 (13:59 +0800)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 27 Nov 2018 08:22:12 +0000 (09:22 +0100)
This patch enables audio via the SoC's internal audio codec. All
relevant device nodes are enabled, and the routing is set to match
the board design. MIC1 is routed to an onboard microphone, with MBIAS
providing power. MIC2 and HP are routed to the 3.5mm headset TRRS jack.
No phantom power is provided to the headset microphone.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts

index ef1c90401bb2a027a4823ad4e50268a1523beca5..83e30e0afe5b6fbdb6a940420fc66d86e52ad30e 100644 (file)
        };
 };
 
+&codec {
+       status = "okay";
+};
+
+&codec_analog {
+       hpvcc-supply = <&reg_eldo1>;
+       status = "okay";
+};
+
+&dai {
+       status = "okay";
+};
+
 &de {
        status = "okay";
 };
        vcc-hdmi-supply = <&reg_dldo1>;
 };
 
+&sound {
+       status = "okay";
+       simple-audio-card,widgets = "Headphone", "Headphone Jack",
+                                   "Microphone", "Microphone Jack",
+                                   "Microphone", "Onboard Microphone";
+       simple-audio-card,routing =
+                       "Left DAC", "AIF1 Slot 0 Left",
+                       "Right DAC", "AIF1 Slot 0 Right",
+                       "AIF1 Slot 0 Left ADC", "Left ADC",
+                       "AIF1 Slot 0 Right ADC", "Right ADC",
+                       "Headphone Jack", "HP",
+                       "MIC2", "Microphone Jack",
+                       "Onboard Microphone", "MBIAS",
+                       "MIC1", "Onboard Microphone";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pb_pins>;