* [PATCH v4 0/7] Add QPIC SPI NAND support for IPQ5424 and IPQ5332 platforms
@ 2026-02-06 10:01 Md Sadre Alam
2026-02-06 10:01 ` [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+ Md Sadre Alam
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-06 10:01 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt, conor+dt, vkoul, Frank.Li,
linux-arm-msm, devicetree, linux-kernel, dmaengine
Cc: quic_mdalam, quic_varada
From: Md Sadre Alam <mdalam@qti.qualcomm.com>
v4:
* Rebased onto linux-next
* Dropped two changes from v3 that have already been merged
v3:
* Added Tested-by tag
* Added Reviewed-by tag
* Reformatted clocks, clock-names, dmas, and dma-names properties
to one entry per line
* Rename ipq5332 to ipq5332-rdp-common
v2:
* Added Reviewed-by tag
* Added Acked-by tag
* Updated board name in commit message header
* Added \n before status
v1:
* Added support for spi nand for IPQ5424 and IPQ5332
* Updated bam_prep_ce_le32() to set the mask field conditionally based
on command
* Removed eMMC node for IPQ5424 and IPQ5332
Md Sadre Alam (7):
dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+
arm64: dts: qcom: ipq5424: Add QPIC SPI NAND controller support
arm64: dts: qcom: ipq5332: Add QPIC SPI NAND controller support
arm64: dts: qcom: ipq5424-rdp466: Enable QPIC SPI NAND support
arm64: dts: qcom: pq5332-rdp-common: Enable QPIC SPI NAND support
arm64: dts: qcom: ipq5424-rdp466: Remove eMMC support
arm64: dts: qcom: ipq5332-rdp442: Remove eMMC support
.../boot/dts/qcom/ipq5332-rdp-common.dtsi | 44 +++++++++++++++++++
arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts | 34 --------------
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 33 ++++++++++++++
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 44 ++++++++++++-------
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 33 ++++++++++++++
include/linux/dma/qcom_bam_dma.h | 21 ++++++---
6 files changed, 155 insertions(+), 54 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+
2026-02-06 10:01 [PATCH v4 0/7] Add QPIC SPI NAND support for IPQ5424 and IPQ5332 platforms Md Sadre Alam
@ 2026-02-06 10:01 ` Md Sadre Alam
2026-02-06 17:12 ` Krzysztof Kozlowski
2026-02-06 19:24 ` Frank Li
2026-02-06 10:01 ` [PATCH v4 2/7] arm64: dts: qcom: ipq5424: Add QPIC SPI NAND controller support Md Sadre Alam
` (5 subsequent siblings)
6 siblings, 2 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-06 10:01 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt, conor+dt, vkoul, Frank.Li,
linux-arm-msm, devicetree, linux-kernel, dmaengine
Cc: quic_mdalam, quic_varada
BAM version 1.6.0 and later changed the behavior of the mask field in
command elements for read operations. In newer BAM versions, the mask
field for read commands contains the upper 4 bits of the destination
address to support 36-bit addressing, while for write commands it
continues to function as a traditional write mask.
This change causes NAND enumeration failures on platforms like IPQ5424
that use BAM v1.6.0+, because the current code sets mask=0xffffffff
for all commands. For read commands on newer BAM versions, this results
in the hardware interpreting the destination address as 0xf_xxxxxxxx
(invalid high memory) instead of the intended 0x0_xxxxxxxx address.
Fixed this issue by:
1. Updating the bam_cmd_element structure documentation to reflect the
dual purpose of the mask field
2. Modifying bam_prep_ce_le32() to set appropriate mask values based on
command type:
- For read commands: mask = 0 (32-bit addressing, upper bits = 0)
- For write commands: mask = 0xffffffff (traditional write mask)
3. Maintaining backward compatibility with older BAM versions
This fix enables proper NAND functionality on IPQ5424 and other platforms
using BAM v1.6.0+ while preserving compatibility with existing systems.
Tested-by: Lakshmi Sowjanya D <quic_laksd@quicinc.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
Change in [v4]
* No change
Change in [v3]
* Added Tested-by tag
Change in [v2]
* No change
Change in [v1]
* Updated bam_prep_ce_le32() to set the mask field conditionally based on
command type
* Enhanced kernel-doc comments to clarify mask behavior for BAM v1.6.0+
include/linux/dma/qcom_bam_dma.h | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/include/linux/dma/qcom_bam_dma.h b/include/linux/dma/qcom_bam_dma.h
index 68fc0e643b1b..d9d07a9ab313 100644
--- a/include/linux/dma/qcom_bam_dma.h
+++ b/include/linux/dma/qcom_bam_dma.h
@@ -13,9 +13,12 @@
* supported by BAM DMA Engine.
*
* @cmd_and_addr - upper 8 bits command and lower 24 bits register address.
- * @data - for write command: content to be written into peripheral register.
- * for read command: dest addr to write peripheral register value.
- * @mask - register mask.
+ * @data - For write command: content to be written into peripheral register.
+ * For read command: lower 32 bits of destination address.
+ * @mask - For write command: register write mask.
+ * For read command on BAM v1.6.0+: upper 4 bits of destination address.
+ * For read command on BAM < v1.6.0: ignored by hardware.
+ * Setting to 0 ensures 32-bit addressing compatibility.
* @reserved - for future usage.
*
*/
@@ -42,6 +45,10 @@ enum bam_command_type {
* @addr: target address
* @cmd: BAM command
* @data: actual data for write and dest addr for read in le32
+ *
+ * For BAM v1.6.0+, the mask field behavior depends on command type:
+ * - Write commands: mask = write mask (typically 0xffffffff)
+ * - Read commands: mask = upper 4 bits of destination address (0 for 32-bit)
*/
static inline void
bam_prep_ce_le32(struct bam_cmd_element *bam_ce, u32 addr,
@@ -50,7 +57,11 @@ bam_prep_ce_le32(struct bam_cmd_element *bam_ce, u32 addr,
bam_ce->cmd_and_addr =
cpu_to_le32((addr & 0xffffff) | ((cmd & 0xff) << 24));
bam_ce->data = data;
- bam_ce->mask = cpu_to_le32(0xffffffff);
+ if (cmd == BAM_READ_COMMAND)
+ bam_ce->mask = cpu_to_le32(0x0); /* 32-bit addressing */
+ else
+ bam_ce->mask = cpu_to_le32(0xffffffff); /* Write mask */
+ bam_ce->reserved = 0;
}
/*
@@ -60,7 +71,7 @@ bam_prep_ce_le32(struct bam_cmd_element *bam_ce, u32 addr,
* @bam_ce: BAM command element
* @addr: target address
* @cmd: BAM command
- * @data: actual data for write and dest addr for read
+ * @data: actual data for write and destination address for read
*/
static inline void
bam_prep_ce(struct bam_cmd_element *bam_ce, u32 addr,
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 2/7] arm64: dts: qcom: ipq5424: Add QPIC SPI NAND controller support
2026-02-06 10:01 [PATCH v4 0/7] Add QPIC SPI NAND support for IPQ5424 and IPQ5332 platforms Md Sadre Alam
2026-02-06 10:01 ` [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+ Md Sadre Alam
@ 2026-02-06 10:01 ` Md Sadre Alam
2026-02-06 10:01 ` [PATCH v4 3/7] arm64: dts: qcom: ipq5332: " Md Sadre Alam
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-06 10:01 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt, conor+dt, vkoul, Frank.Li,
linux-arm-msm, devicetree, linux-kernel, dmaengine
Cc: quic_mdalam, quic_varada
Add device tree nodes for QPIC SPI NAND flash controller support
on IPQ5424 SoC.
The IPQ5424 SoC includes a QPIC controller that supports SPI NAND flash
devices with hardware ECC capabilities and DMA support through BAM
(Bus Access Manager).
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
Change in [v4]
* No change
Change in [v3]
* Reformatted clocks, clock-names, dmas, and dma-names properties
to one entry per line
Change in [v2]
* No change
Change in [v1]
* Added qpic_bam node to describe BAM DMA controller
* Added spi nand support for IPQ5424
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 33 +++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index eb393f3fd728..f20cda429094 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -572,6 +572,39 @@ sdhc: mmc@7804000 {
status = "disabled";
};
+ qpic_bam: dma-controller@7984000 {
+ compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+ reg = <0x0 0x07984000 0x0 0x1c000>;
+ interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_QPIC_AHB_CLK>;
+ clock-names = "bam_clk";
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+ status = "disabled";
+ };
+
+ qpic_nand: spi@79b0000 {
+ compatible = "qcom,ipq5424-snand", "qcom,ipq9574-snand";
+ reg = <0x0 0x079b0000 0x0 0x10000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&gcc GCC_QPIC_CLK>,
+ <&gcc GCC_QPIC_AHB_CLK>,
+ <&gcc GCC_QPIC_IO_MACRO_CLK>;
+ clock-names = "core",
+ "aon",
+ "iom";
+
+ dmas = <&qpic_bam 0>,
+ <&qpic_bam 1>,
+ <&qpic_bam 2>;
+ dma-names = "tx",
+ "rx",
+ "cmd";
+
+ status = "disabled";
+ };
+
intc: interrupt-controller@f200000 {
compatible = "arm,gic-v3";
reg = <0 0xf200000 0 0x10000>, /* GICD */
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 3/7] arm64: dts: qcom: ipq5332: Add QPIC SPI NAND controller support
2026-02-06 10:01 [PATCH v4 0/7] Add QPIC SPI NAND support for IPQ5424 and IPQ5332 platforms Md Sadre Alam
2026-02-06 10:01 ` [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+ Md Sadre Alam
2026-02-06 10:01 ` [PATCH v4 2/7] arm64: dts: qcom: ipq5424: Add QPIC SPI NAND controller support Md Sadre Alam
@ 2026-02-06 10:01 ` Md Sadre Alam
2026-02-06 10:01 ` [PATCH v4 4/7] arm64: dts: qcom: ipq5424-rdp466: Enable QPIC SPI NAND support Md Sadre Alam
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-06 10:01 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt, conor+dt, vkoul, Frank.Li,
linux-arm-msm, devicetree, linux-kernel, dmaengine
Cc: quic_mdalam, quic_varada
Add device tree nodes for QPIC SPI NAND flash controller support
on IPQ5332 SoC.
The IPQ5332 SoC includes a QPIC controller that supports SPI NAND flash
devices with hardware ECC capabilities and DMA support through BAM
(Bus Access Manager).
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
Change in [v4]
* No change
Change in [v3]
* Reformatted clocks, clock-names, dmas, and dma-names properties
to one entry per line
Change in [v2]
* No change
Change in [v1]
* Added qpic_bam node to describe BAM DMA controller
* Added spi nand support for IPQ5332
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 33 +++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
index 45fc512a3bab..e227730d99a6 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
@@ -423,6 +423,39 @@ blsp1_spi2: spi@78b7000 {
status = "disabled";
};
+ qpic_bam: dma-controller@7984000 {
+ compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+ reg = <0x07984000 0x1c000>;
+ interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_QPIC_AHB_CLK>;
+ clock-names = "bam_clk";
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+ status = "disabled";
+ };
+
+ qpic_nand: spi@79b0000 {
+ compatible = "qcom,ipq5332-snand", "qcom,ipq9574-snand";
+ reg = <0x079b0000 0x10000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&gcc GCC_QPIC_CLK>,
+ <&gcc GCC_QPIC_AHB_CLK>,
+ <&gcc GCC_QPIC_IO_MACRO_CLK>;
+ clock-names = "core",
+ "aon",
+ "iom";
+
+ dmas = <&qpic_bam 0>,
+ <&qpic_bam 1>,
+ <&qpic_bam 2>;
+ dma-names = "tx",
+ "rx",
+ "cmd";
+
+ status = "disabled";
+ };
+
usb: usb@8af8800 {
compatible = "qcom,ipq5332-dwc3", "qcom,dwc3";
reg = <0x08af8800 0x400>;
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 4/7] arm64: dts: qcom: ipq5424-rdp466: Enable QPIC SPI NAND support
2026-02-06 10:01 [PATCH v4 0/7] Add QPIC SPI NAND support for IPQ5424 and IPQ5332 platforms Md Sadre Alam
` (2 preceding siblings ...)
2026-02-06 10:01 ` [PATCH v4 3/7] arm64: dts: qcom: ipq5332: " Md Sadre Alam
@ 2026-02-06 10:01 ` Md Sadre Alam
2026-02-06 10:02 ` [PATCH v4 5/7] arm64: dts: qcom: pq5332-rdp-common: " Md Sadre Alam
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-06 10:01 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt, conor+dt, vkoul, Frank.Li,
linux-arm-msm, devicetree, linux-kernel, dmaengine
Cc: quic_mdalam, quic_varada
Enable QPIC SPI NAND flash controller support on the IPQ5424 RDP466
reference design platform.
The RDP466 board features a SPI NAND flash device connected to the QPIC
controller for primary storage. This patch enables the QPIC BAM DMA
controller and SPI NAND interface of QPIC, and configures the necessary
pin control settings for proper operation.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
Change in [v4]
* No Change
Change in [v3]
* No Change
Change in [v2]
* Added Reviewed-by tag
* Added \n before status in qpic_nand node
Change in [v1]
* Enable bam and spi nand for ipq5424
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 44 +++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
index 738618551203..7c32fb8f9f73 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
@@ -224,6 +224,29 @@ data-pins {
};
};
+ qpic_snand_default_state: qpic-snand-default-state {
+ clock-pins {
+ pins = "gpio5";
+ function = "qspi_clk";
+ drive-strength = <8>;
+ bias-pull-down;
+ };
+
+ cs-pins {
+ pins = "gpio4";
+ function = "qspi_cs";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ data-pins {
+ pins = "gpio0", "gpio1", "gpio2", "gpio3";
+ function = "qspi_data";
+ drive-strength = <8>;
+ bias-pull-down;
+ };
+ };
+
uart0_pins: uart0-default-state {
pins = "gpio10", "gpio11", "gpio12", "gpio13";
function = "uart0";
@@ -246,6 +269,27 @@ pcie3_default_state: pcie3-default-state {
};
};
+&qpic_bam {
+ status = "okay";
+};
+
+&qpic_nand {
+ pinctrl-0 = <&qpic_snand_default_state>;
+ pinctrl-names = "default";
+
+ status = "okay";
+
+ flash@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ nand-ecc-engine = <&qpic_nand>;
+ nand-ecc-strength = <4>;
+ nand-ecc-step-size = <512>;
+ };
+};
+
&uart0 {
pinctrl-0 = <&uart0_pins>;
pinctrl-names = "default";
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 5/7] arm64: dts: qcom: pq5332-rdp-common: Enable QPIC SPI NAND support
2026-02-06 10:01 [PATCH v4 0/7] Add QPIC SPI NAND support for IPQ5424 and IPQ5332 platforms Md Sadre Alam
` (3 preceding siblings ...)
2026-02-06 10:01 ` [PATCH v4 4/7] arm64: dts: qcom: ipq5424-rdp466: Enable QPIC SPI NAND support Md Sadre Alam
@ 2026-02-06 10:02 ` Md Sadre Alam
2026-02-06 10:02 ` [PATCH v4 6/7] arm64: dts: qcom: ipq5424-rdp466: Remove eMMC support Md Sadre Alam
2026-02-06 10:02 ` [PATCH v4 7/7] arm64: dts: qcom: ipq5332-rdp442: " Md Sadre Alam
6 siblings, 0 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-06 10:02 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt, conor+dt, vkoul, Frank.Li,
linux-arm-msm, devicetree, linux-kernel, dmaengine
Cc: quic_mdalam, quic_varada
Enable QPIC SPI NAND flash controller support on the IPQ5332 reference
design platform.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
Change in [v4]
* No change
Change in [v3]
* Added Reviewed-by tag
Change in [v2]
* No change
Change in [v1]
* Enable bam and spi nand for ipq5332
.../boot/dts/qcom/ipq5332-rdp-common.dtsi | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
index b37ae7749083..8967861be5fd 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
@@ -78,4 +78,48 @@ gpio_leds_default: gpio-leds-default-state {
drive-strength = <8>;
bias-pull-down;
};
+
+ qpic_snand_default_state: qpic-snand-default-state {
+ clock-pins {
+ pins = "gpio13";
+ function = "qspi_clk";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ cs-pins {
+ pins = "gpio12";
+ function = "qspi_cs";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ data-pins {
+ pins = "gpio8", "gpio9", "gpio10", "gpio11";
+ function = "qspi_data";
+ drive-strength = <8>;
+ bias-disable;
+ };
+ };
+};
+
+&qpic_bam {
+ status = "okay";
+};
+
+&qpic_nand {
+ pinctrl-0 = <&qpic_snand_default_state>;
+ pinctrl-names = "default";
+
+ status = "okay";
+
+ flash@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ nand-ecc-engine = <&qpic_nand>;
+ nand-ecc-strength = <4>;
+ nand-ecc-step-size = <512>;
+ };
};
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 6/7] arm64: dts: qcom: ipq5424-rdp466: Remove eMMC support
2026-02-06 10:01 [PATCH v4 0/7] Add QPIC SPI NAND support for IPQ5424 and IPQ5332 platforms Md Sadre Alam
` (4 preceding siblings ...)
2026-02-06 10:02 ` [PATCH v4 5/7] arm64: dts: qcom: pq5332-rdp-common: " Md Sadre Alam
@ 2026-02-06 10:02 ` Md Sadre Alam
2026-02-06 10:02 ` [PATCH v4 7/7] arm64: dts: qcom: ipq5332-rdp442: " Md Sadre Alam
6 siblings, 0 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-06 10:02 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt, conor+dt, vkoul, Frank.Li,
linux-arm-msm, devicetree, linux-kernel, dmaengine
Cc: quic_mdalam, quic_varada
Remove eMMC support from the IPQ5424 RDP466 board configuration to
resolve GPIO pin conflicts with SPI NAND interface.
The IPQ5424 RDP466 board is designed with NOR + NAND as the default boot
mode configuration. The eMMC controller and SPI NAND controller share
the same GPIO pins, creating a hardware conflict:
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
Change in [v4]
* No change
Change in [v3]
* Added Reviewed-by tag
Change in [v2]
* updated board name commit message header
Change in [v1]
* Removed eMMC node
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 30 ---------------------
1 file changed, 30 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
index 7c32fb8f9f73..de71b72ae6dc 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
@@ -124,13 +124,6 @@ &qusb_phy_1 {
status = "okay";
};
-&sdhc {
- pinctrl-0 = <&sdc_default_state>;
- pinctrl-names = "default";
-
- status = "okay";
-};
-
&sleep_clk {
clock-frequency = <32000>;
};
@@ -201,29 +194,6 @@ mosi-pins {
};
};
- sdc_default_state: sdc-default-state {
- clk-pins {
- pins = "gpio5";
- function = "sdc_clk";
- drive-strength = <8>;
- bias-disable;
- };
-
- cmd-pins {
- pins = "gpio4";
- function = "sdc_cmd";
- drive-strength = <8>;
- bias-pull-up;
- };
-
- data-pins {
- pins = "gpio0", "gpio1", "gpio2", "gpio3";
- function = "sdc_data";
- drive-strength = <8>;
- bias-pull-up;
- };
- };
-
qpic_snand_default_state: qpic-snand-default-state {
clock-pins {
pins = "gpio5";
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 7/7] arm64: dts: qcom: ipq5332-rdp442: Remove eMMC support
2026-02-06 10:01 [PATCH v4 0/7] Add QPIC SPI NAND support for IPQ5424 and IPQ5332 platforms Md Sadre Alam
` (5 preceding siblings ...)
2026-02-06 10:02 ` [PATCH v4 6/7] arm64: dts: qcom: ipq5424-rdp466: Remove eMMC support Md Sadre Alam
@ 2026-02-06 10:02 ` Md Sadre Alam
6 siblings, 0 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-06 10:02 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt, conor+dt, vkoul, Frank.Li,
linux-arm-msm, devicetree, linux-kernel, dmaengine
Cc: quic_mdalam, quic_varada
Remove eMMC support from the IPQ5332 RDP442 board configuration to
align with the board's default NOR+NAND boot mode design.
The IPQ5332 RDP442 board is designed with NOR+NAND as the default boot
mode configuration. The eMMC and SPI NAND interface share
same GPIO
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
Change in [v4]
* No change
Change in [v3]
* Added Reviewed-by tag
Change in [v2]
* updated board name commit message header
Change in [v1]
* Removed eMMC node
arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts | 34 ---------------------
1 file changed, 34 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts b/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
index ed8a54eb95c0..6e2abde9ed89 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts
@@ -35,17 +35,6 @@ flash@0 {
};
};
-&sdhc {
- bus-width = <4>;
- max-frequency = <192000000>;
- mmc-ddr-1_8v;
- mmc-hs200-1_8v;
- non-removable;
- pinctrl-0 = <&sdc_default_state>;
- pinctrl-names = "default";
- status = "okay";
-};
-
&tlmm {
i2c_1_pins: i2c-1-state {
pins = "gpio29", "gpio30";
@@ -54,29 +43,6 @@ i2c_1_pins: i2c-1-state {
bias-pull-up;
};
- sdc_default_state: sdc-default-state {
- clk-pins {
- pins = "gpio13";
- function = "sdc_clk";
- drive-strength = <8>;
- bias-disable;
- };
-
- cmd-pins {
- pins = "gpio12";
- function = "sdc_cmd";
- drive-strength = <8>;
- bias-pull-up;
- };
-
- data-pins {
- pins = "gpio8", "gpio9", "gpio10", "gpio11";
- function = "sdc_data";
- drive-strength = <8>;
- bias-pull-up;
- };
- };
-
spi_0_data_clk_pins: spi-0-data-clk-state {
pins = "gpio14", "gpio15", "gpio16";
function = "blsp0_spi";
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+
2026-02-06 10:01 ` [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+ Md Sadre Alam
@ 2026-02-06 17:12 ` Krzysztof Kozlowski
2026-02-09 11:43 ` Md Sadre Alam
2026-02-09 11:44 ` Md Sadre Alam
2026-02-06 19:24 ` Frank Li
1 sibling, 2 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-06 17:12 UTC (permalink / raw)
To: Md Sadre Alam, andersson, konradybcio, robh, krzk+dt, conor+dt,
vkoul, Frank.Li, linux-arm-msm, devicetree, linux-kernel,
dmaengine
Cc: quic_varada
On 06/02/2026 11:01, Md Sadre Alam wrote:
> BAM version 1.6.0 and later changed the behavior of the mask field in
> command elements for read operations. In newer BAM versions, the mask
> field for read commands contains the upper 4 bits of the destination
> address to support 36-bit addressing, while for write commands it
> continues to function as a traditional write mask.
>
> This change causes NAND enumeration failures on platforms like IPQ5424
Please do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v6.16/source/Documentation/process/submitting-patches.rst#L94
> that use BAM v1.6.0+, because the current code sets mask=0xffffffff
> for all commands. For read commands on newer BAM versions, this results
> in the hardware interpreting the destination address as 0xf_xxxxxxxx
> (invalid high memory) instead of the intended 0x0_xxxxxxxx address.
>
> Fixed this issue by:
> 1. Updating the bam_cmd_element structure documentation to reflect the
> dual purpose of the mask field
> 2. Modifying bam_prep_ce_le32() to set appropriate mask values based on
> command type:
> - For read commands: mask = 0 (32-bit addressing, upper bits = 0)
> - For write commands: mask = 0xffffffff (traditional write mask)
> 3. Maintaining backward compatibility with older BAM versions
>
> This fix enables proper NAND functionality on IPQ5424 and other platforms
> using BAM v1.6.0+ while preserving compatibility with existing systems.
Fixes tag? CC-stable?
Why is this part of DTS patchset? Do not combine independent work, you
only make it difficult for maintainers to handle your work.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+
2026-02-06 10:01 ` [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+ Md Sadre Alam
2026-02-06 17:12 ` Krzysztof Kozlowski
@ 2026-02-06 19:24 ` Frank Li
1 sibling, 0 replies; 14+ messages in thread
From: Frank Li @ 2026-02-06 19:24 UTC (permalink / raw)
To: Md Sadre Alam
Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, vkoul, Frank.Li,
linux-arm-msm, devicetree, linux-kernel, dmaengine, quic_varada
On Fri, Feb 06, 2026 at 03:31:56PM +0530, Md Sadre Alam wrote:
> BAM version 1.6.0 and later changed the behavior of the mask field in
> command elements for read operations. In newer BAM versions, the mask
> field for read commands contains the upper 4 bits of the destination
> address to support 36-bit addressing, while for write commands it
> continues to function as a traditional write mask.
>
> This change causes NAND enumeration failures on platforms like IPQ5424
> that use BAM v1.6.0+, because the current code sets mask=0xffffffff
> for all commands. For read commands on newer BAM versions, this results
> in the hardware interpreting the destination address as 0xf_xxxxxxxx
> (invalid high memory) instead of the intended 0x0_xxxxxxxx address.
>
> Fixed this issue by:
> 1. Updating the bam_cmd_element structure documentation to reflect the
> dual purpose of the mask field
> 2. Modifying bam_prep_ce_le32() to set appropriate mask values based on
> command type:
> - For read commands: mask = 0 (32-bit addressing, upper bits = 0)
> - For write commands: mask = 0xffffffff (traditional write mask)
> 3. Maintaining backward compatibility with older BAM versions
>
> This fix enables proper NAND functionality on IPQ5424 and other platforms
> using BAM v1.6.0+ while preserving compatibility with existing systems.
>
> Tested-by: Lakshmi Sowjanya D <quic_laksd@quicinc.com>
> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
> ---
>
> Change in [v4]
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
> * No change
>
> Change in [v3]
>
> * Added Tested-by tag
>
> Change in [v2]
>
> * No change
>
> Change in [v1]
>
> * Updated bam_prep_ce_le32() to set the mask field conditionally based on
> command type
>
> * Enhanced kernel-doc comments to clarify mask behavior for BAM v1.6.0+
>
> include/linux/dma/qcom_bam_dma.h | 21 ++++++++++++++++-----
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/dma/qcom_bam_dma.h b/include/linux/dma/qcom_bam_dma.h
> index 68fc0e643b1b..d9d07a9ab313 100644
> --- a/include/linux/dma/qcom_bam_dma.h
> +++ b/include/linux/dma/qcom_bam_dma.h
> @@ -13,9 +13,12 @@
> * supported by BAM DMA Engine.
> *
> * @cmd_and_addr - upper 8 bits command and lower 24 bits register address.
> - * @data - for write command: content to be written into peripheral register.
> - * for read command: dest addr to write peripheral register value.
> - * @mask - register mask.
> + * @data - For write command: content to be written into peripheral register.
> + * For read command: lower 32 bits of destination address.
> + * @mask - For write command: register write mask.
> + * For read command on BAM v1.6.0+: upper 4 bits of destination address.
> + * For read command on BAM < v1.6.0: ignored by hardware.
> + * Setting to 0 ensures 32-bit addressing compatibility.
> * @reserved - for future usage.
> *
> */
> @@ -42,6 +45,10 @@ enum bam_command_type {
> * @addr: target address
> * @cmd: BAM command
> * @data: actual data for write and dest addr for read in le32
> + *
> + * For BAM v1.6.0+, the mask field behavior depends on command type:
> + * - Write commands: mask = write mask (typically 0xffffffff)
> + * - Read commands: mask = upper 4 bits of destination address (0 for 32-bit)
> */
> static inline void
> bam_prep_ce_le32(struct bam_cmd_element *bam_ce, u32 addr,
> @@ -50,7 +57,11 @@ bam_prep_ce_le32(struct bam_cmd_element *bam_ce, u32 addr,
> bam_ce->cmd_and_addr =
> cpu_to_le32((addr & 0xffffff) | ((cmd & 0xff) << 24));
> bam_ce->data = data;
> - bam_ce->mask = cpu_to_le32(0xffffffff);
> + if (cmd == BAM_READ_COMMAND)
> + bam_ce->mask = cpu_to_le32(0x0); /* 32-bit addressing */
> + else
> + bam_ce->mask = cpu_to_le32(0xffffffff); /* Write mask */
> + bam_ce->reserved = 0;
> }
>
> /*
> @@ -60,7 +71,7 @@ bam_prep_ce_le32(struct bam_cmd_element *bam_ce, u32 addr,
> * @bam_ce: BAM command element
> * @addr: target address
> * @cmd: BAM command
> - * @data: actual data for write and dest addr for read
> + * @data: actual data for write and destination address for read
> */
> static inline void
> bam_prep_ce(struct bam_cmd_element *bam_ce, u32 addr,
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+
2026-02-06 17:12 ` Krzysztof Kozlowski
@ 2026-02-09 11:43 ` Md Sadre Alam
2026-02-09 12:06 ` Krzysztof Kozlowski
2026-02-09 11:44 ` Md Sadre Alam
1 sibling, 1 reply; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-09 11:43 UTC (permalink / raw)
To: Krzysztof Kozlowski, andersson, konradybcio, robh, krzk+dt,
conor+dt, vkoul, Frank.Li, linux-arm-msm, devicetree,
linux-kernel, dmaengine
Cc: quic_varada
Hi,
On 2/6/2026 10:42 PM, Krzysztof Kozlowski wrote:
> On 06/02/2026 11:01, Md Sadre Alam wrote:
>> BAM version 1.6.0 and later changed the behavior of the mask field in
>> command elements for read operations. In newer BAM versions, the mask
>> field for read commands contains the upper 4 bits of the destination
>> address to support 36-bit addressing, while for write commands it
>> continues to function as a traditional write mask.
>>
>> This change causes NAND enumeration failures on platforms like IPQ5424
>
> Please do not use "This commit/patch/change", but imperative mood. See
> longer explanation here:
> https://elixir.bootlin.com/linux/v6.16/source/Documentation/process/submitting-patches.rst#L94
Ok
>
>> that use BAM v1.6.0+, because the current code sets mask=0xffffffff
>> for all commands. For read commands on newer BAM versions, this results
>> in the hardware interpreting the destination address as 0xf_xxxxxxxx
>> (invalid high memory) instead of the intended 0x0_xxxxxxxx address.
>>
>> Fixed this issue by:
>> 1. Updating the bam_cmd_element structure documentation to reflect the
>> dual purpose of the mask field
>> 2. Modifying bam_prep_ce_le32() to set appropriate mask values based on
>> command type:
>> - For read commands: mask = 0 (32-bit addressing, upper bits = 0)
>> - For write commands: mask = 0xffffffff (traditional write mask)
>> 3. Maintaining backward compatibility with older BAM versions
>>
>> This fix enables proper NAND functionality on IPQ5424 and other platforms
>> using BAM v1.6.0+ while preserving compatibility with existing systems.
>
> Fixes tag? CC-stable?
This patch is not fixing an existing commit. This is to address the
update in the newer version of the hardware.
>
> Why is this part of DTS patchset? Do not combine independent work, you
> only make it difficult for maintainers to handle your work.
Will post a new version with the driver change as a separate patch.
Thanks
Alam
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+
2026-02-06 17:12 ` Krzysztof Kozlowski
2026-02-09 11:43 ` Md Sadre Alam
@ 2026-02-09 11:44 ` Md Sadre Alam
1 sibling, 0 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-09 11:44 UTC (permalink / raw)
To: Krzysztof Kozlowski, andersson, konradybcio, robh, krzk+dt,
conor+dt, vkoul, Frank.Li, linux-arm-msm, devicetree,
linux-kernel, dmaengine
Cc: quic_varada
Hi,
On 2/6/2026 10:42 PM, Krzysztof Kozlowski wrote:
> On 06/02/2026 11:01, Md Sadre Alam wrote:
>> BAM version 1.6.0 and later changed the behavior of the mask field in
>> command elements for read operations. In newer BAM versions, the mask
>> field for read commands contains the upper 4 bits of the destination
>> address to support 36-bit addressing, while for write commands it
>> continues to function as a traditional write mask.
>>
>> This change causes NAND enumeration failures on platforms like IPQ5424
>
> Please do not use "This commit/patch/change", but imperative mood. See
> longer explanation here:
> https://elixir.bootlin.com/linux/v6.16/source/Documentation/process/submitting-patches.rst#L94
Ok
>
>> that use BAM v1.6.0+, because the current code sets mask=0xffffffff
>> for all commands. For read commands on newer BAM versions, this results
>> in the hardware interpreting the destination address as 0xf_xxxxxxxx
>> (invalid high memory) instead of the intended 0x0_xxxxxxxx address.
>>
>> Fixed this issue by:
>> 1. Updating the bam_cmd_element structure documentation to reflect the
>> dual purpose of the mask field
>> 2. Modifying bam_prep_ce_le32() to set appropriate mask values based on
>> command type:
>> - For read commands: mask = 0 (32-bit addressing, upper bits = 0)
>> - For write commands: mask = 0xffffffff (traditional write mask)
>> 3. Maintaining backward compatibility with older BAM versions
>>
>> This fix enables proper NAND functionality on IPQ5424 and other platforms
>> using BAM v1.6.0+ while preserving compatibility with existing systems.
>
> Fixes tag? CC-stable?
This patch is not fixing an existing commit. This is to address the
update in the newer version of the hardware.
>
> Why is this part of DTS patchset? Do not combine independent work, you
> only make it difficult for maintainers to handle your work.
Will post a new version with the driver change as a separate patch.
Thanks,
Alam.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+
2026-02-09 11:43 ` Md Sadre Alam
@ 2026-02-09 12:06 ` Krzysztof Kozlowski
2026-02-10 9:44 ` Md Sadre Alam
0 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-09 12:06 UTC (permalink / raw)
To: Md Sadre Alam, andersson, konradybcio, robh, krzk+dt, conor+dt,
vkoul, Frank.Li, linux-arm-msm, devicetree, linux-kernel,
dmaengine
Cc: quic_varada
On 09/02/2026 12:43, Md Sadre Alam wrote:
>>> that use BAM v1.6.0+, because the current code sets mask=0xffffffff
>>> for all commands. For read commands on newer BAM versions, this results
>>> in the hardware interpreting the destination address as 0xf_xxxxxxxx
>>> (invalid high memory) instead of the intended 0x0_xxxxxxxx address.
>>>
>>> Fixed this issue by:
>>> 1. Updating the bam_cmd_element structure documentation to reflect the
>>> dual purpose of the mask field
>>> 2. Modifying bam_prep_ce_le32() to set appropriate mask values based on
>>> command type:
>>> - For read commands: mask = 0 (32-bit addressing, upper bits = 0)
>>> - For write commands: mask = 0xffffffff (traditional write mask)
>>> 3. Maintaining backward compatibility with older BAM versions
>>>
>>> This fix enables proper NAND functionality on IPQ5424 and other platforms
>>> using BAM v1.6.0+ while preserving compatibility with existing systems.
>>
>> Fixes tag? CC-stable?
>
> This patch is not fixing an existing commit. This is to address the
> update in the newer version of the hardware.
Then "this fix" is misleading. Either you fix or not fix.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+
2026-02-09 12:06 ` Krzysztof Kozlowski
@ 2026-02-10 9:44 ` Md Sadre Alam
0 siblings, 0 replies; 14+ messages in thread
From: Md Sadre Alam @ 2026-02-10 9:44 UTC (permalink / raw)
To: Krzysztof Kozlowski, andersson, konradybcio, robh, krzk+dt,
conor+dt, vkoul, Frank.Li, linux-arm-msm, devicetree,
linux-kernel, dmaengine
Cc: quic_varada
Hi,
On 2/9/2026 5:36 PM, Krzysztof Kozlowski wrote:
> On 09/02/2026 12:43, Md Sadre Alam wrote:
>>>> that use BAM v1.6.0+, because the current code sets mask=0xffffffff
>>>> for all commands. For read commands on newer BAM versions, this results
>>>> in the hardware interpreting the destination address as 0xf_xxxxxxxx
>>>> (invalid high memory) instead of the intended 0x0_xxxxxxxx address.
>>>>
>>>> Fixed this issue by:
>>>> 1. Updating the bam_cmd_element structure documentation to reflect the
>>>> dual purpose of the mask field
>>>> 2. Modifying bam_prep_ce_le32() to set appropriate mask values based on
>>>> command type:
>>>> - For read commands: mask = 0 (32-bit addressing, upper bits = 0)
>>>> - For write commands: mask = 0xffffffff (traditional write mask)
>>>> 3. Maintaining backward compatibility with older BAM versions
>>>>
>>>> This fix enables proper NAND functionality on IPQ5424 and other platforms
>>>> using BAM v1.6.0+ while preserving compatibility with existing systems.
>>>
>>> Fixes tag? CC-stable?
>>
>> This patch is not fixing an existing commit. This is to address the
>> update in the newer version of the hardware.
>
> Then "this fix" is misleading. Either you fix or not fix.
You are right — the wording is misleading. I will update the commit
message in next revision.
Thanks,
Alam.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-02-10 9:45 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 10:01 [PATCH v4 0/7] Add QPIC SPI NAND support for IPQ5424 and IPQ5332 platforms Md Sadre Alam
2026-02-06 10:01 ` [PATCH v4 1/7] dma: qcom: bam_dma: Fix command element mask field for BAM v1.6.0+ Md Sadre Alam
2026-02-06 17:12 ` Krzysztof Kozlowski
2026-02-09 11:43 ` Md Sadre Alam
2026-02-09 12:06 ` Krzysztof Kozlowski
2026-02-10 9:44 ` Md Sadre Alam
2026-02-09 11:44 ` Md Sadre Alam
2026-02-06 19:24 ` Frank Li
2026-02-06 10:01 ` [PATCH v4 2/7] arm64: dts: qcom: ipq5424: Add QPIC SPI NAND controller support Md Sadre Alam
2026-02-06 10:01 ` [PATCH v4 3/7] arm64: dts: qcom: ipq5332: " Md Sadre Alam
2026-02-06 10:01 ` [PATCH v4 4/7] arm64: dts: qcom: ipq5424-rdp466: Enable QPIC SPI NAND support Md Sadre Alam
2026-02-06 10:02 ` [PATCH v4 5/7] arm64: dts: qcom: pq5332-rdp-common: " Md Sadre Alam
2026-02-06 10:02 ` [PATCH v4 6/7] arm64: dts: qcom: ipq5424-rdp466: Remove eMMC support Md Sadre Alam
2026-02-06 10:02 ` [PATCH v4 7/7] arm64: dts: qcom: ipq5332-rdp442: " Md Sadre Alam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox