123 lines
2.9 KiB
Diff
123 lines
2.9 KiB
Diff
From: pmOS Mi8Lite <macosmojave2@gmail.com>
|
|
Subject: [PATCH] arm64: dts: qcom: sdm660: enable internal audio on platina
|
|
|
|
Wire up the SDM660 internal sound card on the Xiaomi Mi 8 Lite: the PM660L
|
|
analog codec + LPASS digital codec driven by the Q6/ADSP (headphones out +
|
|
internal mic), including the q6asm/q6afe DAI children the frontends/backends
|
|
need. Mirrors sdm660-xiaomi-lavender-common.dtsi.
|
|
|
|
Signed-off-by: pmOS Mi8Lite <macosmojave2@gmail.com>
|
|
---
|
|
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-platina.dts
|
|
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-platina.dts
|
|
@@ -15,6 +15,8 @@
|
|
#include <dt-bindings/input/gpio-keys.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
|
|
+#include <dt-bindings/sound/qcom,q6afe.h>
|
|
+#include <dt-bindings/sound/qcom,q6asm.h>
|
|
#include <dt-bindings/clock/qcom,gcc-sdm660.h>
|
|
|
|
/ {
|
|
@@ -1012,3 +1014,100 @@
|
|
&cpu5 { clocks = <&cpu_osm 1>; operating-points-v2 = <&cpu4_opp_table>; };
|
|
&cpu6 { clocks = <&cpu_osm 1>; operating-points-v2 = <&cpu4_opp_table>; };
|
|
&cpu7 { clocks = <&cpu_osm 1>; operating-points-v2 = <&cpu4_opp_table>; };
|
|
+
|
|
+/*
|
|
+ * Audio: SDM660 internal sound card (headphones + mic via the PM660L analog
|
|
+ * codec + LPASS digital codec, driven by the Q6/ADSP). Mirrors the working
|
|
+ * sdm660-xiaomi-lavender-common.dtsi wiring; speaker (NXP TFA98xx) is separate.
|
|
+ */
|
|
+&q6afedai {
|
|
+ dai@81 {
|
|
+ reg = <INT0_MI2S_RX>;
|
|
+ qcom,sd-lines = <0 1>;
|
|
+ };
|
|
+
|
|
+ dai@88 {
|
|
+ reg = <INT3_MI2S_TX>;
|
|
+ qcom,sd-lines = <0 1>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&q6asmdai {
|
|
+ dai@0 {
|
|
+ reg = <0>;
|
|
+ };
|
|
+
|
|
+ dai@1 {
|
|
+ reg = <1>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&lpass_codec {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&pm660l_codec {
|
|
+ vdd-cdc-io-supply = <&vreg_s4a_2p04>;
|
|
+ vdd-cdc-tx-rx-cx-supply = <&vreg_s4a_2p04>;
|
|
+ vdd-micbias-supply = <&vreg_l7b_3p125>;
|
|
+
|
|
+ qcom,micbias-lvl = <2600>;
|
|
+ qcom,micbias1-ext-cap;
|
|
+
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&sound {
|
|
+ compatible = "qcom,sdm660-internal-sndcard";
|
|
+ model = "Xiaomi Mi 8 Lite";
|
|
+
|
|
+ pinctrl-0 = <&cdc_pdm_default>, <&cdc_dmic_default>;
|
|
+ pinctrl-names = "default";
|
|
+
|
|
+ audio-routing = "PDM_RX1", "Digital PDM_RX1",
|
|
+ "PDM_RX2", "Digital PDM_RX2",
|
|
+ "PDM_RX3", "Digital PDM_RX3",
|
|
+ "Digital LPASS_PDM_TX", "PDM_TX",
|
|
+ "AMIC1", "MIC BIAS External1",
|
|
+ "AMIC2", "MIC BIAS External2";
|
|
+
|
|
+ mm1-dai-link {
|
|
+ link-name = "MultiMedia1";
|
|
+ cpu {
|
|
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ mm2-dai-link {
|
|
+ link-name = "MultiMedia2";
|
|
+ cpu {
|
|
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ int0-mi2s-dai-link {
|
|
+ link-name = "Internal MI2S Playback";
|
|
+ cpu {
|
|
+ sound-dai = <&q6afedai INT0_MI2S_RX>;
|
|
+ };
|
|
+ platform {
|
|
+ sound-dai = <&q6routing>;
|
|
+ };
|
|
+ codec {
|
|
+ sound-dai = <&pm660l_codec 0>, <&lpass_codec 0>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ int3-mi2s-dai-link {
|
|
+ link-name = "Internal MI2S Capture";
|
|
+ cpu {
|
|
+ sound-dai = <&q6afedai INT3_MI2S_TX>;
|
|
+ };
|
|
+ platform {
|
|
+ sound-dai = <&q6routing>;
|
|
+ };
|
|
+ codec {
|
|
+ sound-dai = <&pm660l_codec 1>, <&lpass_codec 1>;
|
|
+ };
|
|
+ };
|
|
+};
|