JackOfAll wrote:
> John,
>
> I'm looking at
> wandboard-sdk-20130208/linux-3.0.35-imx6-wand/arch/arm/mach-mx6/board-wand.c
>
> >
Code:
--------------------
> >
>
/****************************************************************************
> *
> * SPI - while not used on the Wandboard, the pins are routed out
> *
>
****************************************************************************/
>
> static const __initdata iomux_v3_cfg_t wand_spi_pads[] = {
> MX6DL_PAD_EIM_D16__ECSPI1_SCLK,
> MX6DL_PAD_EIM_D17__ECSPI1_MISO,
> MX6DL_PAD_EIM_D18__ECSPI1_MOSI,
> MX6DL_PAD_EIM_EB2__GPIO_2_30,
>
> MX6DL_PAD_EIM_CS0__ECSPI2_SCLK,
> MX6DL_PAD_EIM_CS1__ECSPI2_MOSI,
> MX6DL_PAD_EIM_OE__ECSPI2_MISO,
> MX6DL_PAD_EIM_RW__GPIO_2_26,
> MX6DL_PAD_EIM_LBA__GPIO_2_27,
> };
> /* The choice of using gpios for chipselect is deliberate,
> there can be issues using the dedicated mux modes for cs.
> */
>
> /* ------------------------------------------------------------------------
*/
>
> static const int wand_spi1_chipselect[] = { IMX_GPIO_NR(2, 30) };
>
> /* platform device */
> static const struct spi_imx_master wand_spi1_data = {
> .chipselect = wand_spi1_chipselect,
> .num_chipselect = ARRAY_SIZE(wand_spi1_chipselect),
> };
>
> /* ------------------------------------------------------------------------
*/
>
> static const int wand_spi2_chipselect[] = { IMX_GPIO_NR(2, 26),
IMX_GPIO_NR(2, 27) };
>
> static const struct spi_imx_master wand_spi2_data = {
> .chipselect = wand_spi2_chipselect,
> .num_chipselect = ARRAY_SIZE(wand_spi2_chipselect),
> };
>
> /* ------------------------------------------------------------------------
*/
>
> static void __init wand_init_spi(void) {
> WAND_SETUP_PADS(wand_spi_pads);
>
> imx6q_add_ecspi(0, &wand_spi1_data);
> imx6q_add_ecspi(1, &wand_spi2_data);
> }
>
--------------------
> >
>
> This is the setup I think for the 2x SPI routed over the EDM
> connector. What are you after? A node under /dev so you can use one of
> them?
Aha, yes the DAC chip can be controlled from SPI and I thought it
would be nice to use spidev for programming the DSP etc. That part
about the using the GPIO for chip select is very critical, I would have
used the CS that is part of the SPI bus and things wouldn't have
worked!
I just saw your PM and responded.
Thanks,
John S.
------------------------------------------------------------------------
JohnSwenson's Profile: http://forums.slimdevices.com/member.php?userid=5974
View this thread: http://forums.slimdevices.com/showthread.php?t=97881
_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/discuss