I am trying to implement boot of BBB from SPI Flash (N25Q256) to simulate operation of our target hardware which will contain N25Q256 connected to AM3352 on SPI0. To achieve this I have a N25Q256 chip on a small board with its SPI pins (CLK, CS, MOSI and MISO) connected to the respective SPI0 pins of BBB.
I was able to program SPI flash from U-boot according to the instructions in Linux Core U-boot User's Guide, after having to set the correct SPI0 pinmux options with U-boot mm command.
When I attempt SPI boot of BBB, I can only get to the SPL stage (I can see U-Boot SPL 2014.07-00107-gd28f2b9-dirty (Jul 21 2015 - 17:07:24) on the serial console). Following that SPI link stops working and I am getting the following console messages
SF: Unsupported flash IDs: manuf 00, jedec 0000, ext_jedec 0000
SPI probe failed.
### ERROR ### Please RESET the board ###
At the same time I can see that the level of CS signal goes from High to Low, confirming that SPI communication cannot continue once SPL takes over from ROM code.
I understand that I need somehow to set up correct pinmux for SPI) in SPL and U-boot. I tried to modify the file mux.c in /board/ti/am335x as follows
void enable_board_pin_mux(struct am335x_baseboard_id *header)
{
/* Do board-specific muxes. */
if (board_is_bone(header)) {
/* Beaglebone pinmux */
configure_module_pin_mux(spi0_pin_mux); //this line replaces configure_module_pin_mux(i2c1_pin_mux) in the original code
configure_module_pin_mux(mii1_pin_mux);
configure_module_pin_mux(mmc0_pin_mux);
#if defined(CONFIG_NAND)
configure_module_pin_mux(nand_pin_mux);
#elif defined(CONFIG_NOR)
configure_module_pin_mux(bone_norcape_pin_mux);
#else
configure_module_pin_mux(mmc1_pin_mux);
#endif
However this does to seem to have any effect. What else can I do to ensure that BBB pinmux is configured for SPI0 in SPL and U-boot?
Regards Eugene