[PATCH v4 25/27] arm64: dts: qcom: starqltechn: add initial sound support
Dzmitry Sankouski
dsankouski at gmail.com
Fri Sep 13 15:08:08 UTC 2024
Add support for sound (headphones and mics only)
Also redefine slpi reserved memory, because adsp_mem overlaps with
slpi_mem inherited from sdm845.dtsi.
Signed-off-by: Dzmitry Sankouski <dsankouski at gmail.com>
---
.../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 213 +++++++++++++++++++++
1 file changed, 213 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 37433ef74502..c36ad043edf0 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -10,8 +10,15 @@
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
+
#include "sdm845.dtsi"
#include "pm8998.dtsi"
+#include "sdm845-wcd9340.dtsi"
+
+/delete-node/ &adsp_mem;
+/delete-node/ &slpi_mem;
/ {
chassis-type = "handset";
@@ -83,6 +90,16 @@ memory at a1300000 {
ftrace-size = <0x40000>;
pmsg-size = <0x40000>;
};
+
+ slpi_mem: slpi at 96700000 {
+ reg = <0 0x96700000 0 0xf00000>;
+ no-map;
+ };
+
+ adsp_mem: memory at 97800000 {
+ reg = <0 0x97800000 0 0x2000000>;
+ no-map;
+ };
};
gpio_keys {
@@ -578,6 +595,202 @@ touchscreen at 48 {
};
};
+&adsp_pas {
+ firmware-name = "qcom/sdm845/starqltechn/adsp.mbn";
+ status = "okay";
+};
+
+&lpasscc {
+ status = "okay";
+};
+
+&wcd9340 {
+ reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
+ vdd-buck-supply = <&vreg_s4a_1p8>;
+ vdd-buck-sido-supply = <&vreg_s4a_1p8>;
+ vdd-tx-supply = <&vreg_s4a_1p8>;
+ vdd-rx-supply = <&vreg_s4a_1p8>;
+ vdd-io-supply = <&vreg_s4a_1p8>;
+ qcom,micbias1-microvolt = <1800000>;
+ qcom,micbias2-microvolt = <2700000>;
+ qcom,micbias3-microvolt = <1800000>;
+ qcom,micbias4-microvolt = <1800000>;
+};
+
+&sound {
+ compatible = "qcom,sdm845-sndcard";
+ model = "Samsung Galaxy S9";
+ pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ audio-routing = "RX_BIAS", "MCLK",
+ "AMIC2", "MIC BIAS2", /* Headset Mic */
+ "AMIC3", "MIC BIAS2", /* FMLeft Tx */
+ "AMIC4", "MIC BIAS2", /* FMRight Tx */
+ "DMIC0", "MIC BIAS1", /* Digital Mic0 */
+ "DMIC5", "MIC BIAS4", /* Digital Mic1 */
+ "DMIC4", "MIC BIAS4", /* Digital Mic2 */
+ "DMIC3", "MIC BIAS3", /* Digital Mic3 */
+ "DMIC2", "MIC BIAS3", /* Digital Mic4 */
+ "DMIC1", "MIC BIAS1"; /* Digital Mic5 */
+
+ 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>;
+ };
+ };
+
+ mm3-dai-link {
+ link-name = "MultiMedia3";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
+ };
+ };
+
+ mm4-dai-link {
+ link-name = "MultiMedia4";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
+ };
+ };
+
+ mm5-dai-link {
+ link-name = "MultiMedia5";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA5>;
+ };
+ };
+
+ mm6-dai-link {
+ link-name = "MultiMedia6";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA6>;
+ };
+ };
+
+ slim-dai-link {
+ link-name = "SLIM Playback 1";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_0_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 0>;
+ };
+ };
+
+ slimcap-dai-link {
+ link-name = "SLIM Capture 1";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_0_TX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 1>;
+ };
+ };
+
+ slim2-dai-link {
+ link-name = "SLIM Playback 2";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_1_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 2>; /* AIF2_PB */
+ };
+ };
+
+ slimcap2-dai-link {
+ link-name = "SLIM Capture 2";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_1_TX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 3>; /* AIF2_CAP */
+ };
+ };
+
+ slimcap3-dai-link {
+ link-name = "SLIM Capture 3";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_2_TX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 5>; /* AIF3_CAP */
+ };
+ };
+};
+
+&q6afedai {
+ dai at 22 {
+ reg = <22>;
+ qcom,sd-lines = <1>;
+ };
+
+ dai at 23 {
+ reg = <23>;
+ qcom,sd-lines = <0>;
+ };
+};
+
+&q6asmdai {
+ dai at 0 {
+ reg = <0>;
+ };
+
+ dai at 1 {
+ reg = <1>;
+ };
+
+ dai at 2 {
+ reg = <2>;
+ };
+
+ dai at 3 {
+ reg = <3>;
+ };
+
+ dai at 4 {
+ reg = <4>;
+ };
+
+ dai at 5 {
+ reg = <5>;
+ };
+};
+
&usb_1 {
status = "okay";
};
--
2.39.2
More information about the dri-devel
mailing list