Skip to contentSkip to conversation

ARM: dts: socfpga: Add QSPI node for the Arria10

PATCH New dinguyen at opensource.altera.com 3 participants 8 messages Oct 19, 2016 – Oct 26, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ARM: dts: socfpga: Add QSPI node for the Arria10

From: Dinh Nguyen <[email protected]>

Add the QSPI device node for Arria10 SOC.

---
 arch/arm/boot/dts/socfpga_arria10.dtsi |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/socfpga_arria10.dtsi +14 -0
index 1149216..551c636 100644
@@ -675,6 +675,20 @@
 			};
 		};
 
+		qspi: spi at ff809000 {
+			compatible = "cdns,qspi-nor";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0xff809000 0x100>,
+			      <0xffa00000 0x100000>;
+			interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
+			cdns,fifo-depth = <128>;
+			cdns,fifo-width = <4>;
+			cdns,trigger-address = <0x00000000>;
+			clocks = <&qspi_clk>;
+			status = "disabled";
+		};
+
 		rst: rstmgr at ffd05000 {
 			#reset-cells = <1>;
 			compatible = "altr,rst-mgr";
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/3 ARM: dts: socfpga: Enable QSPI in Arria10 devkit

From: Dinh Nguyen <[email protected]>

Enable the QSPI node and add the flash chip.

---
 arch/arm/boot/dts/Makefile                       |    1 +
 arch/arm/boot/dts/socfpga_arria10_socdk_qspi.dts |   49 ++++++++++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 arch/arm/boot/dts/socfpga_arria10_socdk_qspi.dts
arch/arm/boot/dts/Makefile +1 -0
index 7c5f0c3..081fd94 100644
@@ -690,6 +690,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
 	sh73a0-kzm9g.dtb
 dtb-$(CONFIG_ARCH_SOCFPGA) += \
 	socfpga_arria5_socdk.dtb \
+	socfpga_arria10_socdk_qspi.dtb \
 	socfpga_arria10_socdk_sdmmc.dtb \
 	socfpga_cyclone5_mcvevk.dtb \
 	socfpga_cyclone5_socdk.dtb \
arch/arm/boot/dts/socfpga_arria10_socdk_qspi.dts new file +49 -0

49 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 3/3 ARM: dts: socfpga: Enable QSPI on the Cyclone5 sockit

In reply to dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Enable the QSPI node and add the flash chip.

---
 arch/arm/boot/dts/socfpga_cyclone5_sockit.dts |   33 +++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +33 -0
index 02e22f5..2f75e0f 100644
@@ -175,6 +175,39 @@
 	status = "okay";
 };
 
+&qspi {
+	status = "okay";
+
+	flash: flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "n25q256a";
+		reg = <0>;
+		spi-max-frequency = <100000000>;
+
+		m25p,fast-read;
+		cdns,page-size = <256>;
+		cdns,block-size = <16>;
+		cdns,read-delay = <4>;
+		cdns,tshsl-ns = <50>;
+		cdns,tsd2d-ns = <50>;
+		cdns,tchsh-ns = <4>;
+		cdns,tslch-ns = <4>;
+
+		partition at qspi-boot {
+			/* 8MB for raw data. */
+			label = "Flash 0 Raw Data";
+			reg = <0x0 0x800000>;
+		};
+
+		partition at qspi-rootfs {
+			/* 120MB for jffs2 data. */
+			label = "Flash 0 jffs2 Filesystem";
+			reg = <0x800000 0x7800000>;
+		};
+	};
+};
+
 &usb1 {
 	status = "okay";
 };
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/3 ARM: dts: socfpga: Enable QSPI on the Cyclone5 sockit

Hi!

Quoted 40 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Enable the QSPI node and add the flash chip.

---
 arch/arm/boot/dts/socfpga_cyclone5_sockit.dts |   33 +++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +23 -0
index 02e22f5..2f75e0f 100644
@@ -175,6 +175,39 @@
 	status = "okay";
 };
 
+&qspi {
+	status = "okay";
+
+	flash: flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "n25q256a";
+		reg = <0>;
+		spi-max-frequency = <100000000>;
+
+		m25p,fast-read;
+		cdns,page-size = <256>;
+		cdns,block-size = <16>;
+		cdns,read-delay = <4>;
+		cdns,tshsl-ns = <50>;
+		cdns,tsd2d-ns = <50>;
+		cdns,tchsh-ns = <4>;
+		cdns,tslch-ns = <4>;
+
+		partition at qspi-boot {
+			/* 8MB for raw data. */
+			label = "Flash 0 Raw Data";
+			reg = <0x0 0x800000>;

arch/arm/boot/dts/socfpga_cyclone5_sockit.dts line 210

Quoted 10 lines
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +10 -0
+		};
+
+		partition at qspi-rootfs {
+			/* 120MB for jffs2 data. */
+			label = "Flash 0 jffs2 Filesystem";
+			reg = <0x800000 0x7800000>;
+		};
+	};
+};
+

What is the current preferred way of handling the partitions? This doesn't fit my Sockit configuration for example. So I would always have to patch the devicetree.

On the Socrates I didn't specify the partitions, because I did not want to force a specific configuration.

Regards,
Steffen

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#4 lore raw

PATCH 3/3 ARM: dts: socfpga: Enable QSPI on the Cyclone5 sockit

