24bit LCD for BBB

From eLinux.org
Jump to: navigation, search

The BeagleBone Black (BBB) uses Texas Instrument's AM335x processor, which supports up to 24-bit data output (8 bits per pixel); however, most LCD capes for the BeagleBone Black is configured at 16-bit mode as using 24-bit data output will limit the number of pins on the expansion headers for other capes. If for any reason you would like to have the TFT parallel interface in 24-bit mode, you can try a few things below.


Note: The configuration below is done on Angstrom linux Linux beaglebone 3.8.13 #1 SMP Wed Sep 4 09:09:32 CEST 2013 armv7l GNU/Linux


Hardware configuration

The AM335x has an errata for color assignments of LCD_DATA signals. These color assignments are different between 16-bit and 24-bit modes. To get a 24-bit output mode, the LCD_DATA signals need to be connected to the LCD panel as follow.


BeagleBone LCD Cape


Device tree configuration

Each pin on the BBB's expansion connectors (P8 and P9) can be configured to have different functionality. To provide the TFT interface, the pins that correspond to the TFT signals need to be configured as LCD function. An example of this can be seen on the device tree overlay for the LCD4 Cape. To change from 16-bit to 24-bit mode, the upper 8 bits of the TFT signals need to be added to the device tree overlay. Add something like this to the pinmux configuration for your LCD:


0x3c 0x09 /* lcd_data16.lcd_data16, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0x38 0x09 /* lcd_data17.lcd_data17, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0x34 0x09 /* lcd_data18.lcd_data18, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0x30 0x09 /* lcd_data19.lcd_data19, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0x2c 0x09 /* lcd_data20.lcd_data20, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0x28 0x09 /* lcd_data21.lcd_data21, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0x24 0x09 /* lcd_data22.lcd_data22, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0x20 0x09 /* lcd_data23.lcd_data23, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */


To avoid conflict with other capes that use these pins, add this to the exclusive-use of the overlay:

"P8.15", /* lcd: lcd_data16 */
"P8.16", /* lcd: lcd_data17 */
"P8.11", /* lcd: lcd_data18 */
"P8.12", /* lcd: lcd_data19 */
"P8.17", /* lcd: lcd_data20 */
"P8.14", /* lcd: lcd_data21 */
"P8.13", /* lcd: lcd_data22 */
"P8.19", /* lcd: lcd_data23 */


In your panel-info {}, change the bpp to <24>.


Additional Settings

  • If you are using X, in the X configuration file change the DefaultDepth option under Screen to 24. The X configuration file can usually be found at /etc/X11/xorg.conf.
  • You can also change the Kernel Mode Settings (KMS) by passing something like video=LVDS-1@1024x768-24@60 to the kernel command line, in which:
    • LVDS-1: DRM connector (similar to DVI, HDMI, etc)
    • 1024x768: screen resolution
    • 24: color depth (24-bit)
    • 60: refresh rate