2019-05-16 15:53:29

by Torsten Duwe

[permalink] [raw]
Subject: [PATCH v2 3/4] arm64: DTS: allwinner: a64: Enable audio on Teres-I

From: Harald Geyer <[email protected]>

The TERES-I has internal speakers (left, right), internal microphone
and a headset combo jack (headphones + mic), "CTIA" (android) pinout.

The headphone and mic detect lines of the A64 are connected properly,
but AFAIK currently unsupported by the driver.

Signed-off-by: Harald Geyer <[email protected]>
Signed-off-by: Torsten Duwe <[email protected]>
---
.../boot/dts/allwinner/sun50i-a64-teres-i.dts | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
index f9eede0a8bd3..d57049fbdaca 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
@@ -70,6 +70,25 @@
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
};
+
+ speaker_amp: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */
+ sound-name-prefix = "Speaker Amp";
+ };
+};
+
+&codec {
+ status = "okay";
+};
+
+&codec_analog {
+ cpvdd-supply = <&reg_eldo1>;
+ status = "okay";
+};
+
+&dai {
+ status = "okay";
};

&ehci1 {
@@ -258,6 +286,29 @@
vcc-hdmi-supply = <&reg_dldo1>;
};

+&sound {
+ simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
+ simple-audio-card,widgets = "Headphone", "Headphone Jack",
+ "Microphone", "Headset Microphone",
+ "Microphone", "Internal Microphone",
+ "Speaker", "Internal Speaker";
+ 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",
+ "Speaker Amp INL", "LINEOUT",
+ "Speaker Amp INR", "LINEOUT",
+ "Internal Speaker", "Speaker Amp OUTL",
+ "Internal Speaker", "Speaker Amp OUTR",
+ "Internal Microphone", "MBIAS",
+ "MIC1", "Internal Microphone",
+ "Headset Microphone", "HBIAS",
+ "MIC2", "Headset Microphone";
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;


2019-05-20 08:10:04

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH v2 3/4] arm64: DTS: allwinner: a64: Enable audio on Teres-I

On Thu, May 16, 2019 at 11:52 PM Torsten Duwe <[email protected]> wrote:
>
> From: Harald Geyer <[email protected]>
>
> The TERES-I has internal speakers (left, right), internal microphone
> and a headset combo jack (headphones + mic), "CTIA" (android) pinout.
>
> The headphone and mic detect lines of the A64 are connected properly,
> but AFAIK currently unsupported by the driver.
>
> Signed-off-by: Harald Geyer <[email protected]>
> Signed-off-by: Torsten Duwe <[email protected]>

Looks good to me.

Reviewed-by: Chen-Yu Tsai <[email protected]>

2019-05-20 10:06:02

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v2 3/4] arm64: DTS: allwinner: a64: Enable audio on Teres-I

On Mon, May 20, 2019 at 03:56:13PM +0800, Chen-Yu Tsai wrote:
> On Thu, May 16, 2019 at 11:52 PM Torsten Duwe <[email protected]> wrote:
> >
> > From: Harald Geyer <[email protected]>
> >
> > The TERES-I has internal speakers (left, right), internal microphone
> > and a headset combo jack (headphones + mic), "CTIA" (android) pinout.
> >
> > The headphone and mic detect lines of the A64 are connected properly,
> > but AFAIK currently unsupported by the driver.
> >
> > Signed-off-by: Harald Geyer <[email protected]>
> > Signed-off-by: Torsten Duwe <[email protected]>
>
> Looks good to me.
>
> Reviewed-by: Chen-Yu Tsai <[email protected]>

Applied, thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Attachments:
(No filename) (762.00 B)
signature.asc (235.00 B)
Download all attachments