Message ID | 1476908324-12313-3-git-send-email-dinguyen@opensource.altera.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi! On Wed, Oct 19, 2016 at 03:18:44PM -0500, dinguyen@opensource.altera.com wrote: > From: Dinh Nguyen <dinguyen@opensource.altera.com> > > Enable the QSPI node and add the flash chip. > > Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com> > --- > arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 33 +++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts > index 02e22f5..2f75e0f 100644 > --- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts > +++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts > @@ -175,6 +175,39 @@ > status = "okay"; > }; > > +&qspi { > + status = "okay"; > + > + flash: flash@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@qspi-boot { > + /* 8MB for raw data. */ > + label = "Flash 0 Raw Data"; > + reg = <0x0 0x800000>; > + }; > + > + partition@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
On 10/20/2016 02:19 AM, Steffen Trumtrar wrote: >> + cdns,tslch-ns = <4>; >> + >> + partition@qspi-boot { >> + /* 8MB for raw data. */ >> + label = "Flash 0 Raw Data"; >> + reg = <0x0 0x800000>; >> + }; >> + >> + partition@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. I'm not 100% sure on this. Graham, do you have any insight? > > 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
On 10/20/2016 09:12 AM, Dinh Nguyen wrote: > > > On 10/20/2016 02:19 AM, Steffen Trumtrar wrote: > >>> + cdns,tslch-ns = <4>; >>> + >>> + partition@qspi-boot { >>> + /* 8MB for raw data. */ >>> + label = "Flash 0 Raw Data"; >>> + reg = <0x0 0x800000>; >>> + }; >>> + >>> + partition@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. > > I'm not 100% sure on this. Graham, do you have any insight? >> 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
On 10/25/2016 10:38 AM, Graham Moore wrote: > On 10/20/2016 09:12 AM, Dinh Nguyen wrote: >> >> >> On 10/20/2016 02:19 AM, Steffen Trumtrar wrote: >> >>>> + cdns,tslch-ns = <4>; >>>> + >>>> + partition@qspi-boot { >>>> + /* 8MB for raw data. */ >>>> + label = "Flash 0 Raw Data"; >>>> + reg = <0x0 0x800000>; >>>> + }; >>>> + >>>> + partition@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. >> >> I'm not 100% sure on this. Graham, do you have any insight? >>> > > 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. > Ok, I'll remove the partitions from the none Altera boards. Dinh
Hi! On Tue, Oct 25, 2016 at 10:38:10AM -0500, Graham Moore wrote: > On 10/20/2016 09:12 AM, Dinh Nguyen wrote: > > > > > > On 10/20/2016 02:19 AM, Steffen Trumtrar wrote: > > > > > > + cdns,tslch-ns = <4>; > > > > + > > > > + partition@qspi-boot { > > > > + /* 8MB for raw data. */ > > > > + label = "Flash 0 Raw Data"; > > > > + reg = <0x0 0x800000>; > > > > + }; > > > > + > > > > + partition@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. > > > > I'm not 100% sure on this. Graham, do you have any insight? > > > > > 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. > > 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
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts index 02e22f5..2f75e0f 100644 --- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts @@ -175,6 +175,39 @@ status = "okay"; }; +&qspi { + status = "okay"; + + flash: flash@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@qspi-boot { + /* 8MB for raw data. */ + label = "Flash 0 Raw Data"; + reg = <0x0 0x800000>; + }; + + partition@qspi-rootfs { + /* 120MB for jffs2 data. */ + label = "Flash 0 jffs2 Filesystem"; + reg = <0x800000 0x7800000>; + }; + }; +}; + &usb1 { status = "okay"; };