I'm trying to use at least 2 CS lines in PICOMOD6, but, unfortunately, it appears not to be possible with PICOMOD6 linux version 2.6.28.6 V1.0.
In file 'arch\arm\mach-s3c6410\mach-picomod6.c' , it appears up to 4 CS lines for spidev0, but only the first one is running OK. This first one is signal CS0 according with S3C6410 micro Datasheet.
I have made some modifications in file 'arch\arm\mach-s3c6410\mach-picomod6.c' in order to configure the second CS line with IO line GPG(1) to match with my own HW, but results are the same: neither GPN(5) nor GPG(1) lines activate the second chip select .
Are really the various CS lines suppported by this version of PICOMOD6 linux drivers?
Original code:
#ifdef CONFIG_SPI_CNTRLR_0
static struct s3c_spi_pdata s3c_slv_pdata_0[] __initdata = {
[0] = { /* Slave-0 on Pin 1 (GPC3) of PicoMOD6 */
.cs_level = CS_FLOAT,
.cs_pin = S3C64XX_GPC(3),
.cs_mode = S3C64XX_GPC_OUTPUT(3),
.cs_set = s3c_cs_set,
.cs_config = s3c_cs_config,
.cs_suspend = s3c_cs_suspend,
.cs_resume = s3c_cs_resume,
},
[1] = { /* Slave-1 on Pin 29 (GPN5) of PicoMOD6 */
.cs_level = CS_FLOAT,
.cs_pin = S3C64XX_GPN(5),
.cs_mode = S3C64XX_GPN_OUTPUT(5),
.cs_set = s3c_cs_set,
.cs_config = s3c_cs_config,
.cs_suspend = s3c_cs_suspend,
.cs_resume = s3c_cs_resume,
},
etc...
};
#endif
Modified code:
#ifdef CONFIG_SPI_CNTRLR_0
static struct s3c_spi_pdata s3c_slv_pdata_0[] __initdata = {
[0] = { /* Slave-0 on Pin 1 (GPC3) of PicoMOD6 */
.cs_level = CS_FLOAT,
.cs_pin = S3C64XX_GPC(3),
.cs_mode = S3C64XX_GPC_OUTPUT(3),
.cs_set = s3c_cs_set,
.cs_config = s3c_cs_config,
.cs_suspend = s3c_cs_suspend,
.cs_resume = s3c_cs_resume,
},
[1] = { /* Slave-1 on Pin 29 (GPN5) of PicoMOD6 */
.cs_level = CS_FLOAT,
.cs_pin = S3C64XX_GPG(1),
.cs_mode = S3C64XX_GPG_OUTPUT(1),
.cs_set = s3c_cs_set,
.cs_config = s3c_cs_config,
.cs_suspend = s3c_cs_suspend,
.cs_resume = s3c_cs_resume,
},
etc...
};
#endif