boot from sdmmc1 and access nand on IOSET2

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

bmpenrod
Posts: 16
Joined: Wed Feb 07, 2018 9:39 pm

boot from sdmmc1 and access nand on IOSET2

Mon Apr 16, 2018 1:25 am

I'm bringing up a custom board based on the SAMA5D27 SIP and a very much stripped down SAMA5D27_SOM1_EK reference design. I'm only using ethernet and uarts from that design. Since there is no nand on the SAMA5D27_SOM1_EK, I copied the device tree settings from the SAMA5D2_PTC_EK design, except that I connected the nand chip to the IOSET2 pin group. I even used the same Micron 512MB flash chip used in the SAMA5D2_PTC_EK, which happens to be the one we are currently using in an existing embedded linux product.

I also have the SDMMC1 pins connected to a uSD interface, exactly like the SAMA5D27_SOM1_EK. Since the ROMBoot defaults to booting from SDMMC1, I have made no changes to the default boot configuration register (i.e. have not burned the fuse register or used the BUREGs). This works perfectly, and I can use at91bootstrap to load the linux kernel and bring up my system just fine. The problem is that the nand chip is not detected properly by the kernel as it is booting. It reads incorrect manufacturer and chip ids and ultimately decides that no nand chip is found. I get this behavior on more than one board, so it is not likely a hardware assembly issue.

I know that there is one pin that is used by both the nand ioset2 and sdmmc1 pin groups: the nand RDY/BUSY pin is the same as D3 on the sdmmc1 interface. I also know that this pin is often not used in a nand interface, so I have not hooked it up to the nand chip.

As a test, I have also configured at91bootstrap to access nand, again based on the SAMA5D2_PTC_EK as a reference for modifying the at91bootstrap source to allow booting linux from nand on the SAMA5D27_SOM1_EK. (While making the code mods, I saw that the nand RDY/BUSY pin is not used at all by at91bootstrap.) Still, when loading at91bootstrap from my sdmmc1 card, it is also unable to read the nand device ids and gives up.

I guess my question is: Is it possible to have sdmmc1 and nand on ioset2 configured at the same time? If not, I will give up and go down the SAM-BA route to burn the flash, assuming I can get that to recognize the chip. My intent was to boot linux using sdmmc1 and then use the mtd tools to burn everything into the nand partitions.
blue_z
Location: USA
Posts: 1646
Joined: Thu Apr 19, 2007 10:15 pm

Re: boot from sdmmc1 and access nand on IOSET2

Wed Apr 18, 2018 1:52 am

bmpenrod wrote:I'm bringing up a custom board based on the SAMA5D27 SIP
You neglect to mention the specific versions of AT91Bootstrap and Linux kernel that you are using.
You neglect to show what driver code modifications you may have made and what your board's Device Tree contains.

bmpenrod wrote:This works perfectly, and I can use at91bootstrap to load the linux kernel and bring up my system just fine. The problem is that the nand chip is not detected properly by the kernel as it is booting.
You're contradicting yourself.
If something works "perfectly" and/or is "just fine", then how can there be a "problem"?
bmpenrod wrote:I get this behavior on more than one board, so it is not likely a hardware assembly issue.
That's illogical reasoning.
You've provided zero information to eliminate any causes.

bmpenrod wrote:I also know that this pin is often not used in a nand interface, so I have not hooked it up to the nand chip.
I don't know the accuracy of your claim, but I assume that it's possible when the NAND chip is connected directly to the processor interface, i.e. there is no NFC.
I do assume that you are not privy to the internals workings of the Atmel NFC, meaning that you don't know what happens when the NANDRDY input of the NFC is left floating.

bmpenrod wrote:As a test, I have also configured at91bootstrap to access nand, again based on the SAMA5D2_PTC_EK as a reference for modifying the at91bootstrap source to allow booting linux from nand on the SAMA5D27_SOM1_EK.
The SAMA5D27-SOM1-EK1 has no NAND flash (according to its User Guide).
Are you conflating your board with the Microchip/Atmel board?

bmpenrod wrote:Is it possible to have sdmmc1 and nand on ioset2 configured at the same time?
If you can avoid pin conflicts, then it should be possible.
Apparently you have overlooked the alternate NANDRDY input on PD8.
And you probably have other issues that inhibit NAND access.

Regards

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest