Hello,
I'm trying to get a STN 320 x 240 4bpp display working and the lcd controller seems to be hating me. It looks like the pl110fb.c driver is really only set up for color TFT panels, so I'm sure that's the source of my problems.
I have been going through what the driver is setting the lcd registers to and either making changes to the panel's lh_info struct or, in some case, modifying code to get it to do what looks to be the right thing (in cases where the code only supports tft panels).
Right now, the crux of my problem is that unless I set the LcdTFT bit in LCDcontrol, the controller doesn't output any clocks whatsoever (frame pulse, pixel clock, etc).
My lh_info structure is:
bpp: 4,
xres: 320, yres: 240,
hsync_len: 13, /* hsw */ vsync_len: 0, /* vsw */
left_margin: 21, /* hbp */ upper_margin: 1, /* vbp */
right_margin: 11, /* hfp */ lower_margin: 1, /* vfp */
sync: 0,
LCDtiming2: 0,
LCDtiming3: 0,
LCDcontrol: LCD_CTRL_BW_MONO,
LCDICPcontrol: LCDICP_CONTROL_CLSEN | LCDICP_CONTROL_SPSEN,
LCDICPsetup: LCDICP_SETUP_VERT_NORMAL | LCDICP_SETUP_HORIZ_NORMAL,
LCDICPtiming1: LCDICP_TIMING1_PSDEL(9) | LCDICP_TIMING1_REVDEL(3) | LCDICP_TIMING1_LPDEL(14),
LCDICPtiming2: LCDICP_TIMING2_PSDEL2(209) | LCDICP_TIMING2_SPLVALUE(34),
The hex values for the various registers:
real LCDupbase = 20260000
real LCDlpbase = 00000000
real LCDtiming0 = 0x140a0c4c
real LCDtiming1 = 0x010100ef
real LCDtiming2 = 0x004f1808
real LCDtiming3 = 0x00000000
real LCDcontrol = 0x00000815
real LCDICPsetup = 0x000013fc
real LCDICPcontrol = 0x00000003
real LCDICPtiming1 = 0x0000082d
real LCDICPtiming2 = 0x000042d0
which I parsed out to be:
LCDcontrol:
WATERMARK: 0
Ldma-FIFOTIME: 0
LcdV-Comp: 0
LcdPwr: 1
BEPO: 0
BEBO: 0
BGR: 0
LcdDual: 0
LcdMono8: 0
LcdTFT: 0
LcdBW: 1
LcdBPP: 2
LcdEn: 1
LCDtiming0:
HBP: 20
HFP: 10
HSW: 12
PPL: 19
Reserved: 4
LCDtiming1:
VBP: 1
VFP: 1
VSW: 0
LPP: 239
LCDtiming2:
BCD: 0
CPL: 79
Reserved: 0
IOE: 0
IPC: 0
IHS: 1
IVS: 1
ACB: 0
Reserved: 0
PCD: 8
From reading sharps' documentation (both the LCD interfacing guide and the processor guide), I think I'm setting up everything correctly. Obviously this is not the case...
As I mentioned earlier, if I set the LcdTFT bit in the control register I do get clocks out (they're not correct, but that's better than nothing).
Does anyone have any idea as to what I'm doing wrong here?
Thanks for any help!
Shannon