diff mbox

[U-Boot] socfpga: implement socdk SPI flash config in dts

Message ID 20150423071400.GA32767@amd
State Accepted
Delegated to: Marek Vasut
Headers show

Commit Message

Pavel Machek April 23, 2015, 7:14 a.m. UTC
SocDK has same QSPI and SPI flash configuration as Socrates. Add
support for it.

Signed-off-by: Pavel Machek <pavel@denx.de>

Comments

Marek Vasut April 24, 2015, 3:22 a.m. UTC | #1
On Thursday, April 23, 2015 at 09:14:01 AM, Pavel Machek wrote:
> SocDK has same QSPI and SPI flash configuration as Socrates. Add
> support for it.
> 
> Signed-off-by: Pavel Machek <pavel@denx.de>

Applied, thanks.

Can you please cook one for Arria V too while at it, so we're consistent ?

Best regards,
Marek Vasut
Pavel Machek April 24, 2015, 1:16 p.m. UTC | #2
On Fri 2015-04-24 05:22:55, Marek Vasut wrote:
> On Thursday, April 23, 2015 at 09:14:01 AM, Pavel Machek wrote:
> > SocDK has same QSPI and SPI flash configuration as Socrates. Add
> > support for it.
> > 
> > Signed-off-by: Pavel Machek <pavel@denx.de>
> 
> Applied, thanks.
> 
> Can you please cook one for Arria V too while at it, so we're consistent ?

Ok (if you are sure it has same hardware?). Should something like
socfpga_devel_board.dtsi be created so we don't have to copy same
piece of dts 3 times?
									Pavel
Marek Vasut April 24, 2015, 6:52 p.m. UTC | #3
On Friday, April 24, 2015 at 03:16:35 PM, Pavel Machek wrote:
> On Fri 2015-04-24 05:22:55, Marek Vasut wrote:
> > On Thursday, April 23, 2015 at 09:14:01 AM, Pavel Machek wrote:
> > > SocDK has same QSPI and SPI flash configuration as Socrates. Add
> > > support for it.
> > > 
> > > Signed-off-by: Pavel Machek <pavel@denx.de>
> > 
> > Applied, thanks.
> > 
> > Can you please cook one for Arria V too while at it, so we're consistent
> > ?
> 
> Ok (if you are sure it has same hardware?).

Yeah, from this point of view, CV and AV are almost identical. Basically, it's 
the FPGA which differs, AV is closer to stratix in my opinion.

> Should something like
> socfpga_devel_board.dtsi be created so we don't have to copy same
> piece of dts 3 times?

No, this is board specific. I have a feeling we'll have to just deal with three
copies in this case.

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/arch/arm/dts/socfpga_cyclone5_socdk.dts b/arch/arm/dts/socfpga_cyclone5_socdk.dts
index 8e1f88c..70701f0 100644
--- a/arch/arm/dts/socfpga_cyclone5_socdk.dts
+++ b/arch/arm/dts/socfpga_cyclone5_socdk.dts
@@ -25,6 +25,10 @@ 
 		 * to be added to the gmac1 device tree blob.
 		 */
 		ethernet0 = &gmac1;
+
+		spi0 = "/spi@ff705000";		/* QSPI */
+		spi1 = "/spi@fff00000";
+		spi2 = "/spi@fff01000";
 	};
 
 	regulator_3_3v: 3-3-v-regulator {
@@ -77,3 +81,23 @@ 
 &usb1 {
 	status = "okay";
 };
+
+&qspi {
+	status = "okay";
+
+	flash0: n25q00@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "n25q00";
+		reg = <0>;      /* chip select */
+		spi-max-frequency = <50000000>;
+		m25p,fast-read;
+		page-size = <256>;
+		block-size = <16>; /* 2^16, 64KB */
+		read-delay = <4>;  /* delay value in read data capture register */
+		tshsl-ns = <50>;
+		tsd2d-ns = <50>;
+		tchsh-ns = <4>;
+		tslch-ns = <4>;
+	};
+};