From 9c00f7259d51812ae058bac325c6776df92cded1 Mon Sep 17 00:00:00 2001 From: Vishnu Santhosh Date: Thu, 11 Jun 2026 11:26:34 +0530 Subject: [PATCH 1/4] FROMLIST: soc: qcom: smsm: Increase SMSM_DEFAULT_NUM_HOSTS to 5 SMEM_SMSM_SIZE_INFO (id 419) is not populated by the boot firmware on Qualcomm Shikra SoC. The SMSM driver falls back to SMSM_DEFAULT_NUM_HOSTS when this segment is absent, which causes SMEM_SMSM_CPU_INTR_MASK (id 333) to be allocated with the wrong size. SMEM_SMSM_CPU_INTR_MASK is sized as SMSM_DEFAULT_NUM_ENTRIES * SMSM_DEFAULT_NUM_HOSTS * sizeof(u32). With SMSM_DEFAULT_NUM_ENTRIES fixed at 8, the current SMSM_DEFAULT_NUM_HOSTS of 3 allocates 96 bytes. Qualcomm Shikra SoC modem firmware expects 160 bytes, requiring SMSM_DEFAULT_NUM_HOSTS to be 5. The size mismatch causes the modem to crash on boot with "smsm.c: Bad pointer from smem_alloc". Increase SMSM_DEFAULT_NUM_HOSTS to 5 to match the modem firmware expectation and prevent the boot crash. Co-developed-by: Deepak Kumar Singh Signed-off-by: Deepak Kumar Singh Signed-off-by: Vishnu Santhosh Link: https://lore.kernel.org/r/20260611-qcom-smsm-default-num-hosts-v1-1-423b8a25945a@oss.qualcomm.com --- drivers/soc/qcom/smsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c index 021e9d1f61dc5..7d1823ab4198b 100644 --- a/drivers/soc/qcom/smsm.c +++ b/drivers/soc/qcom/smsm.c @@ -54,7 +54,7 @@ * Default sizes, in case SMEM_SMSM_SIZE_INFO is not found. */ #define SMSM_DEFAULT_NUM_ENTRIES 8 -#define SMSM_DEFAULT_NUM_HOSTS 3 +#define SMSM_DEFAULT_NUM_HOSTS 5 struct smsm_entry; struct smsm_host; From f358aa221ab2edf9e12bdde81ce89debc86d23de Mon Sep 17 00:00:00 2001 From: Vishnu Santhosh Date: Thu, 11 Jun 2026 11:47:11 +0530 Subject: [PATCH 2/4] FROMLIST: dmaengine: qcom: bam_dma: Defer IRQ trigger type to device tree The driver hardcodes IRQF_TRIGGER_HIGH when registering the BAM interrupt, which overrides the trigger type specified in the device tree. On Qualcomm Shikra SoC, the A2 BAM signals an edge interrupt to the apps processor; registering it as level-high causes the interrupt to not fire, resulting in missed DMA completions. Use IRQF_TRIGGER_NONE instead, which causes the kernel to use the trigger type already configured by platform_get_irq() when it parsed the device tree interrupts property. This makes the driver platform-agnostic. Fixes: e7c0fe2a5c84 ("dmaengine: add Qualcomm BAM dma driver") Co-developed-by: Deepak Kumar Singh Signed-off-by: Deepak Kumar Singh Signed-off-by: Vishnu Santhosh Link: https://lore.kernel.org/r/20260611-qcom-bam-dma-irq-trigger-v1-1-21c216e00b2a@oss.qualcomm.com --- drivers/dma/qcom/bam_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 68921d22ad7ab..cf1b2e512921b 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -1373,7 +1373,7 @@ static int bam_dma_probe(struct platform_device *pdev) bam_channel_init(bdev, &bdev->channels[i], i); ret = devm_request_irq(bdev->dev, bdev->irq, bam_dma_irq, - IRQF_TRIGGER_HIGH, "bam_dma", bdev); + IRQF_TRIGGER_NONE, "bam_dma", bdev); if (ret) goto err_bam_channel_exit; From a4a9273264cf62c2b40713776ca3b228daf8c669 Mon Sep 17 00:00:00 2001 From: Vishnu Santhosh Date: Thu, 11 Jun 2026 14:11:59 +0530 Subject: [PATCH 3/4] FROMLIST: arm64: dts: qcom: shikra: Add BAM-DMUX support Add required nodes to enable the upstream BAM-DMUX WWAN driver on Qualcomm Shikra SoC. The SMSM (Shared Memory State Machine) node provides the power control signaling between the AP and modem for BAM-DMUX. The BAM DMA controller node describes the A2 modem BAM hardware as a standard DMA controller. The BAM-DMUX node references the DMA channels and the pc/pc-ack interrupt lines from the modem SMSM entry for power control signaling. Signed-off-by: Vishnu Santhosh Link: https://lore.kernel.org/r/20260611-qcom-shikra-dts-bam-dmux-v1-1-43d0b43d41ef@oss.qualcomm.com --- arch/arm64/boot/dts/qcom/shikra.dtsi | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi index 7b78dfcad2983..db8b9cea52367 100644 --- a/arch/arm64/boot/dts/qcom/shikra.dtsi +++ b/arch/arm64/boot/dts/qcom/shikra.dtsi @@ -23,6 +23,22 @@ #address-cells = <2>; #size-cells = <2>; + bam_dmux: bam-dmux { + compatible = "qcom,bam-dmux"; + + interrupts-extended = <&modem_smsm 1 IRQ_TYPE_EDGE_BOTH>, + <&modem_smsm 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"; + }; + clocks { xo_board: xo-board { compatible = "fixed-clock"; @@ -485,6 +501,28 @@ }; }; + smsm { + compatible = "qcom,smsm"; + + #address-cells = <1>; + #size-cells = <0>; + + mboxes = <0>, <&apcs_glb 13>; + + apps_smsm: apps@0 { + reg = <0>; + #qcom,smem-state-cells = <1>; + }; + + modem_smsm: modem@1 { + reg = <1>; + interrupts = ; + + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + soc: soc@0 { compatible = "simple-bus"; @@ -2068,6 +2106,18 @@ }; }; + bam_dmux_dma: dma-controller@6044000 { + compatible = "qcom,bam-v1.7.0"; + reg = <0x0 0x06044000 0x0 0x19000>; + interrupts = ; + #dma-cells = <1>; + qcom,ee = <0>; + + num-channels = <6>; + qcom,num-ees = <1>; + qcom,powered-remotely; + }; + remoteproc_mpss: remoteproc@6080000 { compatible = "qcom,shikra-mpss-pas"; reg = <0x0 0x06080000 0x0 0x100>; From 37ce5e170a255267e54a56fbe71432f9c51ab5c9 Mon Sep 17 00:00:00 2001 From: Vishnu Santhosh Date: Thu, 11 Jun 2026 16:38:26 +0530 Subject: [PATCH 4/4] FROMLIST: arm64: defconfig: Enable Qualcomm BAM-DMUX WWAN driver Enable the BAM Data Multiplexer WWAN driver as a module to support modem data channels on Qualcomm Shikra SoC. The driver is also used by other platforms with A2 BAM hardware such as MSM8916 and MSM8939. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vishnu Santhosh Link: https://lore.kernel.org/r/20260611-qcom-arm64-defconfig-bam-dmux-v1-1-599190f17fc9@oss.qualcomm.com --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index eb14dee94d3d1..0a5f0bfeefa19 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -457,6 +457,7 @@ CONFIG_WLCORE_SDIO=m CONFIG_WWAN=m CONFIG_MHI_WWAN_CTRL=m CONFIG_MHI_WWAN_MBIM=m +CONFIG_QCOM_BAM_DMUX=m CONFIG_INPUT_EVDEV=y CONFIG_KEYBOARD_ADC=m CONFIG_KEYBOARD_GPIO=y