Hi,
I am trying to get an image showing on a LCD panel very early in the boot process.
We are using a custom OMAP138 board and the LCD works in Linux.
The image i'm trying to show is 16bbp and the screen size 320x240 pixels. The setup code (see below) power up LCDC, loads the image and a 32 byte "palette" to address 0xC1F00000 and then modifies the LCDC registers. Most of the register values are the values obtained using a JTAG debugger when Linux is displaying an image.
// Add power to LCDC module
DEVICE_LPSCTransition(PSCNUM1, LPSC_LCDC, PD0, PSC_ENABLE);
framebuffer = (unsigned short*)0xC1F00000;
memset(framebuffer, 0, 32);
*framebuffer = 0x4000; // 16-bpp mode
framebuffer += 16;
// Load image into framebuffer
...
// Increase priority of LCD controller
SYSTEM->MSTPRI[2] &= 0x0FFFFFFF;
// Setup LCD registers
LCD_CNTL->RASTER_CTRL = 0x000FF080; // Disable raster controller
LCD_CNTL->LCD_CTRL = 0x00001701;
LCD_CNTL->RASTER_TIMING_0 = 0x44140930;
LCD_CNTL->RASTER_TIMING_1 = 0x120408EF;
LCD_CNTL->RASTER_TIMING_2 = 0x0100FF00;
LCD_CNTL->RASTER_SUBPANEL = 0x00000000;
LCD_CNTL->LCDDMA_CTRL = 0x00000640;
LCD_CNTL->LCDDMA_FB0_BASE = 0xC1F00000;
LCD_CNTL->LCDDMA_FB0_CEILING = 0xC1F00000+32+2*320*240-4;
LCD_CNTL->LCDDMA_FB1_BASE = 0x00000000;
LCD_CNTL->LCDDMA_FB1_CEILING = 0x00000000;
LCD_CNTL->RASTER_CTRL = 0x000FF081;
I have measured VSYNC and HSYNC using an oscilloscope and the signals have the same frequency as as when Linux is running. The LCD is showing a completely white image (which it also does without any of my LCD code in the UBL).
The register values obtained in u-boot:
U-Boot > md.l
0x01e13000 18
01e13000:
4c100102 00001701 00000140 00000000 ...L....@.......
01e13010: 00220044
0000ffff 0000ffff 00220044 D.".........D.".
01e13020:
0000ffff 0000ffff 000ff081 44140930 ............0..D
01e13030:
120408ef 0100ff00 00000000 00000000 ................
01e13040:
00000640 c1f00000 c1f2581c 00000000 @........X......
01e13050:
00000000 00000012 00000000 00000000 ................
Any idea what i'm missing to get the LCD working?
Best regards,
Daniel