[Arm-netbook] CT-PC89E: 8.9in LCD settings for B089AW01 V.1

Luke Kenneth Casson Leighton luke.leighton at googlemail.com
Tue Mar 9 18:38:13 GMT 2010


following close examination of the disassembly listing, and a bit of
guess-work as to the offsets of s3c_fimd_struct_t members in the
linux-2.6.24.7-smartq20091105/drivers/video/s3c/s3cfb.h header file,
i've established the following parameters:

pixclock = 0x2a10494

S3C_FB_HFP = 100
S3C_FB_HSW = 1
S3C_FB_HBP = 40

S3C_FB_VFP = 20
S3C_FB_VSW = 2
S3C_FB_VBP = 9

S3C_FB_VFRAME_FREQ = 60

S3C_FB_HRES = 1024
S3C_FB_VRES = 600

def S3C_VIDOSDxA_OSD_LTX_F(x): return (((x)&0x7FF)<<11)
def S3C_VIDOSDxB_OSD_RBX_F(x): return           (((x)&0x7FF)<<11)
def S3C_VIDOSDxB_OSD_RBY_F(x): return           (((x)&0x7FF)<<0)
def S3C_VIDTCON2_LINEVAL(x): return             (((x)&0x7FF)<<11)
def S3C_VIDTCON2_HOZVAL(x): return              (((x)&0x7FF)<<0)


S3C_FB_PIXEL_CLOCK = (S3C_FB_VFRAME_FREQ * (S3C_FB_HFP + S3C_FB_HSW +
S3C_FB_HBP + S3C_FB_HRES) * (S3C_FB_VFP + S3C_FB_VSW + S3C_FB_VBP +
S3C_FB_VRES))

print hex( S3C_VIDTCON2_LINEVAL(S3C_FB_VRES - 1) |
S3C_VIDTCON2_HOZVAL(S3C_FB_HRES - 1))
print hex(S3C_VIDOSDxB_OSD_RBX_F(S3C_FB_HRES - 1) |
S3C_VIDOSDxB_OSD_RBY_F(S3C_FB_VRES - 1))

print pixclock, S3C_FB_PIXEL_CLOCK


it's also possible to establish, from this:

RAM:C0150B4C                 LDR     R0, =0xF6800000
RAM:C0150B50                 LDR     R3, =0xF4C08000
RAM:C0150B54                 MOV     R2, #0
RAM:C0150B58                 LDR     R1, =0xF4600000
....
....

that whoever wrote the lcd driver for this device is ... and i'm being
polite here ... a FUCKING KNOB.  the correct function to use for
setting GPIO is gpio_set_value() - a function which carefully protects
the GPIO values by doing locking so that you don't get race conditions
- and ... 0xF6800000 is the S3C_VA_SYSCON what the FUCK i don't even
know what S3C_VA_SYSCON is but its name sounds bad if you mess with
it.

*sigh*.

ok.  i'll extract the syscon and gpio pin setup.  i'm fairly certain
that those are the correct LCD parameters.

l.



More information about the Arm-netbook mailing list