* SPI devices
@ 2011-02-18 12:48 Vanalme Filip
0 siblings, 0 replies; only message in thread
From: Vanalme Filip @ 2011-02-18 12:48 UTC (permalink / raw)
To: barebox
My i.MX27PDK board has the PHY chip on CSPI2 and the LCD on CSPI1. The PHY uses SS0 of CSPI2, the LCD uses SS2 of CSPI1.
I'm not sure if I'm doing it right when I implement it like this :
static int imx27pdk_spi_phy_cs[] = {GPIO_PORTD + 21};
static struct spi_imx_master imx27pdk_spi_1_data = {
.chipselect = imx27pdk_spi_phy_cs,
.num_chipselect = ARRAY_SIZE(imx27pdk_spi_phy_cs),
};
static int imx27pdk_spi_lcd_cs[] = {GPIO_PORTD + 26};
static struct spi_imx_master imx27pdk_spi_0_data = {
.chipselect = imx27pdk_spi_lcd_cs,
.num_chipselect = ARRAY_SIZE(imx27pdk_spi_lcd_cs),
};
static struct spi_board_info imx27pdk_spi_board_info[] = {
{
.name = "LCD",
.max_speed_hz = 3000000,
.bus_num = 0,
.chip_select = 2,
},
{
.name = "mc13783",
.max_speed_hz = 3000000,
.bus_num = 1,
.chip_select = 0,
},
};
spi_register_board_info(imx27pdk_spi_board_info, ARRAY_SIZE(imx27pdk_spi_board_info));
imx27_add_spi0(&imx27pdk_spi_0_data);
imx27_add_spi1(&imx27pdk_spi_1_data);
Is this OK ? I.e. I'm not sure how to use bus_num and chip_select
Filip
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-18 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-18 12:48 SPI devices Vanalme Filip
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox