All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: allwinner: a64: bananapi-m64: Enable audio codec
@ 2018-11-26  5:59 ` Chen-Yu Tsai
  0 siblings, 0 replies; 4+ messages in thread
From: Chen-Yu Tsai @ 2018-11-26  5:59 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

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-jdAy2FN1RRM@public.gmane.org>
---
 .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index ef1c90401bb2..83e30e0afe5b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -97,6 +97,19 @@
 	};
 };
 
+&codec {
+	status = "okay";
+};
+
+&codec_analog {
+	hpvcc-supply = <&reg_eldo1>;
+	status = "okay";
+};
+
+&dai {
+	status = "okay";
+};
+
 &de {
 	status = "okay";
 };
@@ -326,6 +339,22 @@
 	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>;
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] arm64: dts: allwinner: a64: bananapi-m64: Enable audio codec
@ 2018-11-26  5:59 ` Chen-Yu Tsai
  0 siblings, 0 replies; 4+ messages in thread
From: Chen-Yu Tsai @ 2018-11-26  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index ef1c90401bb2..83e30e0afe5b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -97,6 +97,19 @@
 	};
 };
 
+&codec {
+	status = "okay";
+};
+
+&codec_analog {
+	hpvcc-supply = <&reg_eldo1>;
+	status = "okay";
+};
+
+&dai {
+	status = "okay";
+};
+
 &de {
 	status = "okay";
 };
@@ -326,6 +339,22 @@
 	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>;
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: dts: allwinner: a64: bananapi-m64: Enable audio codec
  2018-11-26  5:59 ` Chen-Yu Tsai
@ 2018-11-27  8:22     ` Maxime Ripard
  -1 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2018-11-27  8:22 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 582 bytes --]

On Mon, Nov 26, 2018 at 01:59:46PM +0800, Chen-Yu Tsai wrote:
> 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-jdAy2FN1RRM@public.gmane.org>

Applied, thanks!

Maxime

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] arm64: dts: allwinner: a64: bananapi-m64: Enable audio codec
@ 2018-11-27  8:22     ` Maxime Ripard
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2018-11-27  8:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 26, 2018 at 01:59:46PM +0800, Chen-Yu Tsai wrote:
> 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>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181127/2f4f6376/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-27  8:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26  5:59 [PATCH] arm64: dts: allwinner: a64: bananapi-m64: Enable audio codec Chen-Yu Tsai
2018-11-26  5:59 ` Chen-Yu Tsai
     [not found] ` <20181126055946.20344-1-wens-jdAy2FN1RRM@public.gmane.org>
2018-11-27  8:22   ` Maxime Ripard
2018-11-27  8:22     ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.