Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/3] Add QPIC NAND support for IPQ6018
@ 2020-10-13  5:15 Kathiravan T
  2020-10-13  5:15 ` [PATCH 1/3] dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation Kathiravan T
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Kathiravan T @ 2020-10-13  5:15 UTC (permalink / raw)
  To: agross, miquel.raynal, richard, vigneshr, robh+dt, sivaprak,
	peter.ujfalusi, boris.brezillon, linux-arm-msm, linux-mtd,
	devicetree, linux-kernel
  Cc: kathirav

IPQ6018 has the QPIC NAND controller of version 1.5.0, which
uses the BAM DMA. Add support for the QPIC BAM, QPIC NAND and
enable the same in the board DTS file.

Kathiravan T (3):
  dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation
  mtd: rawnand: qcom: Support for IPQ6018 QPIC NAND controller
  arm64: dts: ipq6018: Add the QPIC peripheral nodes

 .../devicetree/bindings/mtd/qcom_nandc.txt    |  2 +
 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts  | 16 ++++++++
 arch/arm64/boot/dts/qcom/ipq6018.dtsi         | 41 +++++++++++++++++++
 drivers/mtd/nand/raw/qcom_nandc.c             |  4 ++
 4 files changed, 63 insertions(+)


base-commit: bbf5c979011a099af5dc76498918ed7df445635b
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 1/3] dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation
  2020-10-13  5:15 [PATCH 0/3] Add QPIC NAND support for IPQ6018 Kathiravan T
@ 2020-10-13  5:15 ` Kathiravan T
  2020-10-13 17:23   ` Rob Herring
  2020-10-30 17:27   ` Miquel Raynal
  2020-10-13  5:15 ` [PATCH 2/3] mtd: rawnand: qcom: Support for IPQ6018 QPIC NAND controller Kathiravan T
  2020-10-13  5:15 ` [PATCH 3/3] arm64: dts: ipq6018: Add the QPIC peripheral nodes Kathiravan T
  2 siblings, 2 replies; 7+ messages in thread
From: Kathiravan T @ 2020-10-13  5:15 UTC (permalink / raw)
  To: agross, miquel.raynal, richard, vigneshr, robh+dt, sivaprak,
	peter.ujfalusi, boris.brezillon, linux-arm-msm, linux-mtd,
	devicetree, linux-kernel
  Cc: kathirav

Add the binding for the QPIC NAND used on IPQ6018 SoC.

Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
---
 Documentation/devicetree/bindings/mtd/qcom_nandc.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt
index 5c2fba4b30fe..5bdcd9990a94 100644
--- a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt
+++ b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt
@@ -6,6 +6,8 @@ Required properties:
 			    SoC and it uses ADM DMA
     * "qcom,ipq4019-nand" - for QPIC NAND controller v1.4.0 being used in
                             IPQ4019 SoC and it uses BAM DMA
+    * "qcom,ipq6018-nand" - for QPIC NAND controller v1.5.0 being used in
+                            IPQ6018 SoC and it uses BAM DMA
     * "qcom,ipq8074-nand" - for QPIC NAND controller v1.5.0 being used in
                             IPQ8074 SoC and it uses BAM DMA
 
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 2/3] mtd: rawnand: qcom: Support for IPQ6018 QPIC NAND controller
  2020-10-13  5:15 [PATCH 0/3] Add QPIC NAND support for IPQ6018 Kathiravan T
  2020-10-13  5:15 ` [PATCH 1/3] dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation Kathiravan T
@ 2020-10-13  5:15 ` Kathiravan T
  2020-10-30 17:27   ` Miquel Raynal
  2020-10-13  5:15 ` [PATCH 3/3] arm64: dts: ipq6018: Add the QPIC peripheral nodes Kathiravan T
  2 siblings, 1 reply; 7+ messages in thread
From: Kathiravan T @ 2020-10-13  5:15 UTC (permalink / raw)
  To: agross, miquel.raynal, richard, vigneshr, robh+dt, sivaprak,
	peter.ujfalusi, boris.brezillon, linux-arm-msm, linux-mtd,
	devicetree, linux-kernel
  Cc: kathirav

