Hi I developing on imx28 platform. I'm using ltib version is L2.6.35_10.12.01.
I did my effort to open spidev I did study on this community. But in my case not opened.
I did
Who can tell me how open it?
Solved! Go to Solution.
I solved it I hope this help to others.
Freescale MXS SPI controller – CONFIG_SPI_MXS=y
User mode SPI device driver support – CONFIG_SPI_SPIDEV=y
#if defined(CONFIG_SPI_MXS) || defined(CONFIG_SPI_MXS_MODULE)
{
/* the modalias must be the same as spi device driver name */
.modalias = "spidev", /* Name of spi_driver for this device */
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1, /* Framework bus number */
.chip_select = 0, /* Framework chip select. */
.mode = SPI_MODE_0,
},
#endif
};
static void spi_device_init(void)
{
#if 0
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
#else
spi_register_board_info(spi_devboard_info, ARRAY_SIZE(spi_devboard_info));
printk(KERN_INFO "register (spi_devboard_info) \n");
#endif
after update of uImage I can see the /dev/spidev1.0
Thanks.
hello suppose if you have two SPI
SSP1_SS0
SSP2_SS1
SSP2_SS3
how you will create three spidev1.0 , spidev2.1, and spidev2.3
Only one am able to create
yes now I got the spidev1.0,2.0
but unable to pass the spidev test function , unable to transfer:invalid argument
I am using 2.6.35.3 kernel linux
any patch?/ solution
Hey Min,
I have tried the same as you did, but without successful.
I have the same configuration in kernelconfig file, but in the file from linux/arch/arm/config/ CONFIG_SPI_MXS=m. I don`t know if this is the issue or not.
Have you installed some special patches for spidev for imx28.
I am using TQMA28 module and I want to enable and to use the SSP2. The module has on it imx287.
Thanks,
Monica
I solved it I hope this help to others.
Freescale MXS SPI controller – CONFIG_SPI_MXS=y
User mode SPI device driver support – CONFIG_SPI_SPIDEV=y
#if defined(CONFIG_SPI_MXS) || defined(CONFIG_SPI_MXS_MODULE)
{
/* the modalias must be the same as spi device driver name */
.modalias = "spidev", /* Name of spi_driver for this device */
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1, /* Framework bus number */
.chip_select = 0, /* Framework chip select. */
.mode = SPI_MODE_0,
},
#endif
};
static void spi_device_init(void)
{
#if 0
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
#else
spi_register_board_info(spi_devboard_info, ARRAY_SIZE(spi_devboard_info));
printk(KERN_INFO "register (spi_devboard_info) \n");
#endif
after update of uImage I can see the /dev/spidev1.0
Thanks.
Hi Min
Thanks for your helpful information about this desicussion.
Now I have the same problem with imx28.
And I have found the /dev/spidev1.0 by your work.
Now there is no spi device on the imx28, so I think test spidev by using mxc_spi_test.out could failed.
----------------------------------
root@freescale /unit_tests$ ./mxc_spi_test1.out -D 0 -s 1000000 -b 8 E6E0
Execute data transfer test: 0 4 E6E0
spi mode: 0
bits per word: 8
max speed: 1000000 Hz (1000 KHz)
Failed transferring data: 22
-----------------------------------
Dear Tong,
I don't know "mxc_spi_test1.out" pls understand me. I did test with spidev_test.c in /document/spi directory.
You can understand that. My application use that and works is good. If your HW is have no problem then you get good result.
Thanks.
I got the spidev1.0,2.0
but unable to pass the spidev test function , unable to transfer:invalid argument -22
I am using 2.6.35.3 kernel linux
Can you tell me where to debug
Hi Min
Thanks a lot.
I am confirming my problem now. Need to connect another device to test I think...
Thank you again:smileyhappy: