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:
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 */
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:
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!