5 * This file contains the definitions for the LCD timings and functions
6 * to control the LCD power / frontlighting via the w100fb driver.
10 #include <linux/module.h>
11 #include <linux/init.h>
12 #include <linux/kernel.h>
13 #include <linux/tty.h>
14 #include <linux/sched.h>
15 #include <linux/delay.h>
17 #include <linux/lcd.h>
18 #include <linux/backlight.h>
20 #include <linux/err.h>
21 #include <linux/platform_device.h>
24 #include <asm/mach-types.h>
25 #include <asm/hardware.h>
26 #include <asm/setup.h>
28 #include <asm/mach/arch.h>
29 #include <asm/arch/pxa-regs.h>
30 #include <asm/arch/eseries-gpio.h>
32 #include <video/w100fb.h>
34 static struct w100_gen_regs e750_lcd_regs
= {
35 .lcd_format
= 0x00008003,
36 .lcdd_cntl1
= 0x00000000,
37 .lcdd_cntl2
= 0x0003ffff,
38 .genlcd_cntl1
= 0x00fff003,
39 .genlcd_cntl2
= 0x003c0f03,
40 .genlcd_cntl3
= 0x000143aa,
43 static struct w100_mode e750_lcd_mode
= {
51 .crtc_ss
= 0x80150014,
52 .crtc_ls
= 0x8014000d,
53 .crtc_gs
= 0xc1000005,
54 .crtc_vpos_gs
= 0x00020147,
55 .crtc_rev
= 0x0040010a,
56 .crtc_dclk
= 0xa1700030,
57 .crtc_gclk
= 0x80cc0015,
58 .crtc_goe
= 0x80cc0015,
59 .crtc_ps1_active
= 0x61060017,
62 .pixclk_divider_rotated
= 4,
63 .pixclk_src
= CLK_SRC_XTAL
,
65 .sysclk_src
= CLK_SRC_PLL
,
69 static struct w100_gpio_regs e750_w100_gpio_info
= {
70 .init_data1
= 0x01192f1b,
71 .gpio_dir1
= 0xd5ffdeff,
72 .gpio_oe1
= 0x000020bf,
73 .init_data2
= 0x010f010f,
74 .gpio_dir2
= 0xffffffff,
75 .gpio_oe2
= 0x000001cf,
78 static struct w100fb_mach_info e750_fb_info
= {
79 .modelist
= &e750_lcd_mode
,
81 .regs
= &e750_lcd_regs
,
82 .gpio
= &e750_w100_gpio_info
,
83 .xtal_freq
= 14318000,
87 static struct resource e750_fb_resources
[] = {
91 .flags
= IORESOURCE_MEM
,
95 /* ----------------------- device declarations -------------------------- */
98 static struct platform_device e750_fb_device
= {
102 .platform_data
= &e750_fb_info
,
104 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
105 .resource
= e750_fb_resources
,
109 static struct platform_device e750_lcd_hook_device
= {
110 .name
= "e750-lcd-hook",
112 .parent
= &e750_fb_device
.dev
,
118 static int e750_lcd_init (void) {
121 if (!machine_is_e750 ())
124 if((ret
= platform_device_register(&e750_fb_device
)))
127 // platform_device_register(&e750_lcd_hook_device);
132 static void e750_lcd_exit (void)
134 //FIXME - free the platform dev for the w100 (imageon)
137 module_init (e750_lcd_init
);
138 module_exit (e750_lcd_exit
);
140 MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
141 MODULE_DESCRIPTION("e750 lcd driver");
142 MODULE_LICENSE("GPLv2");