diff mbox

[U-Boot] board/ls2080qds: add the procedure to deply QSPI image.

Message ID 1476165141-10564-1-git-send-email-yao.yuan@freescale.com
State Changes Requested
Delegated to: York Sun
Headers show

Commit Message

Yao Yuan Oct. 11, 2016, 5:52 a.m. UTC
From: Yuan Yao <yao.yuan@nxp.com>

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
---
 board/freescale/ls2080aqds/README | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

Comments

York Sun Oct. 11, 2016, 3:21 p.m. UTC | #1
On 10/10/2016 11:04 PM, Yuan Yao wrote:
> From: Yuan Yao <yao.yuan@nxp.com>
>
> Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
> ---
>  board/freescale/ls2080aqds/README | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>
> diff --git a/board/freescale/ls2080aqds/README b/board/freescale/ls2080aqds/README
> index f288750..0f7446a 100644
> --- a/board/freescale/ls2080aqds/README
> +++ b/board/freescale/ls2080aqds/README
> @@ -188,3 +188,38 @@ DPMAC14 -> PHY4-P1
>  DPMAC15 -> PHY4-P2
>  DPMAC16 -> PHY4-P3
>
> +
> +Booting from QSPI
> +-------------------
> +Booting from QSPI requires two images, RCW and u-boot-dtb.bin.
> +The difference between QSPI boot RCW image and NOR boot image is the PBI
> +command sequence. Below is the setting for PBI commands for QDS which boot
> +on QSPI flash device.
> +
> +1) CCSR 4-byte write to 0x00e00404, data=0x00000000
> +2) CCSR 4-byte write to 0x00e00400, data=0x20010000
> +The above two commands set bootloc register to 0x00000000_20010000 where
> +the u-boot code will be running in QSPI flash.
> +
> +RCW image should be written to the beginning of QSPI flash device.
> +Example of using u-boot command
> +
> +=> sf probe 0:0
> +SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
> +=> sf erase 0 +<size of rcw image>
> +SF: 65536 bytes @ 0x0 Erased: OK
> +=> sf write <rcw image in memory> 0 <size of rcw image>
> +SF: 164 bytes @ 0x0 Written: OK
> +
> +To get the QSPI image, build u-boot with QSPI config, for example,
> +ls2080aqds_qspi_defconfig. The image needed is u-boot-dtb.bin.
> +The u-boot image should be written to 0x10000.
> +
> +=> sf probe 0:0
> +SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
> +=> sf erase 10000 +<size of u-boot image>
> +SF: 589824 bytes @ 0x10000 Erased: OK
> +=> sf write <u-boot image in memory> 10000 <size of u-boot image>
> +SF: 580966 bytes @ 0x10000 Written: OK
> +
> +With these two images in QSPI flash device, the board can boot from QSPI.
>

Yuan Yao,

I think the procedure can be applied to many of our boards with QSPI, 
right? It may be better to move this information out of ls2080aqds.

York
yao yuan Oct. 12, 2016, 3 a.m. UTC | #2
On 10/11/2016 11:04 PM, york sun wrote:
> On 10/10/2016 11:04 PM, Yuan Yao wrote:
> > From: Yuan Yao <yao.yuan@nxp.com>
> >
> > Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
> > ---
> >  board/freescale/ls2080aqds/README | 35
> > +++++++++++++++++++++++++++++++++++
> >  1 file changed, 35 insertions(+)
> >
> > diff --git a/board/freescale/ls2080aqds/README
> > b/board/freescale/ls2080aqds/README
> > index f288750..0f7446a 100644
> > --- a/board/freescale/ls2080aqds/README
> > +++ b/board/freescale/ls2080aqds/README
> > @@ -188,3 +188,38 @@ DPMAC14 -> PHY4-P1
> >  DPMAC15 -> PHY4-P2
> >  DPMAC16 -> PHY4-P3
> >
> > +
> > +Booting from QSPI
> > +-------------------
> > +Booting from QSPI requires two images, RCW and u-boot-dtb.bin.
> > +The difference between QSPI boot RCW image and NOR boot image is the
> > +PBI command sequence. Below is the setting for PBI commands for QDS
> > +which boot on QSPI flash device.
> > +
> > +1) CCSR 4-byte write to 0x00e00404, data=0x00000000
> > +2) CCSR 4-byte write to 0x00e00400, data=0x20010000 The above two
> > +commands set bootloc register to 0x00000000_20010000 where the u-boot
> > +code will be running in QSPI flash.
> > +
> > +RCW image should be written to the beginning of QSPI flash device.
> > +Example of using u-boot command
> > +
> > +=> sf probe 0:0
> > +SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64
> > +KiB, total 32 MiB => sf erase 0 +<size of rcw image>
> > +SF: 65536 bytes @ 0x0 Erased: OK
> > +=> sf write <rcw image in memory> 0 <size of rcw image>
> > +SF: 164 bytes @ 0x0 Written: OK
> > +
> > +To get the QSPI image, build u-boot with QSPI config, for example,
> > +ls2080aqds_qspi_defconfig. The image needed is u-boot-dtb.bin.
> > +The u-boot image should be written to 0x10000.
> > +
> > +=> sf probe 0:0
> > +SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64
> > +KiB, total 32 MiB => sf erase 10000 +<size of u-boot image>
> > +SF: 589824 bytes @ 0x10000 Erased: OK => sf write <u-boot image in
> > +memory> 10000 <size of u-boot image>
> > +SF: 580966 bytes @ 0x10000 Written: OK
> > +
> > +With these two images in QSPI flash device, the board can boot from QSPI.
> >
> 
> Yuan Yao,
> 
> I think the procedure can be applied to many of our boards with QSPI, right? It
> may be better to move this information out of ls2080aqds.
> 

