2023-09-27 06:49:11

by Stephan Gerhold

[permalink] [raw]
Subject: [PATCH 00/13] arm64: dts: qcom: msm8916/39: Enable sound and modem with QDSP6

Enable sound and modem on most of the MSM8916/MSM8939
smartphones/tablets supported upstream by:

- Adding the BAM-DMUX DT nodes to msm8939.dtsi for WWAN Internet
- Adding the QDSP6 DT nodes to both msm8916.dtsi and msm8939.dtsi.
This is needed because audio must be routed through the QDSP6
services provided by the modem firmware when the modem is active.
- Setting up the sound/codec related nodes for all the devices.

Most of the sound/modem setup is very similar on all MSM8916/MSM8939
devices because the device-specific details are abstracted by the modem
firmware. Reduce duplication by adding "msm8916-modem-qdsp6.dtsi" which
contains most of the common definitions. The board-specific DT part is
limited to extra codecs or board-specific sound setup.

With this patch set, the following functionality works on most
MSM8916/MSM8939 devices supported upstream:

- Sound: Speaker/earpiece/headphones/microphones
- Modem: Calls, SMS, WWAN Internet (e.g. with ModemManager)

And with extra pending patches also:

- Voice call audio
- GPS

These patches have been contributed by different people and have been
used/tested in postmarketOS for several years. Until now they had to
wait for other changes to be upstreamed (QDSP6 audio support for
MSM8916, dynamic reserved memory, ...).

Signed-off-by: Stephan Gerhold <[email protected]>
---
J.R. Divya Antony (1):
arm64: dts: qcom: msm8916-asus-z00l: Add sound and modem

Jasper Korten (1):
arm64: dts: qcom: msm8916-samsung-gt5: Add sound and modem

Jonathan Albrieux (1):
arm64: dts: qcom: msm8916-longcheer-l8910: Add sound and modem

Lin, Meng-Bo (2):
arm64: dts: qcom: msm8916-samsung-j5: Add sound and modem
arm64: dts: qcom: msm8939-samsung-a7: Add sound and modem

Nikita Travkin (1):
arm64: dts: qcom: msm8916-longcheer-l8150: Add sound and modem

Stephan Gerhold (5):
arm64: dts: qcom: msm8916/39: Add QDSP6
arm64: dts: qcom: msm8916: Add common msm8916-modem-qdsp6.dtsi
arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem
arm64: dts: qcom: msm8916-samsung-serranove: Add sound and modem
arm64: dts: qcom: msm8916-wingtech-wt88047: Add sound and modem

Vincent Knecht (2):
arm64: dts: qcom: msm8939: Add BAM-DMUX WWAN
arm64: dts: qcom: msm8916-alcatel-idol347: Add sound and modem

.../boot/dts/qcom/msm8916-alcatel-idol347.dts | 164 +++++++++++++++++++++
arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 22 +++
.../boot/dts/qcom/msm8916-longcheer-l8150.dts | 32 +++-
.../boot/dts/qcom/msm8916-longcheer-l8910.dts | 54 +++++++
arch/arm64/boot/dts/qcom/msm8916-modem-qdsp6.dtsi | 163 ++++++++++++++++++++
.../dts/qcom/msm8916-samsung-a2015-common.dtsi | 55 +++++++
.../dts/qcom/msm8916-samsung-e2015-common.dtsi | 4 +
.../boot/dts/qcom/msm8916-samsung-grandmax.dts | 4 +
.../boot/dts/qcom/msm8916-samsung-gt5-common.dtsi | 36 +++++
arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts | 23 +++
arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts | 43 ++++++
.../boot/dts/qcom/msm8916-samsung-j5-common.dtsi | 15 ++
arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts | 4 +
.../boot/dts/qcom/msm8916-samsung-serranove.dts | 14 ++
.../boot/dts/qcom/msm8916-wingtech-wt88047.dts | 76 ++++++++++
arch/arm64/boot/dts/qcom/msm8916.dtsi | 49 ++++++
arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts | 54 +++++++
arch/arm64/boot/dts/qcom/msm8939.dtsi | 79 ++++++++++
18 files changed, 888 insertions(+), 3 deletions(-)
---
change-id: 20230922-msm8916-modem-0d8b6c8abf76

Best regards,
--
Stephan Gerhold <[email protected]>


2023-09-27 09:03:10

by Stephan Gerhold

[permalink] [raw]
Subject: [PATCH 01/13] arm64: dts: qcom: msm8939: Add BAM-DMUX WWAN

From: Vincent Knecht <[email protected]>

BAM DMUX is used as the network interface to the modem. This is copied
as-is from msm8916.dtsi.

Signed-off-by: Vincent Knecht <[email protected]>
Signed-off-by: Stephan Gerhold <[email protected]>
---
arch/arm64/boot/dts/qcom/msm8939.dtsi | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi
index 324b5d26db40..65c68e0e88d5 100644
--- a/arch/arm64/boot/dts/qcom/msm8939.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi
@@ -1537,6 +1537,20 @@ spmi_bus: spmi@200f000 {
#interrupt-cells = <4>;
};

+ bam_dmux_dma: dma-controller@4044000 {
+ compatible = "qcom,bam-v1.7.0";
+ reg = <0x04044000 0x19000>;
+ interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+
+ num-channels = <6>;
+ qcom,num-ees = <1>;
+ qcom,powered-remotely;
+
+ status = "disabled";
+ };
+
mpss: remoteproc@4080000 {
compatible = "qcom,msm8916-mss-pil";
reg = <0x04080000 0x100>, <0x04020000 0x040>;
@@ -1569,6 +1583,22 @@ mpss: remoteproc@4080000 {
qcom,halt-regs = <&tcsr 0x18000 0x19000 0x1a000>;
status = "disabled";

+ bam_dmux: bam-dmux {
+ compatible = "qcom,bam-dmux";
+
+ interrupt-parent = <&hexagon_smsm>;
+ interrupts = <1 IRQ_TYPE_EDGE_BOTH>, <11 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-names = "pc", "pc-ack";
+
+ qcom,smem-states = <&apps_smsm 1>, <&apps_smsm 11>;
+ qcom,smem-state-names = "pc", "pc-ack";
+
+ dmas = <&bam_dmux_dma 4>, <&bam_dmux_dma 5>;
+ dma-names = "tx", "rx";
+
+ status = "disabled";
+ };
+
mba {
memory-region = <&mba_mem>;
};

--
2.42.0