TI E2E Community
dm365 EVM: spidev usage
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.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.