Quoted 12 lines · Steffen Trumtrar
Quoted 12 lines
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +12 -0
+		cdns,tslch-ns = <4>;
+
+		partition at qspi-boot {
+			/* 8MB for raw data. */
+			label = "Flash 0 Raw Data";
+			reg = <0x0 0x800000>;
+		};
+
+		partition at qspi-rootfs {
+			/* 120MB for jffs2 data. */
+			label = "Flash 0 jffs2 Filesystem";
+			reg = <0x800000 0x7800000>;
Quoted 8 lines

arch/arm/boot/dts/socfpga_cyclone5_sockit.dts line 210

Quoted 4 lines
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +4 -0
+		};
+	};
+};
+

What is the current preferred way of handling the partitions? This doesn't fit my Sockit configuration for example. So I would always have to patch the devicetree.

I'm not 100% sure on this. Graham, do you have any insight?

Quoted 4 lines

On the Socrates I didn't specify the partitions, because I did not want to force a specific configuration.

I know that on Arria10, we needed a specific configuration.

Dinh

#5 lore raw

PATCH 3/3 ARM: dts: socfpga: Enable QSPI on the Cyclone5 sockit

Quoted 25 lines · Dinh Nguyen
Quoted 12 lines · Steffen Trumtrar
Quoted 12 lines
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +12 -0
+		cdns,tslch-ns = <4>;
+
+		partition at qspi-boot {
+			/* 8MB for raw data. */
+			label = "Flash 0 Raw Data";
+			reg = <0x0 0x800000>;
+		};
+
+		partition at qspi-rootfs {
+			/* 120MB for jffs2 data. */
+			label = "Flash 0 jffs2 Filesystem";
+			reg = <0x800000 0x7800000>;
Quoted 8 lines

arch/arm/boot/dts/socfpga_cyclone5_sockit.dts line 210

Quoted 4 lines
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +4 -0
+		};
+	};
+};
+

What is the current preferred way of handling the partitions? This doesn't fit my Sockit configuration for example. So I would always have to patch the devicetree.

Quoted 2 lines

I'm not 100% sure on this. Graham, do you have any insight?

Quoted 1 line

Well, strictly speaking, these partitions are only for the socdk, the Altera dev kit. Our sample designs and file systems expect this layout.

Therefore, these partitions are not required for any other dev kits, and can probably be left out.

Or, Steffen, if you have a standard layout you'd like to see, then put that in there.

I think some people will have to patch the layout regardless.

-Graham

#6 lore raw

PATCH 3/3 ARM: dts: socfpga: Enable QSPI on the Cyclone5 sockit

Quoted 32 lines · Graham Moore
Quoted 25 lines · Dinh Nguyen
Quoted 12 lines · Steffen Trumtrar
Quoted 12 lines
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +12 -0
+        cdns,tslch-ns = <4>;
+
+        partition at qspi-boot {
+            /* 8MB for raw data. */
+            label = "Flash 0 Raw Data";
+            reg = <0x0 0x800000>;
+        };
+
+        partition at qspi-rootfs {
+            /* 120MB for jffs2 data. */
+            label = "Flash 0 jffs2 Filesystem";
+            reg = <0x800000 0x7800000>;
Quoted 8 lines

arch/arm/boot/dts/socfpga_cyclone5_sockit.dts line 210

Quoted 4 lines
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +4 -0
+        };
+    };
+};
+

What is the current preferred way of handling the partitions? This doesn't fit my Sockit configuration for example. So I would always have to patch the devicetree.

Quoted 2 lines

I'm not 100% sure on this. Graham, do you have any insight?

Quoted 1 line

Well, strictly speaking, these partitions are only for the socdk, the Altera dev kit. Our sample designs and file systems expect this layout.

Quoted 8 lines

Therefore, these partitions are not required for any other dev kits, and can probably be left out.

Or, Steffen, if you have a standard layout you'd like to see, then put that in there.

I think some people will have to patch the layout regardless.

Ok, I'll remove the partitions from the none Altera boards.

Dinh

#7 lore raw

PATCH 3/3 ARM: dts: socfpga: Enable QSPI on the Cyclone5 sockit

In reply to Graham Moore

Hi!

Quoted 26 lines · Graham Moore
Quoted 25 lines · Dinh Nguyen
Quoted 20 lines · Steffen Trumtrar
Quoted 6 lines
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +6 -0
+		cdns,tslch-ns = <4>;
+
+		partition at qspi-boot {
+			/* 8MB for raw data. */
+			label = "Flash 0 Raw Data";
+			reg = <0x0 0x800000>;

arch/arm/boot/dts/socfpga_cyclone5_sockit.dts line 210

Quoted 10 lines
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +10 -0
+		};
+
+		partition at qspi-rootfs {
+			/* 120MB for jffs2 data. */
+			label = "Flash 0 jffs2 Filesystem";
+			reg = <0x800000 0x7800000>;
+		};
+	};
+};
+

What is the current preferred way of handling the partitions? This doesn't fit my Sockit configuration for example. So I would always have to patch the devicetree.

Quoted 5 lines
Quoted 2 lines

I'm not 100% sure on this. Graham, do you have any insight?

Quoted 1 line

Well, strictly speaking, these partitions are only for the socdk, the Altera dev kit. Our sample designs and file systems expect this layout.

The thing is, that I don't think these partitions belong in a mainline dts at all. But I'm not sure what the current policy is.

Quoted 7 lines

Therefore, these partitions are not required for any other dev kits, and can probably be left out.

Or, Steffen, if you have a standard layout you'd like to see, then put that in there.

Well in my case, it actually doesn't really matter. All the boards I use do not have u-boot as bootloader but barebox. And barebox uses devicetree fixups for adding the partition layout that fits the particular use case. All other partitions are thrown out. I don't know if u-boot does something like this.

Regards,
Steffen

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |