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.

Configuring SPI1 with CS2 on L138 EVM

Other Parts Discussed in Thread: AM1808, OMAP-L137, OMAP-L138

Dear All,

I am facing an issue in configuring SPI1 with CS2 on L138 EVM. I am using PSP version is  linux-2.6.33-rc4-psp03.20.00.14. 

On EVM SPI1 with CS0 is configured for SPI Flash. We are using custom expander board for LCD configuration via SPI1 with CS2. Although we have made necessary changes in kernel including PINMUX settings, we are not getting o/p on SPI signals. During driver initialization we can see SPI_SCS[2] toggling momentarily but as soon as SPI_SCS[2] toggles SPI_CLK and SPI_SOMI are driven low forever until board is rebooted.

We also checked at u-boot level using sspi command to do continuous write on CS2 but no success. 

We would appreciate if you can provide some utility or reference driver that we can use on L138 EVM and test SPI interface with different chip select pins. 

Regards,

Dipen Patel

  • Pasting For Dipen:

     

    I was referring to SPRUFW1B (AM17x/AM18x ARM Microprocessor Serial Peripheral Interface (SPI)). On page#16 second last paragraph says:

    "In master mode, the SPIx_SCS[n] pin functions as an output, and toggles when a specific slave device is
    selected. However, this is most useful on devices that support multiple SPIx_SCS[n] pins. The SPI only
    supports a single SPIx_SCS[n] and so the usefulness of this pin in master mode is limited. In practice,
    general-purpose I/O pins are needed to support multiple slave device chip selects.
    "

    Also on AM1808 datasheet (SPRS653A) on page#8 table 3.1:

    SPI    |     2 (Each with one hardware chip select)

    W.rt. above information does it mean that we can configure only one SPIx_SCS[n] pin for each SPIx controller (SPI0 or SPI1) out of 8 available for both controller.

    1. Example - A                  ==   This is wrong configuration as per above information.
      1. Device xyz
        1. Bus#   SPI0
        2. Chip Select#   SPI0_SCS[0]
      2. Device abc
        1. Bus#   SPI0
        2. Chip Select#   SPI0_SCS[1]

     

    1. Example - B                  == This is correct configuration as per above information.
      1. Device xyz
        1. Bus#   SPI0
        2. Chip Select#   SPI0_SCS[0]
      2. Device abc
        1. Bus#   SPI1
        2. Chip Select#   SPI1_SCS[0]



    Request you to clarify my understanding.

    Regards,
    Dipen Patel


  • Hi Dipen,

    The paragraph is only applicable to the AM17x, OMAP-L137, C6747, C6745, C6743 devices.  So only example - B should work.

    For  AM18x, OMAP-L138, C6748, C6746, C6742 devices, both example - A and example - B should work.

    Thanks and regards,

    Tai Nguyen