[U-Boot] U-boot NAND boot on IMX31 3stack(ARM)

Hi All;
Is there an available port for IMX31 3stack with NAND boot. I am looking for a U-boot port for IMX31 stack( which supports NAND boot.
The closest matches i know of as of now are as follows:
MX-31 ADS MX-31 Phycore Openmoko U-boot (Samsung processor though ARM) - This is the only one on ARM which allows NAND boot.
I haven't digged up further so I am not sure at this point which "port" would be a good enough one as a starting point if no existing port exists.
Thanks in Advance!
-Munro

Hi
2009/3/27 alfred steele alfred.jaquez@gmail.com:
Hi All;
Is there an available port for IMX31 3stack with NAND boot. I am looking for a U-boot port for IMX31 stack( which supports NAND boot.
The closest matches i know of as of now are as follows:
MX-31 ADS MX-31 Phycore Openmoko U-boot (Samsung processor though ARM) - This is the only one on ARM which allows NAND boot.
I haven't digged up further so I am not sure at this point which "port" would be a good enough one as a starting point if no existing port exists.
I would suggest using this patch as a base: http://lists.denx.de/pipermail/u-boot/2009-January/046241.html
Use the above and the review comments posted in February as input to your work.
It's for the phycore board but it's easy to apply this for the PDK. I've posted some PDK related patches, they should be on the mailing list server. The PDK patches aren't in mainline U-boot yet due to the missing NAND boot support.
Regards, Magnus Lilja

Thanks Magnus, How difficult or rather much an effort would it need to add NAND boot support and make it work on MX35 or MX31 3stack board. Are there any existing guidelines for accelerating the development or is the generic uboot porting guidelines .
Regards, Alfred
On Fri, Mar 27, 2009 at 1:52 PM, Magnus Lilja lilja.magnus@gmail.com wrote:
Hi
2009/3/27 alfred steele alfred.jaquez@gmail.com:
Hi All;
Is there an available port for IMX31 3stack with NAND boot. I am looking for a U-boot port for IMX31 stack( which supports NAND boot.
The closest matches i know of as of now are as follows:
MX-31 ADS MX-31 Phycore Openmoko U-boot (Samsung processor though ARM) - This is the only one on ARM which allows NAND boot.
I haven't digged up further so I am not sure at this point which "port" would be a good enough one as a starting point if no existing port exists.
I would suggest using this patch as a base: http://lists.denx.de/pipermail/u-boot/2009-January/046241.html
Use the above and the review comments posted in February as input to your work.
It's for the phycore board but it's easy to apply this for the PDK. I've posted some PDK related patches, they should be on the mailing list server. The PDK patches aren't in mainline U-boot yet due to the missing NAND boot support.
Regards, Magnus Lilja

2009/3/27 alfred steele alfred.jaquez@gmail.com:
Thanks Magnus, How difficult or rather much an effort would it need to add NAND boot support and make it work on MX35 or MX31 3stack board. Are there any existing guidelines for accelerating the development or is the generic uboot porting guidelines .
For i.MX31 3stack (a.k.a. PDK) there's really not that much porting that needs to be done. mx31 is supported in U-boot so the following is needed: * Update my basic i.MX31 PDK patch to apply on top of the current U-boot git (it's been a while since I updated it) * Add the NAND SPL patch I mentioned in my previous reply (update it with the review comments) * Test and submit the patches
The above could be done in a couple of days if your're familiar with i.MX31 and U-boot. Add more time if you're a newcomer to U-boot and/or i.MX31.
Since Freescale hasn't published much info on i.MX35 or the 3stack for that I can only guess that it would probably be pretty straight forward to do a NAND SPL for i.MX35 based on the one for i.MX31 (the NAND controller and possibly the SDRAM controller on i.MX35 seems to be different from i.MX31).
Regards, Magnus

Hi Magnus,
Thanks! Do you remember, off the head, what kind of hardware differences between MX31 and Phycore. I am kind of trying to identify the differences between the two in order to be able to map the patch to the differences. Was the nand_spl directory created for imx31(PDK) NAND specific changes. The reason i am asking is because in the "uboot-imx-imx_v2009.01" tarball Freescale has supplied us with, the directory already exists. I am yet to try apply your PDK patch to the same or compare the differences yet.
I am also wondering if there is a include file which builds up a table of working NAND devices and thier attributes which tells the U-boot on the parameters about a particular NAND device on the board like Block_size , page_size, device size, pages per block, device id etc. Or This information needs to be kind of hardcoded every time.
We have been working on Redboot all this while and what's driving us to move to U-boot is the available ability to be able to boot Linux off the SD card on the MX31 platform.
Regards, Alfred.
On Fri, Mar 27, 2009 at 3:01 PM, Magnus Lilja lilja.magnus@gmail.com wrote:
2009/3/27 alfred steele alfred.jaquez@gmail.com:
Thanks Magnus, How difficult or rather much an effort would it need to add NAND boot support and make it work on MX35 or MX31 3stack board. Are there any existing guidelines for accelerating the development or is the generic uboot porting guidelines .
For i.MX31 3stack (a.k.a. PDK) there's really not that much porting that needs to be done. mx31 is supported in U-boot so the following is needed:
- Update my basic i.MX31 PDK patch to apply on top of the current
U-boot git (it's been a while since I updated it)
- Add the NAND SPL patch I mentioned in my previous reply (update it
with the review comments)
- Test and submit the patches
The above could be done in a couple of days if your're familiar with i.MX31 and U-boot. Add more time if you're a newcomer to U-boot and/or i.MX31.
Since Freescale hasn't published much info on i.MX35 or the 3stack for that I can only guess that it would probably be pretty straight forward to do a NAND SPL for i.MX35 based on the one for i.MX31 (the NAND controller and possibly the SDRAM controller on i.MX35 seems to be different from i.MX31).
Regards, Magnus

On Mon, Mar 30, 2009 at 11:48:57AM -0500, alfred steele wrote:
Was the nand_spl directory created for imx31(PDK) NAND specific changes.
No. It has a "board" subdirectory where board-specific code goes, plus some board-independent drivers.
I am also wondering if there is a include file which builds up a table of working NAND devices and thier attributes which tells the U-boot on the parameters about a particular NAND device on the board like Block_size , page_size, device size, pages per block, device id etc. Or This information needs to be kind of hardcoded every time.
drivers/mtd/nand/nand_ids.c
-Scott

Hi Scott: Thanks!
I am also wondering if there is a include file which builds up a table of working NAND devices and thier attributes which tells the U-boot on the parameters about a particular NAND device on the board like Block_size , page_size, device size, pages per block, device id etc. Or This information needs to be kind of hardcoded every time.
drivers/mtd/nand/nand_ids.c
I have three files which probably make sense to include the new flash part. drivers/mtd/nand/nand_ids.c ./common/cmd_doc.c ./include/linux/mtd/nand_ids.h:
At this point, i do not understand the purpose of each and especially how would the structure flash_id be populated from our data sheet for the flash part we use "Samsung K9F1G08R0A". I basically do not understand all the elements of the array nand_flash_dev nand_flash_ids[] to be able to populate it correctly. It would be great if you can throw some light on it or point me to some relevant documentation.
Thanks in advance!

Hi Scott: Thanks!
I am also wondering if there is a include file which builds up a table of working NAND devices and thier attributes which tells the U-boot on the parameters about a particular NAND device on the board like Block_size , page_size, device size, pages per block, device id etc. Or This information needs to be kind of hardcoded every time.
drivers/mtd/nand/nand_ids.c
I have three files which probably make sense to include the new flash part. drivers/mtd/nand/nand_ids.c ./common/cmd_doc.c ./include/linux/mtd/nand_ids.h:
At this point, i do not understand the purpose of each and especially how would the structure flash_id be populated from our data sheet for the flash part we use "Samsung K9F1G08R0A". I basically do not understand all the elements of the array nand_flash_dev nand_flash_ids[] to be able to populate it correctly. It would be great if you can throw some light on it or point me to some relevant documentation.
Thanks in advance!
On Mon, Mar 30, 2009 at 8:21 PM, alfred steele alfred.jaquez@gmail.com wrote:
Hi Scott: Thanks!
I am also wondering if there is a include file which builds up a table of working NAND devices and thier attributes which tells the U-boot on the parameters about a particular NAND device on the board like Block_size , page_size, device size, pages per block, device id etc. Or This information needs to be kind of hardcoded every time.
drivers/mtd/nand/nand_ids.c
I have three files which probably make sense to include the new flash part. drivers/mtd/nand/nand_ids.c ./common/cmd_doc.c ./include/linux/mtd/nand_ids.h:
At this point, i do not understand the purpose of each and especially how would the structure flash_id be populated from our data sheet for the flash part we use "Samsung K9F1G08R0A". I basically do not understand all the elements of the array nand_flash_dev nand_flash_ids[] to be able to populate it correctly. It would be great if you can throw some light on it or point me to some relevant documentation.
Thanks in advance!

alfred steele wrote:
Hi Scott: Thanks!
I am also wondering if there is a include file which builds up a table of working NAND devices and thier attributes which tells the U-boot on the parameters about a particular NAND device on the board like Block_size , page_size, device size, pages per block, device id etc. Or This information needs to be kind of hardcoded every time.
drivers/mtd/nand/nand_ids.c
I have three files which probably make sense to include the new flash part. drivers/mtd/nand/nand_ids.c
This is the one. However, an individual NAND driver shouldn't have to care; it will be taken care of by the NAND subsystem.
./common/cmd_doc.c ./include/linux/mtd/nand_ids.h:
Ignore these. They are legacy code that will soon be removed.
At this point, i do not understand the purpose of each and especially how would the structure flash_id be populated from our data sheet for the flash part we use "Samsung K9F1G08R0A".
Most likely it is already in the table.
I basically do not understand all the elements of the array nand_flash_dev nand_flash_ids[] to be able to populate it correctly.
Which field in particular are you unsure of? They are described in the definition of nand_flash_dev in include/linux/mtd/nand.h.
Is there any reason why your NAND controller driver needs to care about any of this, as opposed to just hooking up to the NAND subsystem?
-Scott

Hi Scott,
Thanks! The only requirement i have currently is to be able to populate the device table with the "Samsung K9F1G08R0A" because it does not appear in the existing list. This would help the NFC read the part id and the other NAND attributes correctly on the target.
Thanks & Reagrds, Munro.
On Tue, Mar 31, 2009 at 12:20 PM, Scott Wood scottwood@freescale.com wrote:
alfred steele wrote:
Hi Scott: Thanks!
I am also wondering if there is a include file which builds up a table of working NAND devices and thier attributes which tells the U-boot on the parameters about a particular NAND device on the board like Block_size , page_size, device size, pages per block, device id etc. Or This information needs to be kind of hardcoded every time.
drivers/mtd/nand/nand_ids.c
I have three files which probably make sense to include the new flash part. drivers/mtd/nand/nand_ids.c
This is the one. However, an individual NAND driver shouldn't have to care; it will be taken care of by the NAND subsystem.
./common/cmd_doc.c ./include/linux/mtd/nand_ids.h:
Ignore these. They are legacy code that will soon be removed.
At this point, i do not understand the purpose of each and especially how would the structure flash_id be populated from our data sheet for the flash part we use "Samsung K9F1G08R0A".
Most likely it is already in the table.
I basically do not understand all the elements of the array nand_flash_dev nand_flash_ids[] to be able to populate it correctly.
Which field in particular are you unsure of? They are described in the definition of nand_flash_dev in include/linux/mtd/nand.h.
Is there any reason why your NAND controller driver needs to care about any of this, as opposed to just hooking up to the NAND subsystem?
-Scott

Hi Scott,
Thanks! The only requirement i have currently is to be able to populate the device table with the "Samsung K9F1G08R0A" because it does not appear in the existing list. This would help the NFC read the part id and the other NAND attributes correctly on the target.
Thanks & Regards.
On Tue, Mar 31, 2009 at 12:20 PM, Scott Wood scottwood@freescale.com wrote:
alfred steele wrote:
Hi Scott: Thanks!
I am also wondering if there is a include file which builds up a table of working NAND devices and thier attributes which tells the U-boot on the parameters about a particular NAND device on the board like Block_size , page_size, device size, pages per block, device id etc. Or This information needs to be kind of hardcoded every time.
drivers/mtd/nand/nand_ids.c
I have three files which probably make sense to include the new flash part. drivers/mtd/nand/nand_ids.c
This is the one. However, an individual NAND driver shouldn't have to care; it will be taken care of by the NAND subsystem.
./common/cmd_doc.c ./include/linux/mtd/nand_ids.h:
Ignore these. They are legacy code that will soon be removed.
At this point, i do not understand the purpose of each and especially how would the structure flash_id be populated from our data sheet for the flash part we use "Samsung K9F1G08R0A".
Most likely it is already in the table.
I basically do not understand all the elements of the array nand_flash_dev nand_flash_ids[] to be able to populate it correctly.
Which field in particular are you unsure of? They are described in the definition of nand_flash_dev in include/linux/mtd/nand.h.
Is there any reason why your NAND controller driver needs to care about any of this, as opposed to just hooking up to the NAND subsystem?
-Scott

alfred steele wrote:
Thanks! The only requirement i have currently is to be able to populate the device table with the "Samsung K9F1G08R0A" because it does not appear in the existing list. This would help the NFC read the part id and the other NAND attributes correctly on the target.
The specific chip+manfuacturer combination not need to appear in the list, only the standardized device ID which indicates the geometry.
What is the device ID of this chip, and what are the page size, block size, and total flash size?
-Scott

Thanks Again, I am actually confused with the values for chip size which should be the total chip size in MB w.r.t nand_flash_dev structure and "pagesize" as pagesize seems to be extended bytes alone in the datasheet which i am unable to figure of as of now. The pagesize seems to be different from the exact "pagesize" as in the data sheet for the other parts in include/linux/mtd/nand_ids.h. Do you know what to look for in the data sheet .
On Tue, Mar 31, 2009 at 2:10 PM, alfred steele alfred.jaquez@gmail.com wrote:
Hi Scott,
Thanks! The only requirement i have currently is to be able to populate the device table with the "Samsung K9F1G08R0A" because it does not appear in the existing list. This would help the NFC read the part id and the other NAND attributes correctly on the target.
Thanks & Regards.
On Tue, Mar 31, 2009 at 12:20 PM, Scott Wood scottwood@freescale.com wrote:
alfred steele wrote:
Hi Scott: Thanks!
I am also wondering if there is a include file which builds up a table of working NAND devices and thier attributes which tells the U-boot on the parameters about a particular NAND device on the board like Block_size , page_size, device size, pages per block, device id etc. Or This information needs to be kind of hardcoded every time.
drivers/mtd/nand/nand_ids.c
I have three files which probably make sense to include the new flash part. drivers/mtd/nand/nand_ids.c
This is the one. However, an individual NAND driver shouldn't have to care; it will be taken care of by the NAND subsystem.
./common/cmd_doc.c ./include/linux/mtd/nand_ids.h:
Ignore these. They are legacy code that will soon be removed.
At this point, i do not understand the purpose of each and especially how would the structure flash_id be populated from our data sheet for the flash part we use "Samsung K9F1G08R0A".
Most likely it is already in the table.
I basically do not understand all the elements of the array nand_flash_dev nand_flash_ids[] to be able to populate it correctly.
Which field in particular are you unsure of? They are described in the definition of nand_flash_dev in include/linux/mtd/nand.h.
Is there any reason why your NAND controller driver needs to care about any of this, as opposed to just hooking up to the NAND subsystem?
-Scott

2009/3/31 alfred steele alfred.jaquez@gmail.com:
Thanks Again, I am actually confused with the values for chip size which should be the total chip size in MB w.r.t nand_flash_dev structure and "pagesize" as pagesize seems to be extended bytes alone in the datasheet which i am unable to figure of as of now. The pagesize seems to be different from the exact "pagesize" as in the data sheet for the other parts in include/linux/mtd/nand_ids.h. Do you know what to look for in the data sheet .
The Samsung K9F1G08R0A datasheet states that the device code is 0xA1. The nand_ids.c file in U-boot has this code listed as "128MiB 1.8V 8-bit" large page NAND and therefore the device is likely to be supported by U-boot.
And btw, please don't top post.
Regards, Magnus

alfred steele wrote:
I am actually confused with the values for chip size which should be the total chip size in MB w.r.t nand_flash_dev structure and "pagesize" as pagesize seems to be extended bytes alone in the datasheet which i am unable to figure of as of now. The pagesize seems to be different from the exact "pagesize" as in the data sheet for the other parts in include/linux/mtd/nand_ids.h. Do you know what to look for in the data sheet .
The page size that the struct wants is the main data area only, not counting OOB. But as Magnus pointed out, you don't need to worry about any of this. It should Just Work(tm).
What does need to be supplied is a controller driver. There have been some patches in the past, but IIRC some more work was needed to get it mergeable.
-Scott

Hi
2009/3/30 alfred steele alfred.jaquez@gmail.com:
Hi Magnus,
Thanks! Do you remember, off the head, what kind of hardware differences between MX31 and Phycore. I am kind of trying to identify the differences between the two in order to be able to map the patch to the differences. Was the nand_spl directory created for imx31(PDK) NAND specific changes. The reason i am asking is because in the "uboot-imx-imx_v2009.01" tarball Freescale has supplied us with, the directory already exists. I am yet to try apply your PDK patch to the same or compare the differences yet.
You need to be more specific, MX31 is the System-on-Chip while Phycore is a board with the MX31 (and other devices). If you mean the PDK board, no, I don't know the differences.
I didn't know Freescale has released a uboot-imx tarball so I don't know which patches they have applied on top of 2009.01.
Regards, Magnus
participants (3)
-
alfred steele
-
Magnus Lilja
-
Scott Wood