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.

dm365 EVM: spidev usage

Hello Juan/Bernie/All,

I want to use 'spidev' module as user space API to access SPI in dm365 EVM by following the procedure given below:

1. set .modalias as "spidev", bus_num=4, chip_select=1 in spi_board_info structure in ~/arch/arm/mach-davinci/davinci_spi_platform.c file and enable CONFIG_SPIDEV. This shall create device node in  /dev/spi4.1 ?

2. supply the configuration parameters like clk_internal, msb_first, cs_hold with davinci_spi_config_t structure

3. setup pinmux using davinci_cfg_reg() for SCLK, MOSI, MISO, ENA in dm365_setup_pinmux().

4. Access the device using open(), write(), read() calls from user space to perform half-duplex transfers.

Please clarify the following:

1. spidev module uses spi.c, davinci_spi_master.c routines to setup transfers and finally uses spi_bitbang.c file routines to perform data transfer?

2. How the pinmux information is passed to "spidev" module? setting up of pinmux as in step(3) above is sufficient or some additional setup in some other place is required?

Please share your experiences with spidev module and clarify my queries.

Thank you for your time and help.

 

--

Best Regards

Arun