Commit | Line | Data |
---|---|---|
7dc96414 IM |
1 | /* |
2 | * Hardware definitions for the Toshiba eseries PDAs | |
3 | * | |
4 | * Copyright (c) 2003 Ian Molton <spyro@f2s.com> | |
5 | * | |
6 | * This file is licensed under | |
7 | * the terms of the GNU General Public License version 2. This program | |
8 | * is licensed "as is" without any warranty of any kind, whether express | |
9 | * or implied. | |
10 | * | |
11 | */ | |
12 | ||
13 | #include <linux/kernel.h> | |
14 | #include <linux/init.h> | |
0ec3cf69 IM |
15 | #include <linux/device.h> |
16 | #include <linux/platform_device.h> | |
17 | #include <linux/fb.h> | |
18 | ||
19 | #include <video/w100fb.h> | |
7dc96414 IM |
20 | |
21 | #include <asm/setup.h> | |
22 | #include <asm/mach/arch.h> | |
23 | #include <asm/mach-types.h> | |
24 | ||
25 | #include <mach/mfp-pxa25x.h> | |
26 | #include <mach/hardware.h> | |
ebcce7b1 | 27 | #include <mach/udc.h> |
7dc96414 IM |
28 | |
29 | #include "generic.h" | |
30 | #include "eseries.h" | |
31 | ||
0ec3cf69 IM |
32 | /* ---------------------- E750 LCD definitions -------------------- */ |
33 | ||
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, | |
41 | }; | |
42 | ||
43 | static struct w100_mode e750_lcd_mode = { | |
44 | .xres = 240, | |
45 | .yres = 320, | |
46 | .left_margin = 21, | |
47 | .right_margin = 22, | |
48 | .upper_margin = 5, | |
49 | .lower_margin = 4, | |
50 | .crtc_ss = 0x80150014, | |
51 | .crtc_ls = 0x8014000d, | |
52 | .crtc_gs = 0xc1000005, | |
53 | .crtc_vpos_gs = 0x00020147, | |
54 | .crtc_rev = 0x0040010a, | |
55 | .crtc_dclk = 0xa1700030, | |
56 | .crtc_gclk = 0x80cc0015, | |
57 | .crtc_goe = 0x80cc0015, | |
58 | .crtc_ps1_active = 0x61060017, | |
59 | .pll_freq = 57, | |
60 | .pixclk_divider = 4, | |
61 | .pixclk_divider_rotated = 4, | |
62 | .pixclk_src = CLK_SRC_XTAL, | |
63 | .sysclk_divider = 1, | |
64 | .sysclk_src = CLK_SRC_PLL, | |
65 | }; | |
66 | ||
67 | static struct w100_gpio_regs e750_w100_gpio_info = { | |
68 | .init_data1 = 0x01192f1b, | |
69 | .gpio_dir1 = 0xd5ffdeff, | |
70 | .gpio_oe1 = 0x000020bf, | |
71 | .init_data2 = 0x010f010f, | |
72 | .gpio_dir2 = 0xffffffff, | |
73 | .gpio_oe2 = 0x000001cf, | |
74 | }; | |
75 | ||
76 | static struct w100fb_mach_info e750_fb_info = { | |
77 | .modelist = &e750_lcd_mode, | |
78 | .num_modes = 1, | |
79 | .regs = &e750_lcd_regs, | |
80 | .gpio = &e750_w100_gpio_info, | |
81 | .xtal_freq = 14318000, | |
82 | .xtal_dbl = 1, | |
83 | }; | |
84 | ||
85 | static struct resource e750_fb_resources[] = { | |
86 | [0] = { | |
87 | .start = 0x0c000000, | |
88 | .end = 0x0cffffff, | |
89 | .flags = IORESOURCE_MEM, | |
90 | }, | |
91 | }; | |
92 | ||
93 | static struct platform_device e750_fb_device = { | |
94 | .name = "w100fb", | |
95 | .id = -1, | |
96 | .dev = { | |
97 | .platform_data = &e750_fb_info, | |
98 | }, | |
99 | .num_resources = ARRAY_SIZE(e750_fb_resources), | |
100 | .resource = e750_fb_resources, | |
101 | }; | |
102 | ||
103 | /* ----------------------------------------------------------------------- */ | |
104 | ||
105 | static struct platform_device *devices[] __initdata = { | |
106 | &e750_fb_device, | |
107 | }; | |
108 | ||
109 | static void __init e750_init(void) | |
110 | { | |
111 | platform_add_devices(devices, ARRAY_SIZE(devices)); | |
ebcce7b1 | 112 | pxa_set_udc_info(&e7xx_udc_mach_info); |
0ec3cf69 IM |
113 | } |
114 | ||
7dc96414 IM |
115 | MACHINE_START(E750, "Toshiba e750") |
116 | /* Maintainer: Ian Molton (spyro@f2s.com) */ | |
117 | .phys_io = 0x40000000, | |
118 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | |
119 | .boot_params = 0xa0000100, | |
120 | .map_io = pxa_map_io, | |
121 | .init_irq = pxa25x_init_irq, | |
122 | .fixup = eseries_fixup, | |
0ec3cf69 | 123 | .init_machine = e750_init, |
7dc96414 IM |
124 | .timer = &pxa_timer, |
125 | MACHINE_END | |
126 |