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>
18 #include <linux/mfd/tc6393xb.h>
20 #include <video/w100fb.h>
22 #include <asm/setup.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach-types.h>
26 #include <mach/pxa25x.h>
27 #include <mach/eseries-gpio.h>
29 #include <mach/irda.h>
30 #include <mach/irqs.h>
36 /* ---------------------- E750 LCD definitions -------------------- */
38 static struct w100_gen_regs e750_lcd_regs = {
39 .lcd_format = 0x00008003,
40 .lcdd_cntl1 = 0x00000000,
41 .lcdd_cntl2 = 0x0003ffff,
42 .genlcd_cntl1 = 0x00fff003,
43 .genlcd_cntl2 = 0x003c0f03,
44 .genlcd_cntl3 = 0x000143aa,
47 static struct w100_mode e750_lcd_mode = {
54 .crtc_ss = 0x80150014,
55 .crtc_ls = 0x8014000d,
56 .crtc_gs = 0xc1000005,
57 .crtc_vpos_gs = 0x00020147,
58 .crtc_rev = 0x0040010a,
59 .crtc_dclk = 0xa1700030,
60 .crtc_gclk = 0x80cc0015,
61 .crtc_goe = 0x80cc0015,
62 .crtc_ps1_active = 0x61060017,
65 .pixclk_divider_rotated = 4,
66 .pixclk_src = CLK_SRC_XTAL,
68 .sysclk_src = CLK_SRC_PLL,
71 static struct w100_gpio_regs e750_w100_gpio_info = {
72 .init_data1 = 0x01192f1b,
73 .gpio_dir1 = 0xd5ffdeff,
74 .gpio_oe1 = 0x000020bf,
75 .init_data2 = 0x010f010f,
76 .gpio_dir2 = 0xffffffff,
77 .gpio_oe2 = 0x000001cf,
80 static struct w100fb_mach_info e750_fb_info = {
81 .modelist = &e750_lcd_mode,
83 .regs = &e750_lcd_regs,
84 .gpio = &e750_w100_gpio_info,
85 .xtal_freq = 14318000,
89 static struct resource e750_fb_resources[] = {
93 .flags = IORESOURCE_MEM,
97 static struct platform_device e750_fb_device = {
101 .platform_data = &e750_fb_info,
103 .num_resources = ARRAY_SIZE(e750_fb_resources),
104 .resource = e750_fb_resources,
107 /* -------------------- e750 MFP parameters -------------------- */
109 static unsigned long e750_pin_config[] __initdata = {
111 GPIO15_nCS_1, /* CS1 - Flash */
112 GPIO79_nCS_3, /* CS3 - IMAGEON */
113 GPIO80_nCS_4, /* CS4 - TMIO */
123 /* TMIO controller */
124 GPIO19_GPIO, /* t7l66xb #PCLR */
125 GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */
132 GPIO38_GPIO | MFP_LPM_DRIVE_HIGH,
134 /* Audio power control */
135 GPIO4_GPIO, /* Headphone amp power */
136 GPIO7_GPIO, /* Speaker amp power */
137 GPIO37_GPIO, /* Headphone detect */
140 GPIO8_GPIO, /* CD0 */
141 GPIO44_GPIO, /* CD1 */
142 GPIO11_GPIO, /* IRQ0 */
143 GPIO6_GPIO, /* IRQ1 */
144 GPIO27_GPIO, /* RST0 */
145 GPIO24_GPIO, /* RST1 */
146 GPIO20_GPIO, /* PWR0 */
147 GPIO23_GPIO, /* PWR1 */
160 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
163 /* ----------------- e750 tc6393xb parameters ------------------ */
165 static struct tc6393xb_platform_data e750_tc6393xb_info = {
166 .irq_base = IRQ_BOARD_START,
167 .scr_pll2cr = 0x0cc1,
170 .suspend = &eseries_tmio_suspend,
171 .resume = &eseries_tmio_resume,
172 .enable = &eseries_tmio_enable,
173 .disable = &eseries_tmio_disable,
176 static struct platform_device e750_tc6393xb_device = {
180 .platform_data = &e750_tc6393xb_info,
183 .resource = eseries_tmio_resources,
186 /* ------------------------------------------------------------- */
188 static struct platform_device *devices[] __initdata = {
190 &e750_tc6393xb_device,
193 static void __init e750_init(void)
195 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config));
196 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name,
198 eseries_get_tmio_gpios();
199 platform_add_devices(devices, ARRAY_SIZE(devices));
200 pxa_set_udc_info(&e7xx_udc_mach_info);
202 pxa_set_ficp_info(&e7xx_ficp_platform_data);
205 MACHINE_START(E750, "Toshiba e750")
206 /* Maintainer: Ian Molton (spyro@f2s.com) */
207 .phys_io = 0x40000000,
208 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
209 .boot_params = 0xa0000100,
210 .map_io = pxa_map_io,
211 .init_irq = pxa25x_init_irq,
212 .fixup = eseries_fixup,
213 .init_machine = e750_init,