Add the compatible string for IPQ6018 QPIC NAND controller
version 1.5.0. It's properties are same as IPQ8074, so reuse
the same.

Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
---
 drivers/mtd/nand/raw/qcom_nandc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
index bd7a7251429b..e7480b53ad40 100644
--- a/drivers/mtd/nand/raw/qcom_nandc.c
+++ b/drivers/mtd/nand/raw/qcom_nandc.c
@@ -3071,6 +3071,10 @@ static const struct of_device_id qcom_nandc_of_match[] = {
 		.compatible = "qcom,ipq4019-nand",
 		.data = &ipq4019_nandc_props,
 	},
+	{
+		.compatible = "qcom,ipq6018-nand",
+		.data = &ipq8074_nandc_props,
+	},
 	{
 		.compatible = "qcom,ipq8074-nand",
 		.data = &ipq8074_nandc_props,
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 3/3] arm64: dts: ipq6018: Add the QPIC peripheral nodes
  2020-10-13  5:15 [PATCH 0/3] Add QPIC NAND support for IPQ6018 Kathiravan T
  2020-10-13  5:15 ` [PATCH 1/3] dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation Kathiravan T
  2020-10-13  5:15 ` [PATCH 2/3] mtd: rawnand: qcom: Support for IPQ6018 QPIC NAND controller Kathiravan T
@ 2020-10-13  5:15 ` Kathiravan T
  2 siblings, 0 replies; 7+ messages in thread
From: Kathiravan T @ 2020-10-13  5:15 UTC (permalink / raw)
  To: agross, miquel.raynal, richard, vigneshr, robh+dt, sivaprak,
	peter.ujfalusi, boris.brezillon, linux-arm-msm, linux-mtd,
	devicetree, linux-kernel
  Cc: kathirav, Anusha Canchi Ramachandra Rao

Add the QPIC BAM and QPIC NAND controller support and
enable the same in board DTS file.

Co-developed-by: Anusha Canchi Ramachandra Rao <anusharao@codeaurora.org>
Signed-off-by: Anusha Canchi Ramachandra Rao <anusharao@codeaurora.org>
Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 16 ++++++++
 arch/arm64/boot/dts/qcom/ipq6018.dtsi        | 41 ++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
index b31117a93995..6e68de1a0b0a 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
+++ b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
@@ -62,3 +62,19 @@ spi_0_pins: spi-0-pins {
 		bias-pull-down;
 	};
 };
+
+&qpic_bam {
+	status = "ok";
+};
+
+&qpic_nand {
+	status = "ok";
+
+	nand@0 {
+		reg = <0>;
+
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+		nand-bus-width = <8>;
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
index 1aa8d8579463..6b13e390ee29 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -173,6 +173,17 @@ serial_3_pins: serial3-pinmux {
 				drive-strength = <8>;
 				bias-pull-down;
 			};
+
+			qpic_pins: qpic-pins {
+				pins = "gpio1", "gpio3", "gpio4",
+					"gpio5", "gpio6", "gpio7",
+					"gpio8", "gpio10", "gpio11",
+					"gpio12", "gpio13", "gpio14",
+					"gpio15", "gpio17";
+				function = "qpic_pad";
+				drive-strength = <8>;
+				bias-disable;
+			};
 		};
 
 		gcc: gcc@1800000 {
@@ -274,6 +285,36 @@ i2c_1: i2c@78b7000 { /* BLSP1 QUP2 */
 			status = "disabled";
 		};
 
+		qpic_bam: dma@7984000 {
+			compatible = "qcom,bam-v1.7.0";
+			reg = <0x07984000 0x1a000>;
+			interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc GCC_QPIC_CLK>,
+				 <&gcc GCC_QPIC_AHB_CLK>;
+			clock-names = "iface_clk", "bam_clk";
+			#dma-cells = <1>;
+			qcom,ee = <0>;
+			status = "disabled";
+		};
+
+		qpic_nand: nand@79b0000 {
+			compatible = "qcom,ipq6018-nand";
+			reg = <0x079b0000 0x10000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			clocks = <&gcc GCC_QPIC_CLK>,
+				 <&gcc GCC_QPIC_AHB_CLK>;
+			clock-names = "core", "aon";
+
+			dmas = <&qpic_bam 0>,
+				<&qpic_bam 1>,
+				<&qpic_bam 2>;
+			dma-names = "tx", "rx", "cmd";
+			pinctrl-0 = <&qpic_pins>;
+			pinctrl-names = "default";
+			status = "disabled";
+		};
+
 		intc: interrupt-controller@b000000 {
 			compatible = "qcom,msm-qgic2";
 			interrupt-controller;
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 1/3] dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation
  2020-10-13  5:15 ` [PATCH 1/3] dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation Kathiravan T
