NAND boot using P1022

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NAND boot using P1022

Jump to solution
2,168 Views
jagat
Contributor I

Hi,

   I am going to work on new board with a P1022 processor . The board contains only NAND flash which shall be used as a boot device. I have referred u-boot code of p1022 ds sample board. As per p1022ds manual, it supports booting from NAND flash. But when I checked the include/configs/p1022ds.h file of u-boot, it does not have any NAND configuration.

Does P1022 support NAND flash booting ? 

Has anyone booted P1022 processor using NAND flash ?

Thanks

Jagat

Labels (1)
0 Kudos
1 Solution
1,332 Views
scottwood
NXP Employee
NXP Employee

Use SDK 1.3.  Don't use older software unless there's a good reason.

I don't understand when you say that P1022DS_NAND and P1022DS_36BIT_NAND are not available.  Did you look in the link to SDK 1.2's boards.cfg that I provided?  They're there.  Line 695.

You seem to be focusing a lot on "uboot v2011.12".  The upstream version is irrelevant, because it's not supported upstream yet.  But it is in the SDK tree, in both 1.2 and 1.3.

View solution in original post

0 Kudos
10 Replies
1,332 Views
scottwood
NXP Employee
NXP Employee

Which U-Boot are you using?  NAND  boot for p1022ds is not yet supported in upstream U-Boot, but it is supported in the U-Boot provided by the SDK, since SDK version 1.2.

0 Kudos
1,332 Views
jagat
Contributor I

I am using the uboot (version 2011.12) provided by  SDK version 1.2.

If uboot available in SDK 1.2 supports NAND booting , then the device configuration file (p1022ds.h)  should have NAND boot configuration . But there is no configuration availble for NAND booting.

0 Kudos
1,332 Views
scottwood
NXP Employee
NXP Employee

You don't see a "P1022DS_NAND" or "P1022DS_36BIT_NAND" in boards.cfg?

See http://git.freescale.com/git/cgit.cgi/ppc/sdk/u-boot.git/tree/boards.cfg?id=fsl-sdk-v1.2

Also note that SDK v1.3 is now available.

0 Kudos
1,332 Views
jagat
Contributor I

P1022DS_NAND or P1022DS_36BIT_NAND is not available in boards.cfg file of  uboot v2011.12.

I have downloaded Uboot V2011.12 from the following link, as mentioned in the QorIQsdkv1.2 release notes :

http://git.freescale.com/git/cgit.cgi/ppc/sdk/u-boot.git/?h=sdk-v1.2.x

I think, I should download and use fsl-sdk-qoriq-v1.0.3 , which contains boards.cfg file with P1022DDS_NAND options.

0 Kudos
1,332 Views
jagat
Contributor I

Also there is another link, which contains uboot SDK1.3 as given below :

http://git.freescale.com/git/cgit.cgi/ppc/sdk/u-boot.git/commit/?h=sdk-v1.3.x

Which one should I use ?

0 Kudos
1,333 Views
scottwood
NXP Employee
NXP Employee

Use SDK 1.3.  Don't use older software unless there's a good reason.

I don't understand when you say that P1022DS_NAND and P1022DS_36BIT_NAND are not available.  Did you look in the link to SDK 1.2's boards.cfg that I provided?  They're there.  Line 695.

You seem to be focusing a lot on "uboot v2011.12".  The upstream version is irrelevant, because it's not supported upstream yet.  But it is in the SDK tree, in both 1.2 and 1.3.

0 Kudos
1,332 Views
jagat
Contributor I

Hi Scott,

I was trying to understand the nand boot sequence for P1022 by referring the u-boot-sdk.1.3.x code. I have some very basic doubts.

1. In u-boot-sdk, the macro CONFIG_NAND_SPL controls the use of CONFIG_SYS_TEXT_BASE_SPL. But CONFIG_NAND_SPL macro is not defined in the include/configs/P1022DS.h file. Is this macro needs to be defined manually ? what is its significance in nand booting ?

2. As per P1022 RM the reset vector address is  0xfffffffc but in uboot,p1022DS.h the macro CONFIG_RESET_VECTOR_ADDRESS is 0xeffffffc. What is the reason behind it ?

Thanks

Jagat


0 Kudos
1,332 Views
scottwood
NXP Employee
NXP Employee

CONFIG_NAND_SPL is set by the makefiles when building the SPL.

CONFIG_RESET_VECTOR_ADDRESS is the link address of the reset vector.  The link address of U-Boot is often not the same as the where the CPU actually starts executing instrucitons (the mapping gets changed prior to entering C code).

0 Kudos
1,332 Views
adeel
Contributor III

1. You have to define it in nand_spl/board/xxx/Makefile. It should automatically be used when you configure uboot for NAND config.

2. Reset Vector should always be 0xfffffffc. Perhaps they have changed it in CPU register for special cases. But, if the CPU jumps at TEXT_BASE, reset vector doesn't matter.

Adeel 

0 Kudos
1,332 Views
jagat
Contributor I

Thanks scott.

The NAND configurations are available in the link provided by you and also in uboot sdk 1.3..

Since the uboot V2011.12 was in sdk tree , I was little confused with that .

Once again thanks for your quick response.

0 Kudos