All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10
@ 2018-05-11 16:10 ` thor.thayer at linux.intel.com
  0 siblings, 0 replies; 6+ messages in thread
From: thor.thayer @ 2018-05-11 16:10 UTC (permalink / raw)
  To: dinguyen, robh+dt, mark.rutland
  Cc: catalin.marinas, will.deacon, devicetree, linux-arm-kernel,
	linux-kernel, Thor Thayer

From: Thor Thayer <thor.thayer@linux.intel.com>

Add qspi_clock
   The qspi_clk frequency is updated by U-Boot before starting Linux.
Add QSPI interface node.
Add QSPI flash memory child node.
   Setup the QSPI memory in 2 partitions.

Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
---
v2  s/_/-/ in qspi-clk
    rename flash node.
    use partition child node notation
---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 22 ++++++++++++++
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    | 35 ++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
index e6b059378dc0..bac01b0b7907 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
@@ -119,6 +119,12 @@
 				#clock-cells = <0>;
 				compatible = "fixed-clock";
 			};
+
+			qspi_clk: qspi-clk {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+				clock-frequency = <200000000>;
+			};
 		};
 
 		gmac0: ethernet@ff800000 {
@@ -466,5 +472,21 @@
 				interrupts = <16 4>, <48 4>;
 			};
 		};
+
+		qspi: spi@ff8d2000 {
+			compatible = "cdns,qspi-nor";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0xff8d2000 0x100>,
+			      <0xff900000 0x100000>;
+			interrupts = <0 3 4>;
+			cdns,fifo-depth = <128>;
+			cdns,fifo-width = <4>;
+			cdns,trigger-address = <0x00000000>;
+			clocks = <&qspi_clk>;
+			bus-num = <1>;
+
+			status = "disabled";
+		};
 	};
 };
diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
index f9b1ef12db48..96542150654b 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
@@ -147,3 +147,38 @@
 		reg = <0x68>;
 	};
 };
+
+&qspi {
+	flash@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "n25q00aa";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+
+		m25p,fast-read;
+		cdns,page-size = <256>;
+		cdns,block-size = <16>;
+		cdns,read-delay = <1>;
+		cdns,tshsl-ns = <50>;
+		cdns,tsd2d-ns = <50>;
+		cdns,tchsh-ns = <4>;
+		cdns,tslch-ns = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			qspi_boot: partition@0 {
+				label = "Boot and fpga data";
+				reg = <0x0 0x4000000>;
+			};
+
+			qspi_rootfs: partition@4000000 {
+				label = "Root Filesystem - JFFS2";
+				reg = <0x4000000 0x4000000>;
+			};
+		};
+	};
+};
-- 
2.7.4

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

* [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10
@ 2018-05-11 16:10 ` thor.thayer at linux.intel.com
  0 siblings, 0 replies; 6+ messages in thread
From: thor.thayer at linux.intel.com @ 2018-05-11 16:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Thor Thayer <thor.thayer@linux.intel.com>

Add qspi_clock
   The qspi_clk frequency is updated by U-Boot before starting Linux.
Add QSPI interface node.
Add QSPI flash memory child node.
   Setup the QSPI memory in 2 partitions.

Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
---
v2  s/_/-/ in qspi-clk
    rename flash node.
    use partition child node notation
---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 22 ++++++++++++++
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    | 35 ++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
index e6b059378dc0..bac01b0b7907 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
@@ -119,6 +119,12 @@
 				#clock-cells = <0>;
 				compatible = "fixed-clock";
 			};
+
+			qspi_clk: qspi-clk {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+				clock-frequency = <200000000>;
+			};
 		};
 
 		gmac0: ethernet at ff800000 {
@@ -466,5 +472,21 @@
 				interrupts = <16 4>, <48 4>;
 			};
 		};
+
+		qspi: spi at ff8d2000 {
+			compatible = "cdns,qspi-nor";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0xff8d2000 0x100>,
+			      <0xff900000 0x100000>;
+			interrupts = <0 3 4>;
+			cdns,fifo-depth = <128>;
+			cdns,fifo-width = <4>;
+			cdns,trigger-address = <0x00000000>;
+			clocks = <&qspi_clk>;
+			bus-num = <1>;
+
+			status = "disabled";
+		};
 	};
 };
diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
index f9b1ef12db48..96542150654b 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
@@ -147,3 +147,38 @@
 		reg = <0x68>;
 	};
 };
