Use and configuration of SPI in IMX53 and IMX6

Hello, I am using the imx53 board and connectore6 too. I need to use SPI, I have been following the spidev_test example and works fine. Now I want to build my own app, I need to know how do you do the configuration for SPI. In the example I could see some configurations like bits per word, max speed, delay and so on. But I want to know how do the configuration of others registers, to slave mode and others.
I need to configured the spi as slave mode.

You’d have to look in respective Hardware manuals of i.mx53 and i.mx6 to find out exactly what resisters to set for slave mode. There is no slave mode driver , because it is very device specific, you’d have to write your own driver that would make processor look like an SPI slave simulationg an EEPROM for example.

i have a related question, i want to use de cc 6ul like master and another device (accelerometer) like slave, but i don’t understand how to do it. If you solve your answer, could you please share your info? it would be helpful

Hi leonid, is in te hardware a resistor to change for slave mode? I have been reading but I didn’t find nothing about that.
I have been reading in forums about make a patch to configure the imx6 in slave mode. I found a patch that modifies the spi-imx driver but I dont know if work.
Don’t you have more information about that or tell me which regsters changes for slave mode?

In the connectcore6 the yocto layer only has spi master support, if I want to change it to slave mode I have to do my own driver. I don’t know what yo want to do exactly. Is an external accelerometer?

Hi Emmanuel, yes it is an external accelerometer, i just want to acquire data from it so i can process it with the connectcore6. The configuration that i want to achieve is simpler the connectore as master and the sensor as slave, i don’t have any spi in my dev folder, do you know if it’s necessary to enable the spi generic driver before bitbake the image?
Best regards.

Yes here|System%2520development|Linux%2520v3.14%2520Board%2520Support%2520Package|Devices%2520and%2520interfaces|_____18 you can read the kernel configuration. In my case, for default the spi is enabled, and the driver is called spidev0.0, you maybe have the same, in /dev search spidevx.x with some numbers in x.x

Sorry, the driver is called spi.c the spidev0.0 is the node in linux