Skip to contentSkip to conversation

arm64: dts: stratix10: Add QSPI support for Stratix10

PATCH Applied [email protected] 2 participants 2 messages May 15, 2018 – May 16, 2018

Subsystems (2)

v3 of 4 Applied Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 arm64: dts: stratix10: Add QSPI support for Stratix10

From: Thor Thayer <[email protected]>

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.

---
v2 s/_/-/ in qspi-clk
rename flash node.
use partition child node notation
v3 remove unused bus-num node
use device id from table (n25q00a)

---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 21 +++++++++++++
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    | 35 ++++++++++++++++++++++
 2 files changed, 56 insertions(+)
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +21 -0
index e6b059378dc0..d8c94d5ff4b4 100644
@@ -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,20 @@
 				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>;
+
+			status = "disabled";
+		};
 	};
 };
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts +35 -0
index f9b1ef12db48..6edc4fa9fd42 100644
@@ -147,3 +147,38 @@
 		reg = <0x68>;
 	};
 };
+
+&qspi {
+	flash@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "n25q00a";
+		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>;
+			};
+		};
+	};
+};
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 15 lines · thor.thayer at linux.intel.com

From: Thor Thayer <[email protected]>

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.

---
v2 s/_/-/ in qspi-clk
rename flash node.
use partition child node notation
v3 remove unused bus-num node
use device id from table (n25q00a)

Quoted 5 lines
---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 21 +++++++++++++
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    | 35 ++++++++++++++++++++++
 2 files changed, 56 insertions(+)

Applied!

Thanks,
Dinh