devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Add SPI nand support in IPQ9574
@ 2025-02-24 11:37 Md Sadre Alam
  2025-02-24 11:37 ` [PATCH v1 1/3] arm64: dts: qcom: ipq9574: Add SPI nand support Md Sadre Alam
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Md Sadre Alam @ 2025-02-24 11:37 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree, linux-kernel

* This was a part of 'Add QPIC SPI NAND driver' - [1]. Have split it out
  into a separate series based on the community feedback [2].
* Additionally, address comments. Please see individual patches for
  details
* The 'dt' and 'dtsi' portions of 'arm64: dts: qcom: ipq9574: Add SPI
  nand support' are split and posted as separate patches in this series. 

1 - https://lore.kernel.org/linux-arm-msm/20241120091507.1404368-1-quic_mdalam@quicinc.com/
2 - https://lore.kernel.org/linux-arm-msm/4c1fe789-5190-465d-bb41-3fe1534d2523@oss.qualcomm.com/

Md Sadre Alam (3):
  arm64: dts: qcom: ipq9574: Add SPI nand support
  arm64: dts: qcom: ipq9574: Enable SPI NAND for ipq9574
  arm64: dts: qcom: ipq9574: Remove eMMC node

 .../boot/dts/qcom/ipq9574-rdp-common.dtsi     | 43 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts   | 12 ------
 arch/arm64/boot/dts/qcom/ipq9574.dtsi         | 28 ++++++++++++
 3 files changed, 71 insertions(+), 12 deletions(-)


base-commit: d4b0fd87ff0d4338b259dc79b2b3c6f7e70e8afa
prerequisite-patch-id: 4acad06926841baacc627f32d457f3a6c9e9de1d
prerequisite-patch-id: bc3b78dc0486b0effcc2e595dd55c316700095b7
-- 
2.34.1


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

* [PATCH v1 1/3] arm64: dts: qcom: ipq9574: Add SPI nand support
  2025-02-24 11:37 [PATCH v1 0/3] Add SPI nand support in IPQ9574 Md Sadre Alam
@ 2025-02-24 11:37 ` Md Sadre Alam
  2025-02-24 20:36   ` Konrad Dybcio
  2025-02-24 11:37 ` [PATCH v1 2/3] arm64: dts: qcom: ipq9574: Enable SPI NAND for ipq9574 Md Sadre Alam
  2025-02-24 11:37 ` [PATCH v1 3/3] arm64: dts: qcom: ipq9574: Remove eMMC node Md Sadre Alam
  2 siblings, 1 reply; 8+ messages in thread
From: Md Sadre Alam @ 2025-02-24 11:37 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree, linux-kernel

Add SPI NAND support for ipq9574 SoC.

Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
* Moved changes in ipq9574-rdp-common.dtsi to separate patch

* Prefixed zero for reg address in qpic_bam and qpic_nand

* For full change history, please refer to https://lore.kernel.org/linux-arm-msm/20241120091507.1404368-8-quic_mdalam@quicinc.com/
---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 28 +++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 942290028972..acbcf507adef 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -447,6 +447,34 @@ tcsr: syscon@1937000 {
 			reg = <0x01937000 0x21000>;
 		};
 
+		qpic_bam: dma-controller@7984000 {
+			compatible = "qcom,bam-v1.7.0";
+			reg = <0x07984000 0x1c000>;
+			interrupts = <GIC_SPI 146 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,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";
+		};
+
+
 		sdhc_1: mmc@7804000 {
 			compatible = "qcom,ipq9574-sdhci", "qcom,sdhci-msm-v5";
 			reg = <0x07804000 0x1000>,
-- 
2.34.1


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

* [PATCH v1 2/3] arm64: dts: qcom: ipq9574: Enable SPI NAND for ipq9574
  2025-02-24 11:37 [PATCH v1 0/3] Add SPI nand support in IPQ9574 Md Sadre Alam
  2025-02-24 11:37 ` [PATCH v1 1/3] arm64: dts: qcom: ipq9574: Add SPI nand support Md Sadre Alam