+
+&qspi {
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "n25q00aa";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+
+		m25p,fast-read;
+		cdns,page-size = <256>;
+		cdns,block-size = <16>;
+		cdns,read-delay = <1>;
+		cdns,tshsl-ns = <50>;
+		cdns,tsd2d-ns = <50>;
+		cdns,tchsh-ns = <4>;
+		cdns,tslch-ns = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			qspi_boot: partition at 0 {
+				label = "Boot and fpga data";
+				reg = <0x0 0x4000000>;
+			};
+
+			qspi_rootfs: partition at 4000000 {
+				label = "Root Filesystem - JFFS2";
+				reg = <0x4000000 0x4000000>;
+			};
+		};
+	};
+};
-- 
2.7.4

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

* Re: [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10
  2018-05-11 16:10 ` thor.thayer at linux.intel.com
@ 2018-05-15 15:11   ` Dinh Nguyen
  -1 siblings, 0 replies; 6+ messages in thread
From: Dinh Nguyen @ 2018-05-15 15:11 UTC (permalink / raw)
  To: thor.thayer, robh+dt, mark.rutland
  Cc: catalin.marinas, will.deacon, devicetree, linux-arm-kernel, linux-kernel



On 05/11/2018 11:10 AM, thor.thayer@linux.intel.com wrote:
> From: Thor Thayer <thor.thayer@linux.intel.com>
> 
> Add qspi_clock
>    The qspi_clk frequency is updated by U-Boot before starting Linux.
> Add QSPI interface node.
> Add QSPI flash memory child node.
>    Setup the QSPI memory in 2 partitions.
> 
> Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
> ---
> v2  s/_/-/ in qspi-clk
>     rename flash node.
>     use partition child node notation
> ---
>  arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 22 ++++++++++++++
>  .../boot/dts/altera/socfpga_stratix10_socdk.dts    | 35 ++++++++++++++++++++++
>  2 files changed, 57 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> index e6b059378dc0..bac01b0b7907 100644
> --- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> @@ -119,6 +119,12 @@
>  				#clock-cells = <0>;
>  				compatible = "fixed-clock";
>  			};
> +
> +			qspi_clk: qspi-clk {
> +				#clock-cells = <0>;
> +				compatible = "fixed-clock";
> +				clock-frequency = <200000000>;
> +			};
>  		};
>  
>  		gmac0: ethernet@ff800000 {
> @@ -466,5 +472,21 @@
>  				interrupts = <16 4>, <48 4>;
>  			};
>  		};
> +
> +		qspi: spi@ff8d2000 {
> +			compatible = "cdns,qspi-nor";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0xff8d2000 0x100>,
> +			      <0xff900000 0x100000>;
> +			interrupts = <0 3 4>;
> +			cdns,fifo-depth = <128>;
> +			cdns,fifo-width = <4>;
> +			cdns,trigger-address = <0x00000000>;
> +			clocks = <&qspi_clk>;
> +			bus-num = <1>;

I don't you need "bus-num" anymore right? I don't see it getting used
anywhere in the driver.

Dinh

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

* [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10
@ 2018-05-15 15:11   ` Dinh Nguyen
  0 siblings, 0 replies; 6+ messages in thread
From: Dinh Nguyen @ 2018-05-15 15:11 UTC (permalink / raw)
  To: linux-arm-kernel



On 05/11/2018 11:10 AM, thor.thayer at linux.intel.com wrote:
> From: Thor Thayer <thor.thayer@linux.intel.com>
> 
> Add qspi_clock
>    The qspi_clk frequency is updated by U-Boot before starting Linux.
> Add QSPI interface node.
> Add QSPI flash memory child node.
>    Setup the QSPI memory in 2 partitions.
> 
> Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
> ---
> v2  s/_/-/ in qspi-clk
>     rename flash node.
>     use partition child node notation
> ---
>  arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 22 ++++++++++++++
>  .../boot/dts/altera/socfpga_stratix10_socdk.dts    | 35 ++++++++++++++++++++++
>  2 files changed, 57 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> index e6b059378dc0..bac01b0b7907 100644
> --- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> @@ -119,6 +119,12 @@
>  				#clock-cells = <0>;
>  				compatible = "fixed-clock";
>  			};
> +
> +			qspi_clk: qspi-clk {
> +				#clock-cells = <0>;
> +				compatible = "fixed-clock";
> +				clock-frequency = <200000000>;
> +			};
>  		};
>  
>  		gmac0: ethernet at ff800000 {
> @@ -466,5 +472,21 @@
>  				interrupts = <16 4>, <48 4>;
>  			};
>  		};
> +
> +		qspi: spi at ff8d2000 {
> +			compatible = "cdns,qspi-nor";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0xff8d2000 0x100>,
> +			      <0xff900000 0x100000>;
> +			interrupts = <0 3 4>;
> +			cdns,fifo-depth = <128>;
> +			cdns,fifo-width = <4>;
> +			cdns,trigger-address = <0x00000000>;
> +			clocks = <&qspi_clk>;
> +			bus-num = <1>;

I don't you need "bus-num" anymore right? I don't see it getting used
anywhere in the driver.

Dinh

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

* Re: [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10
  2018-05-15 15:11   ` Dinh Nguyen
@ 2018-05-15 20:10     ` Thor Thayer
  -1 siblings, 0 replies; 6+ messages in thread
From: Thor Thayer @ 2018-05-15 20:10 UTC (permalink / raw)
  To: Dinh Nguyen, robh+dt, mark.rutland
  Cc: catalin.marinas, will.deacon, devicetree, linux-arm-kernel, linux-kernel

On 05/15/2018 10:11 AM, Dinh Nguyen wrote:
> 
> On 05/11/2018 11:10 AM, thor.thayer@linux.intel.com wrote:
>> From: Thor Thayer <thor.thayer@linux.intel.com>
>>
>> Add qspi_clock
>>     The qspi_clk frequency is updated by U-Boot before starting Linux.
>> Add QSPI interface node.
>> Add QSPI flash memory child node.
>>     Setup the QSPI memory in 2 partitions.
>>
>> Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
>> ---
>> v2  s/_/-/ in qspi-clk
>>      rename flash node.
>>      use partition child node notation<snip>>> +		qspi: spi@ff8d2000 {
>> +			compatible = "cdns,qspi-nor";
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			reg = <0xff8d2000 0x100>,
>> +			      <0xff900000 0x100000>;
>> +			interrupts = <0 3 4>;
>> +			cdns,fifo-depth = <128>;
>> +			cdns,fifo-width = <4>;
>> +			cdns,trigger-address = <0x00000000>;
>> +			clocks = <&qspi_clk>;
>> +			bus-num = <1>;
> 
> I don't you need "bus-num" anymore right? I don't see it getting used
> anywhere in the driver.
> 
> Dinh
> 

Yes, I missed that holdover. Thanks, I'll correct that.

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

* [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10
@ 2018-05-15 20:10     ` Thor Thayer
  0 siblings, 0 replies; 6+ messages in thread
From: Thor Thayer @ 2018-05-15 20:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/15/2018 10:11 AM, Dinh Nguyen wrote:
> 
> On 05/11/2018 11:10 AM, thor.thayer at linux.intel.com wrote:
>> From: Thor Thayer <thor.thayer@linux.intel.com>
>>
>> Add qspi_clock
>>     The qspi_clk frequency is updated by U-Boot before starting Linux.
>> Add QSPI interface node.
>> Add QSPI flash memory child node.
>>     Setup the QSPI memory in 2 partitions.
>>
>> Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
>> ---
>> v2  s/_/-/ in qspi-clk
>>      rename flash node.
>>      use partition child node notation<snip>>> +		qspi: spi at ff8d2000 {
>> +			compatible = "cdns,qspi-nor";
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			reg = <0xff8d2000 0x100>,
>> +			      <0xff900000 0x100000>;
>> +			interrupts = <0 3 4>;
>> +			cdns,fifo-depth = <128>;
>> +			cdns,fifo-width = <4>;
>> +			cdns,trigger-address = <0x00000000>;
>> +			clocks = <&qspi_clk>;
>> +			bus-num = <1>;
> 
> I don't you need "bus-num" anymore right? I don't see it getting used
> anywhere in the driver.
> 
> Dinh
> 

Yes, I missed that holdover. Thanks, I'll correct that.

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

end of thread, other threads:[~2018-05-15 20:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11 16:10 [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10 thor.thayer
2018-05-11 16:10 ` thor.thayer at linux.intel.com
2018-05-15 15:11 ` Dinh Nguyen
2018-05-15 15:11   ` Dinh Nguyen
2018-05-15 20:10   ` Thor Thayer
2018-05-15 20:10     ` Thor Thayer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.