* [PATCH 1/2] spi: dt-bindings: spi-qpic-snand: Add ipq5210 compatible
2026-05-14 6:45 [PATCH 0/2] Enable QPIC-SPI-NAND controller for ipq5210 Varadarajan Narayanan
@ 2026-05-14 6:45 ` Varadarajan Narayanan
2026-05-14 6:45 ` [PATCH 2/2] arm64: dts: qcom: ipq5210: Add QPIC SPI NAND controller support Varadarajan Narayanan
2026-05-26 18:38 ` (subset) [PATCH 0/2] Enable QPIC-SPI-NAND controller for ipq5210 Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Varadarajan Narayanan @ 2026-05-14 6:45 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
sadre Alam, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-spi, devicetree, linux-kernel,
Varadarajan Narayanan
Since the QPIC-SPI-NAND flash controller present in ipq5210 is the same
as the one found in ipq9574, document the ipq5210 compatible and with
ipq9574 as the fallback.
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
Documentation/devicetree/bindings/spi/qcom,spi-qpic-snand.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-qpic-snand.yaml b/Documentation/devicetree/bindings/spi/qcom,spi-qpic-snand.yaml
index 7d0571feb46d..829da22537d4 100644
--- a/Documentation/devicetree/bindings/spi/qcom,spi-qpic-snand.yaml
+++ b/Documentation/devicetree/bindings/spi/qcom,spi-qpic-snand.yaml
@@ -25,6 +25,7 @@ properties:
- items:
- enum:
- qcom,ipq5018-snand
+ - qcom,ipq5210-snand
- qcom,ipq5332-snand
- qcom,ipq5424-snand
- const: qcom,ipq9574-snand
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/2] arm64: dts: qcom: ipq5210: Add QPIC SPI NAND controller support
2026-05-14 6:45 [PATCH 0/2] Enable QPIC-SPI-NAND controller for ipq5210 Varadarajan Narayanan
2026-05-14 6:45 ` [PATCH 1/2] spi: dt-bindings: spi-qpic-snand: Add ipq5210 compatible Varadarajan Narayanan
@ 2026-05-14 6:45 ` Varadarajan Narayanan
2026-05-14 12:50 ` sashiko-bot
2026-06-16 13:18 ` Konrad Dybcio
2026-05-26 18:38 ` (subset) [PATCH 0/2] Enable QPIC-SPI-NAND controller for ipq5210 Mark Brown
2 siblings, 2 replies; 6+ messages in thread
From: Varadarajan Narayanan @ 2026-05-14 6:45 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
sadre Alam, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-spi, devicetree, linux-kernel,
Varadarajan Narayanan
Add device tree nodes for QPIC SPI NAND flash controller support on
ipq5210 SoC.
The ipq5210 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: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts | 42 +++++++++++++++++++++++++++++
arch/arm64/boot/dts/qcom/ipq5210.dtsi | 29 ++++++++++++++++++++
2 files changed, 71 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts b/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts
index 941f866ecfe9..4813662c2d6c 100644
--- a/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts
@@ -20,6 +20,25 @@ chosen {
};
};
+&qpic_bam {
+ status = "okay";
+};
+
+&qpic_nand {
+ pinctrl-0 = <&qpic_snand_default_state>;
+ pinctrl-names = "default";
+
+ 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>;
+ };
+};
+
&sdhc {
max-frequency = <192000000>;
bus-width = <4>;
@@ -36,6 +55,29 @@ &sleep_clk {
};
&tlmm {
+ qpic_snand_default_state: qpic-snand-default-state {
+ clock-pins {
+ pins = "gpio5";
+ function = "qspi_clk";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ cs-pins {
+ pins = "gpio4";
+ function = "qspi_cs_n";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ data-pins {
+ pins = "gpio0", "gpio1", "gpio2", "gpio3";
+ function = "qspi_data";
+ drive-strength = <8>;
+ bias-disable;
+ };
+ };
+
qup_uart1_default_state: qup-uart1-default-state {
pins = "gpio38", "gpio39";
function = "qup_se1";
diff --git a/arch/arm64/boot/dts/qcom/ipq5210.dtsi b/arch/arm64/boot/dts/qcom/ipq5210.dtsi
index 3761eb03ab24..7fd4291caff2 100644
--- a/arch/arm64/boot/dts/qcom/ipq5210.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5210.dtsi
@@ -204,6 +204,35 @@ sdhc: mmc@7804000 {
status = "disabled";
};
+ qpic_bam: dma-controller@7984000 {
+ compatible = "qcom,bam-v1.7.0";
+ reg = <0x0 0x07984000 0x0 0x1c000>;
+ interrupts = <GIC_SPI 56 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,ipq5210-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@b000000 {
compatible = "qcom,msm-qgic2";
interrupt-controller;
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] arm64: dts: qcom: ipq5210: Add QPIC SPI NAND controller support
2026-05-14 6:45 ` [PATCH 2/2] arm64: dts: qcom: ipq5210: Add QPIC SPI NAND controller support Varadarajan Narayanan
@ 2026-05-14 12:50 ` sashiko-bot
2026-06-16 13:18 ` Konrad Dybcio
1 sibling, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-05-14 12:50 UTC (permalink / raw)
To: Varadarajan Narayanan; +Cc: krzk+dt, conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `&qpic_nand` node in the board device tree (`ipq5210-rdp504.dts`) is missing the `status = "okay";` property.
--
commit 0c64aa0eee90581723a1d1e649a4fc267a75331a
Author: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
arm64: dts: qcom: ipq5210: Add QPIC SPI NAND controller support
This commit adds device tree nodes for QPIC SPI NAND flash controller support
on the ipq5210 SoC. It includes hardware ECC capabilities and DMA support
through BAM.
> diff --git a/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts b/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts
> index 941f866ecfe95..4813662c2d6c8 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts
> @@ -20,6 +20,25 @@ chosen {
> };
> };
>
> +&qpic_bam {
> + status = "okay";
> +};
> +
> +&qpic_nand {
> + pinctrl-0 = <&qpic_snand_default_state>;
> + pinctrl-names = "default";
Should this node include a status = "okay"; property?
The qpic_nand SPI controller is defined with status = "disabled"; by default
in the dtsi file (shown below). Without overriding the status here, will the
controller and its attached SPI NAND flash be probed and instantiated by the
kernel?
[ ... ]
> diff --git a/arch/arm64/boot/dts/qcom/ipq5210.dtsi b/arch/arm64/boot/dts/qcom/ipq5210.dtsi
> index 3761eb03ab246..7fd4291caff20 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5210.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq5210.dtsi
[ ... ]
> @@ -204,6 +204,35 @@ sdhc: mmc@7804000 {
[ ... ]
> + qpic_nand: spi@79b0000 {
> + compatible = "qcom,ipq5210-snand", "qcom,ipq9574-snand";
> + reg = <0x0 0x079b0000 0x0 0x10000>;
[ ... ]
> + status = "disabled";
> + };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260514-ipq5210-nand-v1-0-cbdd7492e826@oss.qualcomm.com?part=2
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] arm64: dts: qcom: ipq5210: Add QPIC SPI NAND controller support
2026-05-14 6:45 ` [PATCH 2/2] arm64: dts: qcom: ipq5210: Add QPIC SPI NAND controller support Varadarajan Narayanan
2026-05-14 12:50 ` sashiko-bot
@ 2026-06-16 13:18 ` Konrad Dybcio
1 sibling, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-06-16 13:18 UTC (permalink / raw)
To: Varadarajan Narayanan, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, sadre Alam, Bjorn Andersson,
Konrad Dybcio
Cc: linux-arm-msm, linux-spi, devicetree, linux-kernel
On 5/14/26 8:45 AM, Varadarajan Narayanan wrote:
> Add device tree nodes for QPIC SPI NAND flash controller support on
> ipq5210 SoC.
>
> The ipq5210 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: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts | 42 +++++++++++++++++++++++++++++
> arch/arm64/boot/dts/qcom/ipq5210.dtsi | 29 ++++++++++++++++++++
Please align with your colleague's submission for similar platforms:
https://lore.kernel.org/linux-arm-msm/20260306113940.1654304-3-quic_mdalam@quicinc.com/
->
- separate commit for SoC and board
- is the BAM host v1.7.0 or v1.7.4?
- style: clock/dma-names, 1 entry per line, please
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (subset) [PATCH 0/2] Enable QPIC-SPI-NAND controller for ipq5210
2026-05-14 6:45 [PATCH 0/2] Enable QPIC-SPI-NAND controller for ipq5210 Varadarajan Narayanan
2026-05-14 6:45 ` [PATCH 1/2] spi: dt-bindings: spi-qpic-snand: Add ipq5210 compatible Varadarajan Narayanan
2026-05-14 6:45 ` [PATCH 2/2] arm64: dts: qcom: ipq5210: Add QPIC SPI NAND controller support Varadarajan Narayanan
@ 2026-05-26 18:38 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2026-05-26 18:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, sadre Alam,
Bjorn Andersson, Konrad Dybcio, Varadarajan Narayanan
Cc: linux-arm-msm, linux-spi, devicetree, linux-kernel
On Thu, 14 May 2026 12:15:30 +0530, Varadarajan Narayanan wrote:
> Enable QPIC-SPI-NAND controller for ipq5210
>
> Document the NAND controller binding and add the DT nodes to
> enable the QPIC-SPI-NAND controller in ipq5210.
>
> Functionally depends on [1]
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.1
Thanks!
[1/2] spi: dt-bindings: spi-qpic-snand: Add ipq5210 compatible
https://git.kernel.org/broonie/spi/c/60474437af5f
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread