build/patch/kernel/archive/sunxi-6.2/patches.megous/arm64-dts-sun50i-a64-pinephone-Add-support-for-modem-audio.patch

73 lines
2.0 KiB
Diff

From 239cc523642ee09a7d0809a175ded7c4f271f40a Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 5 Feb 2020 23:14:27 -0600
Subject: [PATCH 099/391] arm64: dts: sun50i-a64-pinephone: Add support for
modem audio
The PinePhone has a Quectel EG25-G modem (a variant of the EC25) with
its PCM interface connected to AIF2. Add the DAI link so call audio can
be routed in hardware.
The modem supports two fixed sample rates, and one fixed word size, with
a variable BCLK frequency. Use the minimum supported BCLK frequency,
which corresponds to a slot width of 32 bits.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 25 ++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 19c712ab8..652ef6d44 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -188,6 +188,12 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ ec25_codec: ec25-codec {
+ #sound-dai-cells = <1>;
+ compatible = "quectel,ec25";
+ sound-name-prefix = "Modem";
+ };
+
i2c_csi: i2c-csi {
compatible = "i2c-gpio";
sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PE13 */
@@ -306,7 +312,7 @@ vibrator {
&codec {
pinctrl-names = "default";
- pinctrl-0 = <&aif3_pins>;
+ pinctrl-0 = <&aif2_pins>, <&aif3_pins>;
status = "okay";
};
@@ -771,6 +777,23 @@ &sound {
"Headset Microphone", "HBIAS",
"MIC2", "Headset Microphone";
+ simple-audio-card,dai-link@1 {
+ format = "dsp_a";
+ frame-master = <&link1_codec>;
+ bitclock-master = <&link1_codec>;
+ bitclock-inversion;
+
+ link1_cpu: cpu {
+ sound-dai = <&ec25_codec 0>;
+ };
+
+ link1_codec: codec {
+ sound-dai = <&codec 1>;
+ dai-tdm-slot-num = <1>;
+ dai-tdm-slot-width = <32>;
+ };
+ };
+
simple-audio-card,dai-link@2 {
format = "dsp_a";
frame-master = <&link2_codec>;
--
2.35.3