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.

Linux/PROCESSOR-SDK-AM335X: McSPI CS control from GPIO

Part Number: PROCESSOR-SDK-AM335X


Tool/software: Linux

I want to control SPI0_CS0 by driver. Is this possible?

Currently, SPI0_CS0 is automatically controlled by controller according to PIN MUX definition:

http://processors.wiki.ti.com/images/8/82/TMDSSK3358_1.2A_PinMux_Description.zip

If it's possible, please tell me:

* Setting device tree

* How to do this in source code (driver/spi)

 

I'm using SDK Linux for am335x starter kit:

http://www.ti.com/tool/processor-sdk-am335x

Many thanks,

Thanh

  • The software team have been notified. They will respond here.
  • Hi Thanh,

    Can you clarify your question, maybe explain what you're trying to do?

    Are you wanting to explicitly control SPI CS0 in the driver to handle deal with a device's protocol (I know some devices want to see a CS toggle to start conversion, for example).

    Or, are you trying to assign a regular GPIO as an SPI chip select?

    Regards,
    Mike
  • Hi Mike,

    I'm trying to add a driver to support a device that has SPI protocol. And, for that device we must handle SPI by driver.

    For example, when sending a command to device, CS pin must be driven to low. That is device's protocol as you said.

    I just know there's a way to control CS via its assigned GPIO.

    However could you support for more clearification about implementation?  

    Regards,

    Thanh

  • Hi Thanh,

    Sorry for the delay.

    I would like to help, but will be out of the office until 11/20. If you're still stuck then, I will be happy to help out.

    In the meantime, take a look at this blog post: dev.iachieved.it/.../
    This is assuming the Debian filesystem and cape manager provided by BeagleBoard.org, however the concepts will still apply.

    Regards,
    Mike