linux4sam / at91bootstrap

Second level bootloader for Microchip SoC (aka AT91)
https://www.linux4sam.org/linux4sam/bin/view/Linux4SAM/AT91Bootstrap4
114 stars 232 forks source link

SAM9X60: Using FLEXCOM0 for SPI Flash Boot #181

Closed LeSpocky closed 2 months ago

LeSpocky commented 2 months ago

The SAM9X60 datasheet suggests in section 12. Boot Strategies the chip can boot from serial flash memory connected to flexcom, in default boot sequence: FLEXCOM0 - SPI (PA0, PA1, PA3, PA4). Details in section 12.1.4.7.4 SPI Flash Boot. We connected a standard 8-pin SPI serial flash to that interface, and want to put U-Boot image and probably U-Boot environment on it, too.

However at91boostrap does not seem to support this configuration, flexcom is only used for TWI. SPI memory is only accessed with hardware accelerated spi mem mode of QSPI controller. What's needed to add support for a configuration where SPI Flash Memory is connected to a standard SPI controller (or flexcom)? Probably an SPI host driver and the SPI memory commands in software?

Is anyone (at Microchip) working on that already?

noglitch commented 2 months ago

Hi, This possibility is not supported currently on at91bootstrap for this product. There is no work being done on this right now. What you describe looks indeed like the way to go. SPI host worked on older SoC, so I think that porting it to sam9x60 should be feasible as the SPI peripheral, even if wrapped up in a "flexcom" shield, is basically the same. I advice to contact our support team if you find difficulties. Best regards, Nicolas