Hi York,

Yes, but a little difference for "CCSR  write" for different boards.
But the "CCSR write" should be wrote into uboot code or cw.
So, should I remove the notes for "CCSR  write" and then move this information for
 all the boards which support QSPI boot?
York Sun Oct. 12, 2016, 3:36 a.m. UTC | #3
On 10/11/2016 08:00 PM, Yao Yuan wrote:
>>
>> Yuan Yao,
>>
>> I think the procedure can be applied to many of our boards with QSPI, right? It
>> may be better to move this information out of ls2080aqds.
>>
>
> Hi York,
>
> Yes, but a little difference for "CCSR  write" for different boards.
> But the "CCSR write" should be wrote into uboot code or cw.
> So, should I remove the notes for "CCSR  write" and then move this information for
>  all the boards which support QSPI boot?
>

I think you can put the common practice together with specific examples 
for LS2080A, and other SoCs.

York
yao yuan Oct. 14, 2016, 6:45 a.m. UTC | #4
On 10/12/2016 08:00 PM, York Sun wrote:
> On 10/11/2016 08:00 PM, Yao Yuan wrote:
> >>
> >> Yuan Yao,
> >>
> >> I think the procedure can be applied to many of our boards with QSPI,
> >> right? It may be better to move this information out of ls2080aqds.
> >>
> >
> > Hi York,
> >
> > Yes, but a little difference for "CCSR  write" for different boards.
> > But the "CCSR write" should be wrote into uboot code or cw.
> > So, should I remove the notes for "CCSR  write" and then move this
> > information for  all the boards which support QSPI boot?
> >
> 
> I think you can put the common practice together with specific examples for
> LS2080A, and other SoCs.
> 

Hi York,

If move this information out of ls2080aqds.
Do you think where can I put the procedure for all the boards?
In every board's README or somewhere for the common procedure?

Thanks.

Yao.
York Sun Oct. 14, 2016, 3:35 p.m. UTC | #5
On 10/13/2016 11:45 PM, Yao Yuan wrote:
> On 10/12/2016 08:00 PM, York Sun wrote:
>> On 10/11/2016 08:00 PM, Yao Yuan wrote:
>>>>
>>>> Yuan Yao,
>>>>
>>>> I think the procedure can be applied to many of our boards with QSPI,
>>>> right? It may be better to move this information out of ls2080aqds.
>>>>
>>>
>>> Hi York,
>>>
>>> Yes, but a little difference for "CCSR  write" for different boards.
>>> But the "CCSR write" should be wrote into uboot code or cw.
>>> So, should I remove the notes for "CCSR  write" and then move this
>>> information for  all the boards which support QSPI boot?
>>>
>>
>> I think you can put the common practice together with specific examples for
>> LS2080A, and other SoCs.
>>
>
> Hi York,
>
> If move this information out of ls2080aqds.
> Do you think where can I put the procedure for all the boards?
> In every board's README or somewhere for the common procedure?
>

Yao,

Take a look at these locations and decide which one fits best.

arch/arm/cpu/armv8/fsl-layerscape/doc/README.*
doc/README.fsl-qspi (you can create this)