@ 2025-02-24 11:37 ` Md Sadre Alam
  2025-02-24 20:36   ` Konrad Dybcio
  2025-02-24 11:37 ` [PATCH v1 3/3] arm64: dts: qcom: ipq9574: Remove eMMC node Md Sadre Alam
  2 siblings, 1 reply; 8+ messages in thread
From: Md Sadre Alam @ 2025-02-24 11:37 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree, linux-kernel

Enable SPI NAND support for ipq9574 SoC.

Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
* Moved out ipq9574-rdp-common.dtsi changes into this patch from
  previous patch
---
 .../boot/dts/qcom/ipq9574-rdp-common.dtsi     | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
index ae12f069f26f..6d1e84301671 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
@@ -139,6 +139,49 @@ gpio_leds_default: gpio-leds-default-state {
 		drive-strength = <8>;
 		bias-pull-up;
 	};
+
+	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";
+			drive-strength = <8>;
+			bias-disable;
+		};
+
+		data-pins {
+			pins = "gpio0", "gpio1", "gpio2", "gpio3";
+			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>;
+	};
 };
 
 &usb_0_dwc3 {
-- 
2.34.1


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

* [PATCH v1 3/3] arm64: dts: qcom: ipq9574: Remove eMMC node
  2025-02-24 11:37 [PATCH v1 0/3] Add SPI nand support in IPQ9574 Md Sadre Alam
  2025-02-24 11:37 ` [PATCH v1 1/3] arm64: dts: qcom: ipq9574: Add SPI nand support Md Sadre Alam
  2025-02-24 11:37 ` [PATCH v1 2/3] arm64: dts: qcom: ipq9574: Enable SPI NAND for ipq9574 Md Sadre Alam
@ 2025-02-24 11:37 ` Md Sadre Alam
  2 siblings, 0 replies; 8+ messages in thread
From: Md Sadre Alam @ 2025-02-24 11:37 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree, linux-kernel

Remove eMMC node for rdp433, since rdp433
default boot mode is norplusnand

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
* Added 'Reviewed-by: Konrad Dybcio'
* For full change log see - https://lore.kernel.org/linux-arm-msm/20241120091507.1404368-9-quic_mdalam@quicinc.com/
---
 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts b/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts
index 165ebbb59511..fa7bb521e786 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts
+++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts
@@ -55,18 +55,6 @@ &pcie3 {
 	status = "okay";
 };
 
