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>
Subject: [PATCH 03/13] arm64: dts: qcom: msm8916: Add common msm8916-modem-qdsp6.dtsi
Date: Tue, 26 Sep 2023 18:51:17 +0200 [thread overview]
Message-ID: <20230926-msm8916-modem-v1-3-398eec74bac9@gerhold.net> (raw)
In-Reply-To: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net>
Most MSM8916/MSM8939 devices use very similar setups for the modem,
because most of the device-specific details are abstracted by the modem
firmware. There are several definitions (status switches, DAI links
etc) that will be exactly the same for every board.
Introduce a common msm8916-modem-qdsp6.dtsi include that can be used to
simplify enabling the modem for such devices. By default the
digital/analog codec in the SoC/PMIC is used, but boards can define
additional codecs using the templates for Secondary and Quaternary
MI2S.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
arch/arm64/boot/dts/qcom/msm8916-modem-qdsp6.dtsi | 163 ++++++++++++++++++++++
1 file changed, 163 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/msm8916-modem-qdsp6.dtsi b/arch/arm64/boot/dts/qcom/msm8916-modem-qdsp6.dtsi
new file mode 100644
index 000000000000..ddd74d428406
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-modem-qdsp6.dtsi
@@ -0,0 +1,163 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
+/*
+ * msm8916-modem-qdsp6.dtsi describes the typical modem setup on MSM8916 devices
+ * (or similar SoCs) with audio routed via the QDSP6 services provided by the
+ * modem firmware. The digital/analog codec in the SoC/PMIC is used by default,
+ * but boards can define additional codecs using the templates for Secondary and
+ * Quaternary MI2S.
+ */
+
+#include <dt-bindings/sound/qcom,q6afe.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
+
+&apr {
+ status = "okay";
+};
+
+&bam_dmux {
+ status = "okay";
+};
+
+&bam_dmux_dma {
+ status = "okay";
+};
+
+&lpass {
+ status = "reserved"; /* Controlled by QDSP6 */
+};
+
+&lpass_codec {
+ status = "okay";
+};
+
+&mba_mem {
+ status = "okay";
+};
+
+&mpss {
+ status = "okay";
+};
+
+&mpss_mem {
+ status = "okay";
+};
+
+&pm8916_codec {
+ status = "okay";
+};
+
+&q6afedai {
+ dai@16 {
+ reg = <PRIMARY_MI2S_RX>;
+ qcom,sd-lines = <0 1>;
+ };
+ dai@20 {
+ reg = <TERTIARY_MI2S_TX>;
+ qcom,sd-lines = <0 1>;
+ };
+};
+
+&q6asmdai {
+ dai@0 {
+ reg = <0>;
+ direction = <Q6ASM_DAI_RX>;
+ };
+ dai@1 {
+ reg = <1>;
+ direction = <Q6ASM_DAI_TX>;
+ };
+ dai@2 {
+ reg = <2>;
+ direction = <Q6ASM_DAI_RX>;
+ };
+ dai@3 {
+ reg = <3>;
+ direction = <Q6ASM_DAI_RX>;
+ is-compress-dai;
+ };
+};
+
+&sound {
+ compatible = "qcom,msm8916-qdsp6-sndcard";
+ model = "msm8916";
+
+ pinctrl-0 = <&cdc_pdm_default>;
+ pinctrl-1 = <&cdc_pdm_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ multimedia1-dai-link {
+ link-name = "MultiMedia1";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+ };
+ };
+
+ multimedia2-dai-link {
+ link-name = "MultiMedia2";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
+ };
+ };
+
+ multimedia3-dai-link {
+ link-name = "MultiMedia3";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
+ };
+ };
+
+ multimedia4-dai-link {
+ link-name = "MultiMedia4";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
+ };
+ };
+
+ sound_dai_primary: mi2s-primary-dai-link {
+ link-name = "Primary MI2S";
+ cpu {
+ sound-dai = <&q6afedai PRIMARY_MI2S_RX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ codec {
+ sound-dai = <&lpass_codec 0>, <&pm8916_codec 0>;
+ };
+ };
+
+ sound_dai_secondary: mi2s-secondary-dai-link {
+ link-name = "Secondary MI2S";
+ status = "disabled"; /* Needs extra codec configuration */
+ cpu {
+ sound-dai = <&q6afedai SECONDARY_MI2S_RX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ };
+
+ sound_dai_tertiary: mi2s-tertiary-dai-link {
+ link-name = "Tertiary MI2S";
+ cpu {
+ sound-dai = <&q6afedai TERTIARY_MI2S_TX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ codec {
+ sound-dai = <&lpass_codec 1>, <&pm8916_codec 1>;
+ };
+ };
+
+ sound_dai_quaternary: mi2s-quaternary-dai-link {
+ link-name = "Quaternary MI2S";
+ status = "disabled"; /* Needs extra codec configuration */
+ cpu {
+ sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ };
+};
--
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 ` Stephan Gerhold [this message]
2023-09-26 18:49 ` [PATCH 03/13] arm64: dts: qcom: msm8916: Add common msm8916-modem-qdsp6.dtsi 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 ` [PATCH 04/13] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem Stephan Gerhold
2023-09-26 18:54 ` 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-3-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=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).