@ 2020-10-13 17:23   ` Rob Herring
  2020-10-30 17:27   ` Miquel Raynal
  1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-10-13 17:23 UTC (permalink / raw)
  To: Kathiravan T
  Cc: devicetree, vigneshr, linux-arm-msm, sivaprak, linux-kernel,
	robh+dt, peter.ujfalusi, richard, agross, linux-mtd,
	miquel.raynal, boris.brezillon

On Tue, 13 Oct 2020 10:45:22 +0530, Kathiravan T wrote:
> Add the binding for the QPIC NAND used on IPQ6018 SoC.
> 
> Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
> ---
>  Documentation/devicetree/bindings/mtd/qcom_nandc.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 2/3] mtd: rawnand: qcom: Support for IPQ6018 QPIC NAND controller
  2020-10-13  5:15 ` [PATCH 2/3] mtd: rawnand: qcom: Support for IPQ6018 QPIC NAND controller Kathiravan T
@ 2020-10-30 17:27   ` Miquel Raynal
  0 siblings, 0 replies; 7+ messages in thread
From: Miquel Raynal @ 2020-10-30 17:27 UTC (permalink / raw)
  To: Kathiravan T, agross, miquel.raynal, richard, vigneshr, robh+dt,
	sivaprak, peter.ujfalusi, boris.brezillon, linux-arm-msm,
	linux-mtd, devicetree, linux-kernel

On Tue, 2020-10-13 at 05:15:23 UTC, Kathiravan T wrote:
> Add the compatible string for IPQ6018 QPIC NAND controller
> version 1.5.0. It's properties are same as IPQ8074, so reuse
> the same.
> 
> Signed-off-by: Kathiravan T <kathirav@codeaurora.org>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 1/3] dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation
  2020-10-13  5:15 ` [PATCH 1/3] dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation Kathiravan T
  2020-10-13 17:23   ` Rob Herring
@ 2020-10-30 17:27   ` Miquel Raynal
  1 sibling, 0 replies; 7+ messages in thread
From: Miquel Raynal @ 2020-10-30 17:27 UTC (permalink / raw)
  To: Kathiravan T, agross, miquel.raynal, richard, vigneshr, robh+dt,
	sivaprak, peter.ujfalusi, boris.brezillon, linux-arm-msm,
	linux-mtd, devicetree, linux-kernel

On Tue, 2020-10-13 at 05:15:22 UTC, Kathiravan T wrote:
> Add the binding for the QPIC NAND used on IPQ6018 SoC.
> 
> Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
> Acked-by: Rob Herring <robh@kernel.org>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13  5:15 [PATCH 0/3] Add QPIC NAND support for IPQ6018 Kathiravan T
2020-10-13  5:15 ` [PATCH 1/3] dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation Kathiravan T
2020-10-13 17:23   ` Rob Herring
2020-10-30 17:27   ` Miquel Raynal
2020-10-13  5:15 ` [PATCH 2/3] mtd: rawnand: qcom: Support for IPQ6018 QPIC NAND controller Kathiravan T
2020-10-30 17:27   ` Miquel Raynal
2020-10-13  5:15 ` [PATCH 3/3] arm64: dts: ipq6018: Add the QPIC peripheral nodes Kathiravan T

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org
	public-inbox-index linux-mtd

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git