* [PATCH 0/2] Enable QPIC-SPI-NAND controller for ipq5210
@ 2026-05-14 6:45 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
0 siblings, 2 replies; 4+ 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
Document the NAND controller binding and add the DT nodes to
enable the QPIC-SPI-NAND controller in ipq5210.
Functionally depends on [1]
1 - https://lore.kernel.org/linux-arm-msm/20260514-bam-fix-v5-1-58f6edb34969@oss.qualcomm.com/
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
Varadarajan Narayanan (2):
spi: dt-bindings: spi-qpic-snand: Add ipq5210 compatible
arm64: dts: qcom: ipq5210: Add QPIC SPI NAND controller support
.../bindings/spi/qcom,spi-qpic-snand.yaml | 1 +
arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts | 42 ++++++++++++++++++++++
arch/arm64/boot/dts/qcom/ipq5210.dtsi | 29 +++++++++++++++
3 files changed, 72 insertions(+)
---
base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
change-id: 20260514-ipq5210-nand-eb7e15d0d371
prerequisite-change-id: 20260514-bam-fix-142a0ee8057e:v5
prerequisite-patch-id: 9e9abb177bcb562f5a07a4865e9d88e82dbb98b8
Best regards,
--
Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [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
1 sibling, 0 replies; 4+ 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] 4+ 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
1 sibling, 1 reply; 4+ 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] 4+ 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
0 siblings, 0 replies; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2026-05-14 12:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-14 12:50 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox