From: Stephan Gerhold <stephan@gerhold.net>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Stephan Gerhold <stephan@gerhold.net>,
"Lin, Meng-Bo" <linmengbo0689@protonmail.com>
Subject: [PATCH 04/13] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem
Date: Tue, 26 Sep 2023 18:51:18 +0200 [thread overview]
Message-ID: <20230926-msm8916-modem-v1-4-398eec74bac9@gerhold.net> (raw)
In-Reply-To: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net>
Enable sound and modem for the Samsung A2015 based devices (A3, A5, E5,
E7, Grand Max). The setup is similar to most MSM8916 devices, i.e.:
- QDSP6 audio
- Earpiece/headphones/microphones via digital/analog codec in
MSM8916/PM8916
- WWAN Internet via BAM-DMUX
except:
- NXP TFA9895 codec for speaker on Quaternary MI2S
- Samsung-specific audio jack detection (not supported yet)
[Lin: Add e2015 and grandmax]
Co-developed-by: "Lin, Meng-Bo" <linmengbo0689@protonmail.com>
Signed-off-by: "Lin, Meng-Bo" <linmengbo0689@protonmail.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
.../dts/qcom/msm8916-samsung-a2015-common.dtsi | 55 ++++++++++++++++++++++
.../dts/qcom/msm8916-samsung-e2015-common.dtsi | 4 ++
.../boot/dts/qcom/msm8916-samsung-grandmax.dts | 4 ++
3 files changed, 63 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
index 0b29132b74e1..f71b18d89bf9 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
@@ -1,10 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/sound/apq8016-lpass.h>
/ {
aliases {
@@ -196,6 +199,18 @@ vibrator: vibrator {
};
};
+&blsp_i2c1 {
+ status = "okay";
+
+ speaker_codec: audio-codec@34 {
+ compatible = "nxp,tfa9895";
+ reg = <0x34>;
+ vddd-supply = <&pm8916_l5>;
+ sound-name-prefix = "Speaker";
+ #sound-dai-cells = <0>;
+ };
+};
+
&blsp_i2c2 {
status = "okay";
@@ -243,6 +258,13 @@ &gpu {
status = "okay";
};
+&lpass {
+ dai-link@3 {
+ reg = <MI2S_QUATERNARY>;
+ qcom,playback-sd-lines = <1>;
+ };
+};
+
&mdss {
status = "okay";
};
@@ -253,6 +275,10 @@ &mdss_dsi0 {
pinctrl-1 = <&mdss_sleep>;
};
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5400000>;
+};
+
&pm8916_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
@@ -265,6 +291,13 @@ pm8916_l17: l17 {
};
};
+&q6afedai {
+ dai@22 {
+ reg = <QUATERNARY_MI2S_RX>;
+ qcom,sd-lines = <1>;
+ };
+};
+
&sdhc_1 {
status = "okay";
};
@@ -279,6 +312,28 @@ &sdhc_2 {
cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
};
+&sound {
+ status = "okay";
+
+ model = "samsung-a2015";
+ audio-routing =
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+
+ pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>;
+ pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>;
+ pinctrl-names = "default", "sleep";
+};
+
+&sound_dai_quaternary {
+ status = "okay";
+
+ codec {
+ sound-dai = <&speaker_codec>;
+ };
+};
+
&usb {
status = "okay";
extcon = <&muic>, <&muic>;
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
index 0824ab041d80..3c49dac92d2d 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
@@ -65,6 +65,10 @@ accelerometer@1d {
};
};
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5a00000>;
+};
+
®_motor_vdd {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
index 3f145dde4059..5882b3a593b8 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
@@ -49,6 +49,10 @@ ®_touch_key {
status = "disabled";
};
+&sound {
+ model = "samsung-gmax"; /* No secondary microphone */
+};
+
&tlmm {
gpio_leds_default: gpio-led-default-state {
pins = "gpio60";
--
2.42.0
next prev parent reply other threads:[~2023-09-26 16:52 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 16:51 [PATCH 00/13] arm64: dts: qcom: msm8916/39: Enable sound and modem with QDSP6 Stephan Gerhold
2023-09-26 16:51 ` [PATCH 01/13] arm64: dts: qcom: msm8939: Add BAM-DMUX WWAN Stephan Gerhold
2023-09-26 18:43 ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 02/13] arm64: dts: qcom: msm8916/39: Add QDSP6 Stephan Gerhold
2023-09-26 18:46 ` Konrad Dybcio
2023-09-26 18:54 ` Stephan Gerhold
2023-09-26 19:05 ` Konrad Dybcio
2023-09-26 19:07 ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 03/13] arm64: dts: qcom: msm8916: Add common msm8916-modem-qdsp6.dtsi Stephan Gerhold
2023-09-26 18:49 ` Konrad Dybcio
2023-09-26 19:06 ` Stephan Gerhold
2023-09-26 20:01 ` Konrad Dybcio
2023-09-26 20:17 ` Stephan Gerhold
2023-10-02 9:59 ` Konrad Dybcio
2023-10-02 16:33 ` Stephan Gerhold
2023-09-26 16:51 ` Stephan Gerhold [this message]
2023-09-26 18:54 ` [PATCH 04/13] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem Konrad Dybcio
2023-09-26 19:26 ` Stephan Gerhold
2023-09-26 19:56 ` Konrad Dybcio
2023-09-26 20:09 ` Stephan Gerhold
2023-09-26 20:18 ` Konrad Dybcio
2023-09-26 20:27 ` Stephan Gerhold
2023-09-26 20:29 ` Konrad Dybcio
2023-09-26 20:36 ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 05/13] arm64: dts: qcom: msm8916-samsung-serranove: " Stephan Gerhold
2023-09-26 18:55 ` Konrad Dybcio
2023-09-26 19:29 ` Stephan Gerhold
2023-09-26 19:57 ` Konrad Dybcio
2023-09-26 20:04 ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 06/13] arm64: dts: qcom: msm8916-wingtech-wt88047: " Stephan Gerhold
2023-09-26 18:56 ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 07/13] arm64: dts: qcom: msm8916-alcatel-idol347: " Stephan Gerhold
2023-09-26 18:58 ` Konrad Dybcio
2023-09-26 19:35 ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 08/13] arm64: dts: qcom: msm8916-asus-z00l: " Stephan Gerhold
2023-09-26 18:58 ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 09/13] arm64: dts: qcom: msm8916-longcheer-l8150: " Stephan Gerhold
2023-09-26 18:59 ` Konrad Dybcio
2023-09-26 19:36 ` Stephan Gerhold
2023-09-30 16:59 ` Stephan Gerhold
2023-10-02 9:59 ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 10/13] arm64: dts: qcom: msm8916-longcheer-l8910: " Stephan Gerhold
2023-09-26 19:00 ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 11/13] arm64: dts: qcom: msm8916-samsung-gt5: " Stephan Gerhold
2023-09-26 19:03 ` Konrad Dybcio
2023-09-26 19:37 ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 12/13] arm64: dts: qcom: msm8916-samsung-j5: " Stephan Gerhold
2023-09-26 19:04 ` Konrad Dybcio
2023-09-26 19:44 ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 13/13] arm64: dts: qcom: msm8939-samsung-a7: " Stephan Gerhold
2023-09-26 19:04 ` Konrad Dybcio
2023-09-26 19:45 ` Stephan Gerhold
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=20230926-msm8916-modem-v1-4-398eec74bac9@gerhold.net \
--to=stephan@gerhold.net \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linmengbo0689@protonmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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).