-&sdhc_1 {
-	pinctrl-0 = <&sdc_default_state>;
-	pinctrl-names = "default";
-	mmc-ddr-1_8v;
-	mmc-hs200-1_8v;
-	mmc-hs400-1_8v;
-	mmc-hs400-enhanced-strobe;
-	max-frequency = <384000000>;
-	bus-width = <8>;
-	status = "okay";
-};
-
 &tlmm {
 
 	pcie1_default: pcie1-default-state {
-- 
2.34.1


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

* Re: [PATCH v1 1/3] arm64: dts: qcom: ipq9574: Add SPI nand support
  2025-02-24 11:37 ` [PATCH v1 1/3] arm64: dts: qcom: ipq9574: Add SPI nand support Md Sadre Alam
@ 2025-02-24 20:36   ` Konrad Dybcio
  2025-02-28 11:12     ` Md Sadre Alam
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2025-02-24 20:36 UTC (permalink / raw)
  To: Md Sadre Alam, andersson, konradybcio, robh, krzk+dt, conor+dt,
	linux-arm-msm, devicetree, linux-kernel

On 24.02.2025 12:37 PM, Md Sadre Alam wrote:
> Add SPI NAND support for ipq9574 SoC.
> 
> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
> ---
> * Moved changes in ipq9574-rdp-common.dtsi to separate patch
> 
> * Prefixed zero for reg address in qpic_bam and qpic_nand
> 
> * For full change history, please refer to https://lore.kernel.org/linux-arm-msm/20241120091507.1404368-8-quic_mdalam@quicinc.com/
> ---
>  arch/arm64/boot/dts/qcom/ipq9574.dtsi | 28 +++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> index 942290028972..acbcf507adef 100644
> --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> @@ -447,6 +447,34 @@ tcsr: syscon@1937000 {
>  			reg = <0x01937000 0x21000>;
>  		};
>  
> +		qpic_bam: dma-controller@7984000 {
> +			compatible = "qcom,bam-v1.7.0";

v1.7.4

> +			reg = <0x07984000 0x1c000>;
> +			interrupts = <GIC_SPI 146 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,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";

Please make clock-names & dma-names a vertical list, like clocks and dmas
and shift the nodes so that they're sorted by address

Konrad

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

* Re: [PATCH v1 2/3] arm64: dts: qcom: ipq9574: Enable SPI NAND for ipq9574
  2025-02-24 11:37 ` [PATCH v1 2/3] arm64: dts: qcom: ipq9574: Enable SPI NAND for ipq9574 Md Sadre Alam
@ 2025-02-24 20:36   ` Konrad Dybcio
  2025-02-28 11:13     ` Md Sadre Alam
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2025-02-24 20:36 UTC (permalink / raw)
  To: Md Sadre Alam, andersson, konradybcio, robh, krzk+dt, conor+dt,
	linux-arm-msm, devicetree, linux-kernel

On 24.02.2025 12:37 PM, Md Sadre Alam wrote:
> Enable SPI NAND support for ipq9574 SoC.
> 
> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
> ---
> * Moved out ipq9574-rdp-common.dtsi changes into this patch from
>   previous patch
> ---
>  .../boot/dts/qcom/ipq9574-rdp-common.dtsi     | 43 +++++++++++++++++++
>  1 file changed, 43 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
> index ae12f069f26f..6d1e84301671 100644
> --- a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
> @@ -139,6 +139,49 @@ gpio_leds_default: gpio-leds-default-state {
>  		drive-strength = <8>;
>  		bias-pull-up;
>  	};
> +
> +	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";
> +			drive-strength = <8>;
> +			bias-disable;
> +		};
> +
> +		data-pins {
> +			pins = "gpio0", "gpio1", "gpio2", "gpio3";
> +			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";

Please add a newline before status

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v1 1/3] arm64: dts: qcom: ipq9574: Add SPI nand support
  2025-02-24 20:36   ` Konrad Dybcio
@ 2025-02-28 11:12     ` Md Sadre Alam
  0 siblings, 0 replies; 8+ messages in thread
From: Md Sadre Alam @ 2025-02-28 11:12 UTC (permalink / raw)
  To: Konrad Dybcio, andersson, konradybcio, robh, krzk+dt, conor+dt,
	linux-arm-msm, devicetree, linux-kernel



On 2/25/2025 2:06 AM, Konrad Dybcio wrote:
> On 24.02.2025 12:37 PM, Md Sadre Alam wrote:
>> Add SPI NAND support for ipq9574 SoC.
>>
>> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
>> ---
>> * Moved changes in ipq9574-rdp-common.dtsi to separate patch
>>
>> * Prefixed zero for reg address in qpic_bam and qpic_nand
>>
>> * For full change history, please refer to https://lore.kernel.org/linux-arm-msm/20241120091507.1404368-8-quic_mdalam@quicinc.com/
>> ---
>>   arch/arm64/boot/dts/qcom/ipq9574.dtsi | 28 +++++++++++++++++++++++++++
>>   1 file changed, 28 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
>> index 942290028972..acbcf507adef 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
>> @@ -447,6 +447,34 @@ tcsr: syscon@1937000 {
>>   			reg = <0x01937000 0x21000>;
>>   		};
>>   
>> +		qpic_bam: dma-controller@7984000 {
>> +			compatible = "qcom,bam-v1.7.0";
> 
> v1.7.4
Ok
> 
>> +			reg = <0x07984000 0x1c000>;
>> +			interrupts = <GIC_SPI 146 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,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";
> 
> Please make clock-names & dma-names a vertical list, like clocks and dmas
> and shift the nodes so that they're sorted by address
Ok, will fix and post in next revision.
> 
> Konrad

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

* Re: [PATCH v1 2/3] arm64: dts: qcom: ipq9574: Enable SPI NAND for ipq9574
  2025-02-24 20:36   ` Konrad Dybcio
@ 2025-02-28 11:13     ` Md Sadre Alam
  0 siblings, 0 replies; 8+ messages in thread
From: Md Sadre Alam @ 2025-02-28 11:13 UTC (permalink / raw)
  To: Konrad Dybcio, andersson, konradybcio, robh, krzk+dt, conor+dt,
	linux-arm-msm, devicetree, linux-kernel



On 2/25/2025 2:06 AM, Konrad Dybcio wrote:
> On 24.02.2025 12:37 PM, Md Sadre Alam wrote:
>> Enable SPI NAND support for ipq9574 SoC.
>>
>> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
>> ---
>> * Moved out ipq9574-rdp-common.dtsi changes into this patch from
>>    previous patch
>> ---
>>   .../boot/dts/qcom/ipq9574-rdp-common.dtsi     | 43 +++++++++++++++++++
>>   1 file changed, 43 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
>> index ae12f069f26f..6d1e84301671 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
>> @@ -139,6 +139,49 @@ gpio_leds_default: gpio-leds-default-state {
>>   		drive-strength = <8>;
>>   		bias-pull-up;
>>   	};
>> +
>> +	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";
>> +			drive-strength = <8>;
>> +			bias-disable;
>> +		};
>> +
>> +		data-pins {
>> +			pins = "gpio0", "gpio1", "gpio2", "gpio3";
>> +			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";
> 
> Please add a newline before status
Ok, will do in next revision.
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Konrad

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

end of thread, other threads:[~2025-02-28 11:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 11:37 [PATCH v1 0/3] Add SPI nand support in IPQ9574 Md Sadre Alam
2025-02-24 11:37 ` [PATCH v1 1/3] arm64: dts: qcom: ipq9574: Add SPI nand support Md Sadre Alam
2025-02-24 20:36   ` Konrad Dybcio
2025-02-28 11:12     ` Md Sadre Alam
2025-02-24 11:37 ` [PATCH v1 2/3] arm64: dts: qcom: ipq9574: Enable SPI NAND for ipq9574 Md Sadre Alam
2025-02-24 20:36   ` Konrad Dybcio
2025-02-28 11:13     ` Md Sadre Alam
2025-02-24 11:37 ` [PATCH v1 3/3] arm64: dts: qcom: ipq9574: Remove eMMC node 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;
as well as URLs for NNTP newsgroup(s).