2 * Hardware definitions for the Toshiba eseries PDAs
4 * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
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
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/device.h>
16 #include <linux/platform_device.h>
19 #include <video/w100fb.h>
21 #include <asm/setup.h>
22 #include <asm/mach/arch.h>
23 #include <asm/mach-types.h>
25 #include <mach/mfp-pxa25x.h>
26 #include <mach/hardware.h>
32 /* ------------------------ e740 video support --------------------------- */
34 static struct w100_gen_regs e740_lcd_regs = {
35 .lcd_format = 0x00008023,
36 .lcdd_cntl1 = 0x0f000000,
37 .lcdd_cntl2 = 0x0003ffff,
38 .genlcd_cntl1 = 0x00ffff03,
39 .genlcd_cntl2 = 0x003c0f03,
40 .genlcd_cntl3 = 0x000143aa,
43 static struct w100_mode e740_lcd_mode = {
50 .crtc_ss = 0x80140013,
51 .crtc_ls = 0x81150110,
52 .crtc_gs = 0x80050005,
53 .crtc_vpos_gs = 0x000a0009,
54 .crtc_rev = 0x0040010a,
55 .crtc_dclk = 0xa906000a,
56 .crtc_gclk = 0x80050108,
57 .crtc_goe = 0x80050108,
60 .pixclk_divider_rotated = 4,
61 .pixclk_src = CLK_SRC_XTAL,
63 .sysclk_src = CLK_SRC_PLL,
64 .crtc_ps1_active = 0x41060010,
67 static struct w100_gpio_regs e740_w100_gpio_info = {
68 .init_data1 = 0x21002103,
69 .gpio_dir1 = 0xffffdeff,
70 .gpio_oe1 = 0x03c00643,
71 .init_data2 = 0x003f003f,
72 .gpio_dir2 = 0xffffffff,
73 .gpio_oe2 = 0x000000ff,
76 static struct w100fb_mach_info e740_fb_info = {
77 .modelist = &e740_lcd_mode,
79 .regs = &e740_lcd_regs,
80 .gpio = &e740_w100_gpio_info,
81 .xtal_freq = 14318000,
85 static struct resource e740_fb_resources[] = {
89 .flags = IORESOURCE_MEM,
93 static struct platform_device e740_fb_device = {
97 .platform_data = &e740_fb_info,
99 .num_resources = ARRAY_SIZE(e740_fb_resources),
100 .resource = e740_fb_resources,
103 /* --------------------------- MFP Pin config -------------------------- */
105 static unsigned long e740_pin_config[] __initdata = {
107 GPIO15_nCS_1, /* CS1 - Flash */
108 GPIO79_nCS_3, /* CS3 - IMAGEON */
109 GPIO80_nCS_4, /* CS4 - TMIO */
118 GPIO45_GPIO, /* Used by TMIO for #SUSPEND */
121 GPIO8_GPIO, /* CD0 */
122 GPIO44_GPIO, /* CD1 */
123 GPIO11_GPIO, /* IRQ0 */
124 GPIO6_GPIO, /* IRQ1 */
125 GPIO27_GPIO, /* RST0 */
126 GPIO24_GPIO, /* RST1 */
127 GPIO20_GPIO, /* PWR0 */
128 GPIO23_GPIO, /* PWR1 */
141 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
144 /* ----------------------------------------------------------------------- */
146 static struct platform_device *devices[] __initdata = {
150 static void __init e740_init(void)
152 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
153 platform_add_devices(devices, ARRAY_SIZE(devices));
156 MACHINE_START(E740, "Toshiba e740")
157 /* Maintainer: Ian Molton (spyro@f2s.com) */
158 .phys_io = 0x40000000,
159 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
160 .boot_params = 0xa0000100,
161 .map_io = pxa_map_io,
162 .init_irq = pxa25x_init_irq,
163 .fixup = eseries_fixup,
164 .init_machine = e740_init,