Hi
I am working on a project that uses the imx53qsb (LOCO) board.
I have been trying to configure the cspi port for using the spidev without any success.
I set already the kernel configuration:
Spi support --> Freescale MXC CSPI controller.
--> User Mode SPI device driver support.
And register the mxc spi driver in:
mx53_loco.c
static iomux_v3_cfg_t mx53_loco_pads[] = {
/* CSPI */
MX53_PAD_DISP0_DAT0__CSPI_SCLK,
MX53_PAD_DISP0_DAT1__CSPI_MOSI,
MX53_PAD_DISP0_DAT2__CSPI_MISO,
MX53_PAD_DISP0_DAT3__CSPI_SS0,
MX53_PAD_DISP0_DAT4__CSPI_SS1,
MX53_PAD_DISP0_DAT5__CSPI_SS2,
MX53_PAD_DISP0_DAT6__CSPI_SS3,
...
...
}
static struct mxc_spi_master mxcspi3_data = {
.maxchipselect = 4,
.spi_version = 23,
};
static struct spi_board_info mxspi3_device[] __initdata = {
{
.modalias = "spidev",
.max_speed_hz =10000000,
.bus_num = 3,
.chip_select = 0,
.mode = SPI_MODE_1,
},
{
.modalias = "spidev",
.max_speed_hz =10000000,
.bus_num = 3,
.chip_select = 1,
.mode = SPI_MODE_1,
},
{
.modalias = "spidev",
.max_speed_hz = 10000000,
.bus_num = 3,
.chip_select = 2,
.mode = SPI_MODE_1,
},
{
.modalias = "spidev",
.max_speed_hz = 10000000,
.bus_num = 3,
.chip_select = 3,
.mode = SPI_MODE_1,
},
};
static void __init mxc_board_init(void)
{
...
...
mxc_register_device(&mxcspi3_device, &mxcspi3_data);
spi_register_board_info(mxspi3_device, ARRAY_SIZE(mxspi3_device));
...
...
}
I am working with the yocto project using the meta-fsl-arm layer and the version of kernel used is 2.6.35.
I get the spidev registered in the /dev folder but I don't see any output when I run the spi_test.c included in the Linux Documentation for testing the spidev.
Any idea where the problem is?
Thanks.
Hi, Daniel!
Did you solve this?
I did similar setup, except .spi_version = 7, and /dev/spidev3.{0,1,2,3} shows up
But I can't get anything but "FF" from these devices
btw, with mainline kernel and cspi configured in imx53-qsb.dts I can get valid data, but I need cspi in 2.6.35 because of lack gpu drivers in mainline kernel