Urgent: Cannot boot from NAND - OTP
Problem:
After configuring the OTP pins in word 3 to the following:
- Primary boot source : SD-card
- Secondary boot source : FMC NAND
And flashing the FMC nand with TF-A `tfa-*-nand.stm32` in the first sector using `nandwrite -p /dev/mtd0 /mnt/boot/tf-a-stm32mp153c-*-nand.stm32`
I have a working booting setup using SD-card and u-boot.
I have programmed OTP in the following way:
First sense the lock register:
`fuse sense 0 0x10000003`
Validate that the lock register is 0. If not, then it is no longer possible to write the register. This is usually a sign that the boot sources have already been set.
Read the value of word `3` in bank `0`. Either it is set or not.
If it is set. Do nothing
If it is not set all `0`, Do next step
Run the sense command, this must be 0 or 0x21000000
`fuse sense 0 3`
When the sensing is complete, and it is determined that no values in OTP word 3 is set, we can proceed with programming the fuses.
We choose:
- The primary boot source to = 4 SD card.
These belong to bits [29:27]
- The secondary boot source = 1 FMC NAND
These belong to bits [26:24]
Because the values belong in a 32-bit word. The First nibble will be set to 0x2 and the second nibble to 0x1.
This means that the first byte will be set to 0x21.
Therefore it must be set to `0x21000000`
⚠ **Warning: This is a permanent step**
`fuse prog -y 0 3 0x21000000`
`fuse override 0 3 0x21000000`
:glasses: We then read(sense) the register to confirm that the values are indeed correctly set, confirm that the value is 0x21000000 before continuing to the next step:
`fuse sense 0 3`
`fuse read 0 3`
After programming the fuse, we must lock the register. This is to avoid unintentional and intentional changes to the boot order. This amounts to freezing the word to its final value. Otherwise you run the risk of being able to fuse other bits, and making the system unbootable.
⚠ **Warning: This is a permanent step**
`fuse prog 0 0x10000003 0x40000000`
But locking the register emitted a warning.
The system does boot from SD-card but never form nand. When i try booting withouth SD-card nothing happens.
Is it possible to get any output from the rom boot?
