mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75
@ 2025-04-23  6:30 Kaushal Kumar
  2025-04-23  6:30 ` [PATCH v3 1/5] dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller Kaushal Kumar
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Kaushal Kumar @ 2025-04-23  6:30 UTC (permalink / raw)
  To: vkoul, robh, krzk+dt, conor+dt, manivannan.sadhasivam,
	miquel.raynal, richard, vigneshr, andersson, konradybcio, agross
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel, linux-mtd,
	Kaushal Kumar

Hello,

This series adds and enables devicetree nodes for QPIC BAM and QPIC NAND
for Qualcomm SDX75 platform.

This patch series depends on the below patches:
https://lore.kernel.org/linux-spi/20250410100019.2872271-1-quic_mdalam@quicinc.com/

---
Changes since v2:
 - Add qcom,bam-v1.7.4 as a compatible for QPIC BAM DMA controller DT node.
 - Link to v2: https://lore.kernel.org/all/20250415072756.20046-1-quic_kaushalk@quicinc.com/

Changes since v1:
 - Use sleep clock instead of adding a dummy clock for QPIC NAND since
   sleep clock has the required properties.
 - QPIC BAM controllers have dma-coherent support hence document it as a
   global property.
 - dma-coherent property is not applicable for QPIC NAND controller so
   remove it.
 - iommus items is fixed for SDX75 NAND controller so document it likewise.
 - Merge QPIC NAND and BAM devicetree enablement into a single patch.
 - Fix minor coding style issues.
 - Link to v1: https://lore.kernel.org/all/5a1b52a3-962b-04f9-cdfc-4e38983610b5@quicinc.com/

Kaushal Kumar (5):
  dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller
  dt-bindings: dma: qcom,bam: Document dma-coherent property
  arm64: dts: qcom: sdx75: Add QPIC BAM support
  arm64: dts: qcom: sdx75: Add QPIC NAND support
  arm64: dts: qcom: sdx75-idp: Enable QPIC BAM & QPIC NAND support

 .../devicetree/bindings/dma/qcom,bam-dma.yaml |  2 ++
 .../devicetree/bindings/mtd/qcom,nandc.yaml   | 30 +++++++++++++----
 arch/arm64/boot/dts/qcom/sdx75-idp.dts        | 18 ++++++++++
 arch/arm64/boot/dts/qcom/sdx75.dtsi           | 33 +++++++++++++++++++
 4 files changed, 77 insertions(+), 6 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 1/5] dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller
  2025-04-23  6:30 [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Kaushal Kumar
@ 2025-04-23  6:30 ` Kaushal Kumar
  2025-04-23  6:30 ` [PATCH v3 2/5] dt-bindings: dma: qcom,bam: Document dma-coherent property Kaushal Kumar
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kaushal Kumar @ 2025-04-23  6:30 UTC (permalink / raw)
  To: vkoul, robh, krzk+dt, conor+dt, manivannan.sadhasivam,
	miquel.raynal, richard, vigneshr, andersson, konradybcio, agross
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel, linux-mtd,
	Kaushal Kumar

Add new compatible for the QPIC NAND controller v2.1.1 used for SDX75 SoC.

SDX75 NAND controller has iommu support so define it in the properties
section.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Kaushal Kumar <quic_kaushalk@quicinc.com>
---
 .../devicetree/bindings/mtd/qcom,nandc.yaml   | 30 +++++++++++++++----
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
index 35b4206ea918..5511389960f0 100644
--- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
+++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
@@ -11,12 +11,18 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - qcom,ipq806x-nand
-      - qcom,ipq4019-nand
-      - qcom,ipq6018-nand
-      - qcom,ipq8074-nand
-      - qcom,sdx55-nand
+    oneOf:
+      - items:
+          - enum:
+              - qcom,sdx75-nand
+          - const: qcom,sdx55-nand
+      - items:
+          - enum:
+              - qcom,ipq806x-nand
+              - qcom,ipq4019-nand
+              - qcom,ipq6018-nand
+              - qcom,ipq8074-nand
+              - qcom,sdx55-nand
 
   reg:
     maxItems: 1
@@ -95,6 +101,18 @@ allOf:
           items:
             - const: rxtx
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sdx75-nand
+
+    then:
+      properties:
+        iommus:
+          maxItems: 1
+
   - if:
       properties:
         compatible:
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 2/5] dt-bindings: dma: qcom,bam: Document dma-coherent property
  2025-04-23  6:30 [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Kaushal Kumar
  2025-04-23  6:30 ` [PATCH v3 1/5] dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller Kaushal Kumar
@ 2025-04-23  6:30 ` Kaushal Kumar
  2025-04-23  6:30 ` [PATCH v3 3/5] arm64: dts: qcom: sdx75: Add QPIC BAM support Kaushal Kumar
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kaushal Kumar @ 2025-04-23  6:30 UTC (permalink / raw)
  To: vkoul, robh, krzk+dt, conor+dt, manivannan.sadhasivam,
	miquel.raynal, richard, vigneshr, andersson, konradybcio, agross
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel, linux-mtd,
	Kaushal Kumar

