This document depicts the bootloader's display subsystem, base on BSP v13.05
Part 1: related files
a. target/tcc893x_evm/rules.mk
1. (DEFINES += FLD0800 # 1024x600
/* Display Device, the interface might be LCD or LVDS */
2. TCC_LCD_USE := 1 ... TCC_HDMI_USE := 1
/* If the system support LCD, HDMI output */
3. DEFINES += DEFAULT_DISPLAY_LCD
/* What is the DEFAULT output? */
NOTE: Eventually, such definitions will be put into file BUILD/config.h
b. platform/tcc_shared/include/lcd.h
c. platform/tccPLATFORM/lcdc.c
d. platform/tcc_shared/lcd_DEVICE.c
Part 2: Workflow
1. First of all, USER need to modify file 'a' in Part 1, rules.mk, according to the actual panel in use.
2. Next, according to DEFAULT_DISPLAY_XXX and TCC_XXX_USE and DEVICE,
the lcd.h defines BOOT_USE_XXX (LCD/LVDS/HDMI).
such DEFINATION is used by lcdc.c.
3. file d in Part 1, lcd_DEVICE.c, is panel's driver.
Part 3: Panel Device Driver
A device driver must:
1. Reside in specific lcd_DEVICE.c file at platform/tcc_shared.
2. Define device structure, DEVICE_panel
a. Device's hardware parameters.
b. Define interface:
DEVICE_panel_init,
DEVICE_set_power,
DEVICE_set_backlight_level
3. Register device to system.
4. According to the hardware interface, LVCS or LCD, modify lcd.h.
Part 4: HDMI output
1. If the HDMI output is selected by file 'a' in Part 1.
the platform/tcc_shared/include/lcd/HDMI_TCC.h must be include. (in lcd.h)
HDMI_TCC.h pre-defines 14 HDMI output modes, the user select one of the
modes by means of define macro, HDMI_VIDEO_MODE_TYPE
2. User can choose to select DEFAULT_DISPLAY_HDMI in file 'a' to make the
system boot with HDMI output (BOOT_USE_HDMI, lcd.h).
File pca953x.c handles the rest of the work.
3. Related files:
platform/tcc893x/hdmi.c
platform/tcc893x/lcdc.c
Part 5: Run Time
System power up ->
display_init() /* platform/tcc893x/platform.c */ ->
lcdc_init() /* platform/tcc893x/lcdc.c */ ->
PANEL.init() /* platform/tcc_shared/lcd_NAME.c, the .init() defined in the
lcdc_initialize() /*platform/tcc893x/tcc_lcd_interface.c,
this function will setup lcdc registers according to lcd_panel */
NOTE: according to above description, we can see that the most important
thing is to define the lcd_panel correctly. The .set_power function will
configure registers accordingly.
Part 1: related files
a. target/tcc893x_evm/rules.mk
1. (DEFINES += FLD0800 # 1024x600
/* Display Device, the interface might be LCD or LVDS */
2. TCC_LCD_USE := 1 ... TCC_HDMI_USE := 1
/* If the system support LCD, HDMI output */
3. DEFINES += DEFAULT_DISPLAY_LCD
/* What is the DEFAULT output? */
NOTE: Eventually, such definitions will be put into file BUILD/config.h
b. platform/tcc_shared/include/lcd.h
c. platform/tccPLATFORM/lcdc.c
d. platform/tcc_shared/lcd_DEVICE.c
Part 2: Workflow
1. First of all, USER need to modify file 'a' in Part 1, rules.mk, according to the actual panel in use.
2. Next, according to DEFAULT_DISPLAY_XXX and TCC_XXX_USE and DEVICE,
the lcd.h defines BOOT_USE_XXX (LCD/LVDS/HDMI).
such DEFINATION is used by lcdc.c.
3. file d in Part 1, lcd_DEVICE.c, is panel's driver.
Part 3: Panel Device Driver
A device driver must:
1. Reside in specific lcd_DEVICE.c file at platform/tcc_shared.
2. Define device structure, DEVICE_panel
a. Device's hardware parameters.
b. Define interface:
DEVICE_panel_init,
DEVICE_set_power,
DEVICE_set_backlight_level
3. Register device to system.
4. According to the hardware interface, LVCS or LCD, modify lcd.h.
Part 4: HDMI output
1. If the HDMI output is selected by file 'a' in Part 1.
the platform/tcc_shared/include/lcd/HDMI_TCC.h must be include. (in lcd.h)
HDMI_TCC.h pre-defines 14 HDMI output modes, the user select one of the
modes by means of define macro, HDMI_VIDEO_MODE_TYPE
2. User can choose to select DEFAULT_DISPLAY_HDMI in file 'a' to make the
system boot with HDMI output (BOOT_USE_HDMI, lcd.h).
File pca953x.c handles the rest of the work.
3. Related files:
platform/tcc893x/hdmi.c
platform/tcc893x/lcdc.c
Part 5: Run Time
System power up ->
display_init() /* platform/tcc893x/platform.c */ ->
lcdc_init() /* platform/tcc893x/lcdc.c */ ->
PANEL.init() /* platform/tcc_shared/lcd_NAME.c, the .init() defined in the
structure lcd_panel */
and
lcdc_initialize() /*platform/tcc893x/tcc_lcd_interface.c,
this function will setup lcdc registers according to lcd_panel */
NOTE: according to above description, we can see that the most important
thing is to define the lcd_panel correctly. The .set_power function will
configure registers accordingly.