build/patch/kernel/archive/sunxi-5.10/megous/arm64-dts-allwinner-pinephone-Add-support-for-Blueto.patch

72 lines
1.9 KiB
Diff

From 0c017aaa955dba62968a7cef3289a04e2823936d Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Thu, 6 Feb 2020 23:49:27 -0600
Subject: [PATCH 110/351] arm64: dts: allwinner: pinephone: Add support for
Bluetooth audio
The PinePhone has a Bluetooth chip with its PCM interface connected to
AIF3. Add the DAI link so headeset audio can be routed in hardware.
Even though the link is mono, configuring the link for 2 slots is
required for compatibility with AIF2, which uses a single 32-bit slot,
and which shares its clock dividers with AIF3. Using equal clock
frequencies allows the modem and headset to be used at the same time.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index a406db735b5e..92e1a2892fe8 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -174,6 +174,11 @@ bat: battery {
<0xdf 98>;
};
+ bt_sco_codec: bt-sco-codec {
+ #sound-dai-cells = <1>;
+ compatible = "linux,bt-sco";
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -287,6 +292,8 @@ sgm3140_flash: led {
};
&codec {
+ pinctrl-names = "default";
+ pinctrl-0 = <&aif3_pins>;
status = "okay";
};
@@ -759,6 +766,23 @@ &sound {
"MIC1", "Internal Microphone",
"Headset Microphone", "HBIAS",
"MIC2", "Headset Microphone";
+
+ simple-audio-card,dai-link@2 {
+ format = "dsp_a";
+ frame-master = <&link2_codec>;
+ bitclock-master = <&link2_codec>;
+ bitclock-inversion;
+
+ link2_cpu: cpu {
+ sound-dai = <&bt_sco_codec 0>;
+ };
+
+ link2_codec: codec {
+ sound-dai = <&codec 2>;
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <16>;
+ };
+ };
};
&uart0 {
--
2.34.0