Page 1 of 1

Booting sama5d27-som1-ek1 from qspi flash

Posted: Wed Mar 27, 2019 4:35 pm
by mdeneen
Hi!

I have been trying to boot the sama5d27-som1-ek1 from qspi flash, unsuccessfully at this point. I am building at91bootstrap3 with gcc-linaro-7.3.1-2018.05 and sama5d27_som1_ekqspi_uboot_defconfig. I then use sam-ba to write the bootloader:

Code: Select all

./sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c writeboot:/tmp/boot.bin 
Opening serial port 'ttyACM0'
Connection opened.
Detected memory size is 8388608 bytes.
Page size is 256 bytes.
Buffer is 90368 bytes (353 pages) at address 0x00229e60.
Supported erase block sizes: 4KB
Executing command 'writeboot:/tmp/boot.bin'
Appending 152 bytes of padding to fill the last written page
Wrote 9728 bytes at address 0x00000000 (100.00%)
Connection closed.

Code: Select all

./sam-ba -x ./examples/sama5d2/boot-config/show-boot-config.qml
Opening serial port 'ttyACM0'
Connection opened.
-- boot config --
BSCR=0x00000004 / BUREG0,VALID
BUREG0=0x00040000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1,EXT_MEM_BOOT
BUREG1=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
BUREG2=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
BUREG3=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
FUSE=0x00060000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET3,EXT_MEM_BOOT
Connection closed.

Perhaps I am reading this incorrectly, but shouldn't it attempt to load the bootstrap from any one of the available external memories? It certainly loads the bootstrap when built for SD cards from both mmc0 and mmc1.

Is it possible to boot this eval kit from qspi? I've tried all io sets and combinations, and don't feel that it's loading the bootstrap code from qspi. I looked through the errata and didn't see anything which suggested that this was broken on my revision, RevA.0.

Re: Booting sama5d27-som1-ek1 from qspi flash

Posted: Wed Mar 27, 2019 5:59 pm
by thackerp
QSPI1 boots from IOSET2 (see DS60001521B.pdf, table 7-1). The below configuration is known to work correctly using BUREG0 on the SAMA5D2-SOM1-EK1

bureg0:QSPI0_DISABLED,QSPI1_IOSET2,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1, SDMMC0_DISABLED,SDMMC1_DISABLED,UART1_IOSET1,JTAG_IOSET3,EXT_MEM_BOOT