SPI devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux