linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dzmitry Sankouski <dsankouski@gmail.com>
To: "Sebastian Reichel" <sre@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Jessica Zhang" <quic_jesszhan@quicinc.com>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Lee Jones" <lee@kernel.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Uwe Kleine-König" <ukleinek@kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	cros-qcom-dts-watchers@chromium.org,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	"Simona Vetter" <simona.vetter@ffwll.ch>,
	"Konrad Dybcio" <konradybcio@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	 dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	 linux-input@vger.kernel.org, linux-leds@vger.kernel.org,
	 linux-pwm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	 Dzmitry Sankouski <dsankouski@gmail.com>
Subject: [PATCH v4 25/27] arm64: dts: qcom: starqltechn: add initial sound support
Date: Fri, 13 Sep 2024 18:08:08 +0300	[thread overview]
Message-ID: <20240913-starqltechn_integration_upstream-v4-25-2d2efd5c5877@gmail.com> (raw)
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-0-2d2efd5c5877@gmail.com>

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@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@a1300000 {
 			ftrace-size = <0x40000>;
 			pmsg-size = <0x40000>;
 		};
+
+		slpi_mem: slpi@96700000 {
+			reg = <0 0x96700000 0 0xf00000>;
+			no-map;
+		};
+
+		adsp_mem: memory@97800000 {
+			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


  parent reply	other threads:[~2024-09-13 15:09 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 15:07 [PATCH v4 00/27] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
2024-09-13 15:07 ` [PATCH v4 01/27] power: supply: add undervoltage health status property Dzmitry Sankouski
2024-09-14  8:38   ` Sebastian Reichel
2024-09-13 15:07 ` [PATCH v4 02/27] clk: qcom: clk-rcg2: name refactoring Dzmitry Sankouski
2024-09-13 18:56   ` Stephen Boyd
2024-09-13 15:07 ` [PATCH v4 03/27] gcc-sdm845: Add general purpose clock ops Dzmitry Sankouski
2024-09-13 15:07 ` [PATCH v4 04/27] dt-bindings: panel: add Samsung s6e3ha8 Dzmitry Sankouski
2024-09-16 20:08   ` Krzysztof Kozlowski
2024-09-13 15:07 ` [PATCH v4 05/27] dt-bindings: mfd: add maxim,max77705 Dzmitry Sankouski
2024-09-13 16:37   ` Rob Herring (Arm)
2024-09-13 21:55   ` Rob Herring
2024-09-13 15:07 ` [PATCH v4 06/27] dt-bindings: mfd: add samsung,s2dos05 Dzmitry Sankouski
2024-09-16  9:13   ` Krzysztof Kozlowski
2024-09-19 12:50     ` Dzmitry Sankouski
2024-09-13 15:07 ` [PATCH v4 07/27] drm/panel: Add support for S6E3HA8 panel driver Dzmitry Sankouski
2024-09-21 20:34   ` Dmitry Baryshkov
2024-09-13 15:07 ` [PATCH v4 08/27] mfd: max77693: remove unused declarations Dzmitry Sankouski
2024-09-16  9:09   ` Krzysztof Kozlowski
2024-09-18 12:53     ` Dzmitry Sankouski
2024-09-19  7:00       ` Krzysztof Kozlowski
2024-09-19  8:40         ` Dzmitry Sankouski
2024-09-19 10:07           ` Krzysztof Kozlowski
2024-09-13 15:07 ` [PATCH v4 09/27] mfd: Add new driver for MAX77705 PMIC Dzmitry Sankouski
2024-09-13 15:07 ` [PATCH v4 10/27] input: max77693: add max77705 haptic support Dzmitry Sankouski
2024-09-13 15:07 ` [PATCH v4 11/27] power: supply: max77705: Add charger driver for Maxim 77705 Dzmitry Sankouski
2024-09-13 15:07 ` [PATCH v4 12/27] power: supply: max77705: Add fuel gauge " Dzmitry Sankouski
2024-09-13 15:07 ` [PATCH v4 13/27] leds: max77705: Add LEDs support Dzmitry Sankouski
2024-09-13 15:07 ` [PATCH v4 14/27] mfd: sec-core: add s2dos05 support Dzmitry Sankouski
2024-09-16  9:09   ` Krzysztof Kozlowski
2024-09-13 15:07 ` [PATCH v4 15/27] regulator: add s2dos05 regulator support Dzmitry Sankouski
2024-09-16  9:21   ` Krzysztof Kozlowski
2024-09-19 14:28     ` Dzmitry Sankouski
2024-09-23  9:07       ` Krzysztof Kozlowski
2024-09-13 15:07 ` [PATCH v4 16/27] arm64: dts: qcom: sdm845: enable gmu Dzmitry Sankouski
2024-09-13 19:02   ` Steev Klimaszewski
2024-09-13 15:08 ` [PATCH v4 17/27] arm64: dts: qcom: starqltechn: remove wifi Dzmitry Sankouski
2024-09-13 15:08 ` [PATCH v4 18/27] arm64: dts: qcom: starqltechn: fix usb regulator mistake Dzmitry Sankouski
2024-09-13 15:08 ` [PATCH v4 19/27] arm64: dts: qcom: starqltechn: refactor node order Dzmitry Sankouski
2024-09-13 15:08 ` [PATCH v4 20/27] arm64: dts: qcom: starqltechn: remove excess reserved gpios Dzmitry Sankouski
2024-09-13 15:08 ` [PATCH v4 21/27] arm64: dts: qcom: starqltechn: add gpio keys Dzmitry Sankouski
2024-09-13 15:08 ` [PATCH v4 22/27] arm64: dts: qcom: starqltechn: add max77705 PMIC Dzmitry Sankouski
2024-09-16  9:17   ` Krzysztof Kozlowski
2024-09-13 15:08 ` [PATCH v4 23/27] arm64: dts: qcom: starqltechn: add display PMIC Dzmitry Sankouski
2024-09-16  9:15   ` Krzysztof Kozlowski
2024-09-19 13:17     ` Dzmitry Sankouski
2024-09-19 14:00       ` Krzysztof Kozlowski
2024-09-13 15:08 ` [PATCH v4 24/27] arm64: dts: qcom: starqltechn: add touchscreen support Dzmitry Sankouski
2024-09-13 15:08 ` Dzmitry Sankouski [this message]
2024-09-13 15:08 ` [PATCH v4 26/27] arm64: dts: qcom: starqltechn: add graphics support Dzmitry Sankouski
2024-09-13 15:08 ` [PATCH v4 27/27] arm64: dts: qcom: starqltechn: add modem support Dzmitry Sankouski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240913-starqltechn_integration_upstream-v4-25-2d2efd5c5877@gmail.com \
    --to=dsankouski@gmail.com \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=cros-qcom-dts-watchers@chromium.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=pavel@ucw.cz \
    --cc=quic_jesszhan@quicinc.com \
    --cc=robh@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=sboyd@kernel.org \
    --cc=simona.vetter@ffwll.ch \
    --cc=simona@ffwll.ch \
    --cc=sre@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=ukleinek@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).