Qualcomm BAM DMA controller has DMA-coherent support so define it in the
properties section.

Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Kaushal Kumar <quic_kaushalk@quicinc.com>
---
 Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
index 3ad0d9b1fbc5..f2f87f0f545b 100644
--- a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
@@ -42,6 +42,8 @@ properties:
   interrupts:
     maxItems: 1
 
+  dma-coherent: true
+
   iommus:
     minItems: 1
     maxItems: 6
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 3/5] arm64: dts: qcom: sdx75: Add QPIC BAM support
  2025-04-23  6:30 [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Kaushal Kumar
  2025-04-23  6:30 ` [PATCH v3 1/5] dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller Kaushal Kumar
  2025-04-23  6:30 ` [PATCH v3 2/5] dt-bindings: dma: qcom,bam: Document dma-coherent property Kaushal Kumar
@ 2025-04-23  6:30 ` Kaushal Kumar
  2025-04-23  6:30 ` [PATCH v3 4/5] arm64: dts: qcom: sdx75: Add QPIC NAND support Kaushal Kumar
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kaushal Kumar @ 2025-04-23  6:30 UTC (permalink / raw)
  To: vkoul, robh, krzk+dt, conor+dt, manivannan.sadhasivam,
	miquel.raynal, richard, vigneshr, andersson, konradybcio, agross
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel, linux-mtd,
	Kaushal Kumar

Add devicetree node to enable support for QPIC BAM DMA controller on
Qualcomm SDX75 platform.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Kaushal Kumar <quic_kaushalk@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sdx75.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdx75.dtsi b/arch/arm64/boot/dts/qcom/sdx75.dtsi
index b0a8a0fe5f39..638e07b00733 100644
--- a/arch/arm64/boot/dts/qcom/sdx75.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdx75.dtsi
@@ -880,6 +880,20 @@
 			qcom,bcm-voters = <&apps_bcm_voter>;
 		};
 
+		qpic_bam: dma-controller@1c9c000 {
+			compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+			reg = <0x0 0x01c9c000 0x0 0x1c000>;
+			interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&rpmhcc RPMH_QPIC_CLK>;
+			clock-names = "bam_clk";
+			#dma-cells = <1>;
+			qcom,ee = <0>;
+			qcom,controlled-remotely;
+			iommus = <&apps_smmu 0x100 0x3>;
+			dma-coherent;
+			status = "disabled";
+		};
+
 		tcsr_mutex: hwlock@1f40000 {
 			compatible = "qcom,tcsr-mutex";
 			reg = <0x0 0x01f40000 0x0 0x40000>;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 4/5] arm64: dts: qcom: sdx75: Add QPIC NAND support
  2025-04-23  6:30 [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Kaushal Kumar
                   ` (2 preceding siblings ...)
  2025-04-23  6:30 ` [PATCH v3 3/5] arm64: dts: qcom: sdx75: Add QPIC BAM support Kaushal Kumar
@ 2025-04-23  6:30 ` Kaushal Kumar
  2025-04-23  6:30 ` [PATCH v3 5/5] arm64: dts: qcom: sdx75-idp: Enable QPIC BAM & " Kaushal Kumar
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kaushal Kumar @ 2025-04-23  6:30 UTC (permalink / raw)
  To: vkoul, robh, krzk+dt, conor+dt, manivannan.sadhasivam,
	miquel.raynal, richard, vigneshr, andersson, konradybcio, agross
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel, linux-mtd,
	Kaushal Kumar

Add devicetree node to enable support for QPIC NAND controller on Qualcomm
SDX75 platform.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Kaushal Kumar <quic_kaushalk@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sdx75.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdx75.dtsi b/arch/arm64/boot/dts/qcom/sdx75.dtsi
index 638e07b00733..3e86b1d67130 100644
--- a/arch/arm64/boot/dts/qcom/sdx75.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdx75.dtsi
@@ -894,6 +894,25 @@
 			status = "disabled";
 		};
 
+		qpic_nand: nand-controller@1cc8000 {
+			compatible = "qcom,sdx75-nand", "qcom,sdx55-nand";
+			reg = <0x0 0x01cc8000 0x0 0x10000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			clocks = <&rpmhcc RPMH_QPIC_CLK>,
+				 <&sleep_clk>;
+			clock-names = "core",
+				      "aon";
+			dmas = <&qpic_bam 0>,
+			       <&qpic_bam 1>,
+			       <&qpic_bam 2>;
+			dma-names = "tx",
+				    "rx",
+				    "cmd";
+			iommus = <&apps_smmu 0x100 0x3>;
+			status = "disabled";
+		};
+
 		tcsr_mutex: hwlock@1f40000 {
 			compatible = "qcom,tcsr-mutex";
 			reg = <0x0 0x01f40000 0x0 0x40000>;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 5/5] arm64: dts: qcom: sdx75-idp: Enable QPIC BAM & QPIC NAND support
  2025-04-23  6:30 [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Kaushal Kumar
                   ` (3 preceding siblings ...)
  2025-04-23  6:30 ` [PATCH v3 4/5] arm64: dts: qcom: sdx75: Add QPIC NAND support Kaushal Kumar
@ 2025-04-23  6:30 ` Kaushal Kumar
  2025-04-24  5:36 ` (subset) [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Vinod Koul
  2025-04-29  9:28 ` Miquel Raynal
  6 siblings, 0 replies; 8+ messages in thread
From: Kaushal Kumar @ 2025-04-23  6:30 UTC (permalink / raw)
  To: vkoul, robh, krzk+dt, conor+dt, manivannan.sadhasivam,
	miquel.raynal, richard, vigneshr, andersson, konradybcio, agross
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel, linux-mtd,
	Kaushal Kumar

Enable QPIC BAM and QPIC NAND devicetree nodes for Qualcomm SDX75-IDP
board.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Kaushal Kumar <quic_kaushalk@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sdx75-idp.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdx75-idp.dts b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
index f1bbe7ab01ab..06cacec3461f 100644
--- a/arch/arm64/boot/dts/qcom/sdx75-idp.dts
+++ b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
@@ -278,6 +278,24 @@
 	vdd3-supply = <&vreg_l10b_3p08>;
 };
 
+&qpic_bam {
+	status = "okay";
+};
+
+&qpic_nand {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+
+		nand-ecc-strength = <8>;
+		nand-ecc-step-size = <512>;
+		nand-bus-width = <8>;
+		/* efs2 partition is secured */
+		secure-regions = /bits/ 64 <0x680000 0xb00000>;
+	};
+};
+
 &qupv3_id_0 {
 	status = "okay";
 };
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: (subset) [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75
  2025-04-23  6:30 [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Kaushal Kumar
                   ` (4 preceding siblings ...)
  2025-04-23  6:30 ` [PATCH v3 5/5] arm64: dts: qcom: sdx75-idp: Enable QPIC BAM & " Kaushal Kumar
@ 2025-04-24  5:36 ` Vinod Koul
  2025-04-29  9:28 ` Miquel Raynal
  6 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2025-04-24  5:36 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, manivannan.sadhasivam, miquel.raynal,
	richard, vigneshr, andersson, konradybcio, agross, Kaushal Kumar
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel, linux-mtd


On Wed, 23 Apr 2025 12:00:49 +0530, Kaushal Kumar wrote:
> This series adds and enables devicetree nodes for QPIC BAM and QPIC NAND
> for Qualcomm SDX75 platform.
> 
> This patch series depends on the below patches:
> https://lore.kernel.org/linux-spi/20250410100019.2872271-1-quic_mdalam@quicinc.com/
> 

Applied, thanks!

[2/5] dt-bindings: dma: qcom,bam: Document dma-coherent property
      commit: 5965fd614b18e77c56cfefbd2d747b6b1edf1497

Best regards,
-- 
~Vinod



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75
  2025-04-23  6:30 [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Kaushal Kumar
                   ` (5 preceding siblings ...)
  2025-04-24  5:36 ` (subset) [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Vinod Koul
@ 2025-04-29  9:28 ` Miquel Raynal
  6 siblings, 0 replies; 8+ messages in thread
From: Miquel Raynal @ 2025-04-29  9:28 UTC (permalink / raw)
  To: vkoul, robh, krzk+dt, conor+dt, manivannan.sadhasivam, richard,
	vigneshr, andersson, konradybcio, agross, Kaushal Kumar
  Cc: Miquel Raynal, linux-arm-msm, dmaengine, devicetree,
	linux-kernel, linux-mtd

On Wed, 23 Apr 2025 12:00:49 +0530, Kaushal Kumar wrote:
> This series adds and enables devicetree nodes for QPIC BAM and QPIC NAND
> for Qualcomm SDX75 platform.
> 
> This patch series depends on the below patches:
> https://lore.kernel.org/linux-spi/20250410100019.2872271-1-quic_mdalam@quicinc.com/
> 

Applied to nand/next, thanks!

[1/5] dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller
      commit: 2cf4bc06f7008fe3eab4b27d7c0ba9ba08f5dc5d

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-04-29  9:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-23  6:30 [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Kaushal Kumar
2025-04-23  6:30 ` [PATCH v3 1/5] dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller Kaushal Kumar
2025-04-23  6:30 ` [PATCH v3 2/5] dt-bindings: dma: qcom,bam: Document dma-coherent property Kaushal Kumar
2025-04-23  6:30 ` [PATCH v3 3/5] arm64: dts: qcom: sdx75: Add QPIC BAM support Kaushal Kumar
2025-04-23  6:30 ` [PATCH v3 4/5] arm64: dts: qcom: sdx75: Add QPIC NAND support Kaushal Kumar
2025-04-23  6:30 ` [PATCH v3 5/5] arm64: dts: qcom: sdx75-idp: Enable QPIC BAM & " Kaushal Kumar
2025-04-24  5:36 ` (subset) [PATCH v3 0/5] Enable QPIC BAM and QPIC NAND support for SDX75 Vinod Koul
2025-04-29  9:28 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®