This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP-L138: SPI1 Flash boot on LCDK

Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAPL138

We are designing a custom board based on omap-l138 lckd and we want this board to boot from a spi flash (SST25VF080B) connected on SPI1.

For testing this solution, on the eval-board I have connected the SPI Flash on SPI1 bus with SPI1_SCSn_0.
This SPI bus is available as the fingerprint sensor is no more connected.

Before testing the boot, I wanted to verify that the Flash was detected by u-boot.
So, I configured the omap to boot from sdcard and I have recompiled uboot (from ti-processor-sdk-linux-omapl138-lcdk-05.02.00.10) with some modifications.

When I try to probe the flash (sf probe 1:2), there is an error "Failed to initialize SPI flash at 1:2".
On the scope, I don't see any signal changing state (MISO, MOSI, CSn, SCK).

I don't know if the modifications I have made are correct and sufficient.

diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 5650207..0405a46 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -75,6 +75,16 @@ static const struct pinmux_config emac_pins[] = {
 };
 #endif /* CONFIG_DRIVER_TI_EMAC */
 
+const struct pinmux_config spi1_pins_base[] = {
+       { pinmux(5), 1, 2 }, /* SPI1_CLK */
+       { pinmux(5), 1, 4 }, /* SPI1_SOMI */
+       { pinmux(5), 1, 5 }, /* SPI1_SIMO */
+};
+
+const struct pinmux_config spi1_pins_scs0[] = {
+       { pinmux(5), 1, 1 }, /* SPI1_SCS[0] */
+};
+
 /* I2C pin muxer settings */
 static const struct pinmux_config i2c_pins[] = {
        { pinmux(4), 2, 2 },
@@ -121,6 +131,9 @@ const struct pinmux_resource pinmuxes[] = {
 #ifdef CONFIG_NAND_DAVINCI
        PINMUX_ITEM(nand_pins),
 #endif
+
+       PINMUX_ITEM(spi1_pins_base),
+       PINMUX_ITEM(spi1_pins_scs0),
 };
 
 const int pinmuxes_size = ARRAY_SIZE(pinmuxes);


 Second question, what are the modifications and configuration needed to do a Boot from SPI ?

  • Hi,

    Please have a look at U-boot Release notes:
    software-dl.ti.com/.../Foundational_Components_U-Boot.html

    Section 3.1.1.1.1. Supported Features in U-Boot states that SPI Flash boot is NOT supported for OMAP-L138 LCDK.

    Besides the omapl138_lcdk.c, you need to modify the config file in include/configs/omapl138_lcdk.h (you could take a reference from am335x_evm.h regarding the SPI boot defines).

    Best Regards,
    Yordan
  • Hi Yordan,

    Thank you for the answer.

    I had already read the Release notes and thougth that SPI Flash boot was not supported due to routing of the eval board but feasible with code modification and hardware modification.

    As SPI1 pins aren't used in LCDK I think that I can probe the device from u-boot if connected to SPI1.
    But this fails and as I see nothing happening on the SPI bus, I suppose I'm missing something.