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.

AM335x: How to add a new LCD driver to Linux?

Other Parts Discussed in Thread: AM3359, DA8XX

Hi forum,

here I have a custom board based on a TI Sitara AM3359. Now I want to use a LG 7 inch LCD (LB070WV8) with this board.

I have read the part about adding LCD support on the Sitara Linux Training site (http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Linux_Board_Port#Adding_LCD_and_Touchscreen_Support). As I understand there, I have to edit the following structs in my board file to the correct values for my LCD:

  • static struct platform_pwm_backlight_data bbcape7lcd_backlight_data
  • static const struct display_panel bbcape7_panel
  • static struct lcd_ctrl_config bbcape7_cfg
  • struct da8xx_lcdc_platform_data bbcape7_pdata
And of course the correct pinmux settings:
  • static struct pinmux_config ehrpwm_pin_mux[]
  • static struct pinmux_config bbcape7_pin_mux[]
I also have to add my LCD to static struct da8xx_panel known_lcd_panels[] in drivers/video/da8xx-fb.c.
Is this correct so far?
LG 7 TFT.pdf
  • Ok, I learned that it is enough to put the correct values of my LCD in static struct da8xx_panel known_lcd_panels[] in drivers/video/da8xx-fb.c. Also static const struct display_panel bbcape7_panel in my board file has to be correct. The other files are more LCD controller related, not so much LCD panel related.

  • Hi Andre Bachmann,

                I am trying to interface 7 inch TFT to am335x so pls guide me where  i have to modify my progran , i have madw changes in  da8xx-fb.c  file and da8xx-fb.h but  i got an error   error dev/fb0:No such device

     

    Thanks for your Support

  • Hi Praveen,


    ok, I will try to help you. At first, I modified the following files from the Linux kernel sources:

    • drivers/video/da8xx-fb.c (here I defined the display)
    • arch/arm/mach-omap2/board-am335xevm.c (the board file itself)

    In da8xx-fb.c I added my display's definition to static struct da8xx_panel known_lcd_panels[]. You will need a good datasheet to get all the required information, or you have to guess - preferably having a good datasheet is the way to go.

    In the board file you have to:

    1. define the pinmux for the connection between AM335x's display controller and your display (attention: do not completely trust the defined pins in arch/arm/mach-omap2/mux33xx.c - I found several errors in this file. Read the documentation of TI's AM335x chip if you encounter any problems.) - (static struct pinmux_config lcd_disp_pin_mux[])
    2. configure the LCD controller to use your display correctly (static struct lcd_ctrl_config display_cfg)
    3. provide the LCD platform data (struct da8xx_lcdc_platform_data disp_LG7_pdata)
    4. optional: configure the backlight of the LCD if you want it to control with your software - this means pinmux, configuration and enabling of the PWM unit

    I can show you my board file so that you get another example (besides TI's examples), but I'm not completely sure if that will really help you. Please say so if you want to have it.

  • Hi Andre Bachmann,

        Yes it really helpful for me pls do attach the necessary files , so that it is easy for me to configure the TFT ;

    By configuring  these files is I am able to interface any size if TFT either Smallest or Biggest One .

    Thanks for your time and your kindness.

  • I have attached the board file (board-am335xevm.c), the slightly enhanced video driver file (da8xx-fb.c) and a modified mux file (mux33xx.c). On my last reply I outlined the most important steps for integrating a new display to your Linux kernel. These files are based on the TI SDK 05.05.01.

    linux.zip