This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM37x SPI config

Other Parts Discussed in Thread: DM3730, ADS7846

Hi,


im trying to config an LCD driver for DM3730 in ../arch/arm/mach-omap2/board-omap3logic.c

do i need to config an spi_board_info and set its parameters or can i just create a new driver in a new file using just spi_device instead?

*the driver has to be a module with init and exit functions so im not sure if its even possible to configure it via board-omap3logic.c...:/

Thanks!

  • What is the interface of LCD and make ?
    It should have 2 interface , one for command (ex: SPI) and data interface (ex: RGB)
    Yes, you have to put entry for SPI init and video stuff in board file.
  • its an RGB interface.
    if i set the spi_boar_info in board-omap3logic.c , how will the board know to match the specific SPI (SPI4_CS0) to the
    LCD?

    can you give an example for the parameters on both files?

    the LCD must run a configuration for addresses and values in the initialization so there must be an additional spi device driver,
    i have to make sure the definitions in those files wont collide..
  • the LCD must run a configuration for addresses and values in the initialization so there must be an additional spi device driver,
    i have to make sure the definitions in those files wont collide..

    Yep, you are right.

    You have to refer the LCD data sheet to initialize the LCD.

    if i set the spi_boar_info in board-omap3logic.c , how will the board know to match the specific SPI (SPI4_CS0) to the
    LCD?

    You need to initialize the appropriate SPI instance (SPI4)

    Ex:

    struct spi_board_info omap3evm_spi_board_info[] = {
        [0] = {
            .bus_num        = 1,
            .chip_select        = 0,
            .max_speed_hz        = 1500000,
            .controller_data    = &ads7846_mcspi_config,
            .platform_data        = &ads7846_config,
        },
    };

  • great, thank you very much!

    btw it didnt require a platform data config :)