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.

DM814x Linux PSP McSPI driver- 16 bit support?

Hello,

I have a customer that needs to use the Linux PSP McSPI driver for the DM814x, but would like to configure it for 16-bit rather than 8-bit data.

Are there plans to add this feature? If not, can someone recommend what code changes are necessary to configure for 16-bit data usage?

Thx,

Mark

  • Hi Mark,

    The omap2_mcspi driver (drivers/spi/omap2_mcspi.c) already has support for all word lengths. But we have verified it only in 8-bit board because the EVM has only a 8-bit SPI flash.

    The Linujx SPI framework supports using the same word length for lifetime of the SPI slave device or we can specify it for every transfer and our omap2_mcspi driver also supports this.

    Currently the word length is specified using bits_per_word either using the spi_device structure or using the spi_transfer strcuture.

    Please refer the m25p80 spi flash slave driver @ "drivers/mtd/devices/m25p80.c". They do not modify the word length but your customer could use this driver as a reference for developing custom SPI slave drivers and populate either the spi_device structure or spi_transfer structure with the required word length using the bits_per_word field.

    So, the code change is only required in the customer driver (spi slave driver) and not in omap2_mcspi driver.

    Regards

    Mansoor

  • I'm trying to set 21 or 5 bit word lengths and I'm getting kernel crashes in omap2_mcspi.c
    The OMAP3 should be able to support 4 to 32 bit word lengths.
    Has anyone else seen this or could someone quickly test it?

    THanks.