[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240913-starqltechn_integration_upstream-v4-25-2d2efd5c5877@gmail.com>
Date: Fri, 13 Sep 2024 18:08:08 +0300
From: Dzmitry Sankouski <dsankouski@...il.com>
To: Sebastian Reichel <sre@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Neil Armstrong <neil.armstrong@...aro.org>,
Jessica Zhang <quic_jesszhan@...cinc.com>, Sam Ravnborg <sam@...nborg.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Lee Jones <lee@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>, Pavel Machek <pavel@....cz>,
Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Uwe Kleine-König <ukleinek@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>, Chanwoo Choi <cw00.choi@...sung.com>,
Simona Vetter <simona@...ll.ch>, cros-qcom-dts-watchers@...omium.org,
Konrad Dybcio <konradybcio@...nel.org>,
Simona Vetter <simona.vetter@...ll.ch>,
Konrad Dybcio <konradybcio@...nel.org>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
linux-input@...r.kernel.org, linux-leds@...r.kernel.org,
linux-pwm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
Dzmitry Sankouski <dsankouski@...il.com>
Subject: [PATCH v4 25/27] arm64: dts: qcom: starqltechn: add initial sound
support
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@...il.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@...00000 {
ftrace-size = <0x40000>;
pmsg-size = <0x40000>;
};
+
+ slpi_mem: slpi@...00000 {
+ reg = <0 0x96700000 0 0xf00000>;
+ no-map;
+ };
+
+ adsp_mem: memory@...00000 {
+ reg = <0 0x97800000 0 0x2000000>;
+ no-map;
+ };
};
gpio_keys {
@@ -578,6 +595,202 @@ touchscreen@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@22 {
+ reg = <22>;
+ qcom,sd-lines = <1>;
+ };
+
+ dai@23 {
+ reg = <23>;
+ qcom,sd-lines = <0>;
+ };
+};
+
+&q6asmdai {
+ dai@0 {
+ reg = <0>;
+ };
+
+ dai@1 {
+ reg = <1>;
+ };
+
+ dai@2 {
+ reg = <2>;
+ };
+
+ dai@3 {
+ reg = <3>;
+ };
+
+ dai@4 {
+ reg = <4>;
+ };
+
+ dai@5 {
+ reg = <5>;
+ };
+};
+
&usb_1 {
status = "okay";
};
--
2.39.2
Powered by blists - more mailing lists