York
yao yuan Oct. 17, 2016, 3:58 a.m. UTC | #6
On 10/14/2016 11:36 PM, York Sun wrote:
> On 10/13/2016 11:45 PM, Yao Yuan wrote:
> > On 10/12/2016 08:00 PM, York Sun wrote:
> >> On 10/11/2016 08:00 PM, Yao Yuan wrote:
> >>>>
> >>>> Yuan Yao,
> >>>>
> >>>> I think the procedure can be applied to many of our boards with
> >>>> QSPI, right? It may be better to move this information out of ls2080aqds.
> >>>>
> >>>
> >>> Hi York,
> >>>
> >>> Yes, but a little difference for "CCSR  write" for different boards.
> >>> But the "CCSR write" should be wrote into uboot code or cw.
> >>> So, should I remove the notes for "CCSR  write" and then move this
> >>> information for  all the boards which support QSPI boot?
> >>>
> >>
> >> I think you can put the common practice together with specific
> >> examples for LS2080A, and other SoCs.
> >>
> >
> > Hi York,
> >
> > If move this information out of ls2080aqds.
> > Do you think where can I put the procedure for all the boards?
> > In every board's README or somewhere for the common procedure?
> >
> 
> Yao,
> 
> Take a look at these locations and decide which one fits best.
> 
> arch/arm/cpu/armv8/fsl-layerscape/doc/README.*
> doc/README.fsl-qspi (you can create this)
> 

Hi York,

It seems arch/arm/cpu/armv8/fsl-layerscape/doc/README.* is better.
I will update my patch and resend soon.

Thanks for your help.
York Sun Nov. 7, 2016, 6:17 p.m. UTC | #7
On 10/16/2016 08:58 PM, Yao Yuan wrote:
> Hi York,
>
> It seems arch/arm/cpu/armv8/fsl-layerscape/doc/README.* is better.
> I will update my patch and resend soon.
>

Did you send the update? BTW, I think you meant "deploy QSPI image" in 
the subject.

York
yao yuan Nov. 8, 2016, 3:54 a.m. UTC | #8
On 11/08/2016 02:17 PM, York Sun wrote:
> On 10/16/2016 08:58 PM, Yao Yuan wrote:
> > Hi York,
> >
> > It seems arch/arm/cpu/armv8/fsl-layerscape/doc/README.* is better.
> > I will update my patch and resend soon.
> >
> 
> Did you send the update? BTW, I think you meant "deploy QSPI image" in the
> subject.
> 

Thanks for your reminder.
I will send it just now,

Thanks,
diff mbox

Patch

diff --git a/board/freescale/ls2080aqds/README b/board/freescale/ls2080aqds/README
index f288750..0f7446a 100644
--- a/board/freescale/ls2080aqds/README
+++ b/board/freescale/ls2080aqds/README
@@ -188,3 +188,38 @@  DPMAC14 -> PHY4-P1
 DPMAC15 -> PHY4-P2
 DPMAC16 -> PHY4-P3
 
+
+Booting from QSPI
+-------------------
+Booting from QSPI requires two images, RCW and u-boot-dtb.bin.
+The difference between QSPI boot RCW image and NOR boot image is the PBI
+command sequence. Below is the setting for PBI commands for QDS which boot
+on QSPI flash device.
+
+1) CCSR 4-byte write to 0x00e00404, data=0x00000000
+2) CCSR 4-byte write to 0x00e00400, data=0x20010000
+The above two commands set bootloc register to 0x00000000_20010000 where
+the u-boot code will be running in QSPI flash.
+
+RCW image should be written to the beginning of QSPI flash device.
+Example of using u-boot command
+
+=> sf probe 0:0
+SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
+=> sf erase 0 +<size of rcw image>
+SF: 65536 bytes @ 0x0 Erased: OK
+=> sf write <rcw image in memory> 0 <size of rcw image>
+SF: 164 bytes @ 0x0 Written: OK
+
+To get the QSPI image, build u-boot with QSPI config, for example,
+ls2080aqds_qspi_defconfig. The image needed is u-boot-dtb.bin.
+The u-boot image should be written to 0x10000.
+
+=> sf probe 0:0
+SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
+=> sf erase 10000 +<size of u-boot image>
+SF: 589824 bytes @ 0x10000 Erased: OK
+=> sf write <u-boot image in memory> 10000 <size of u-boot image>
+SF: 580966 bytes @ 0x10000 Written: OK
+
+With these two images in QSPI flash device, the board can boot from QSPI.