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/clk.h>
19 #include <linux/mfd/t7l66xb.h>
21 #include <video/w100fb.h>
23 #include <asm/setup.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach-types.h>
27 #include <mach/mfp-pxa25x.h>
28 #include <mach/pxa-regs.h>
29 #include <mach/hardware.h>
30 #include <mach/eseries-gpio.h>
32 #include <mach/irda.h>
33 #include <mach/irqs.h>
40 /* ------------------------ e740 video support --------------------------- */
42 static struct w100_gen_regs e740_lcd_regs = {
43 .lcd_format = 0x00008023,
44 .lcdd_cntl1 = 0x0f000000,
45 .lcdd_cntl2 = 0x0003ffff,
46 .genlcd_cntl1 = 0x00ffff03,
47 .genlcd_cntl2 = 0x003c0f03,
48 .genlcd_cntl3 = 0x000143aa,
51 static struct w100_mode e740_lcd_mode = {
58 .crtc_ss = 0x80140013,
59 .crtc_ls = 0x81150110,
60 .crtc_gs = 0x80050005,
61 .crtc_vpos_gs = 0x000a0009,
62 .crtc_rev = 0x0040010a,
63 .crtc_dclk = 0xa906000a,
64 .crtc_gclk = 0x80050108,
65 .crtc_goe = 0x80050108,
68 .pixclk_divider_rotated = 4,
69 .pixclk_src = CLK_SRC_XTAL,
71 .sysclk_src = CLK_SRC_PLL,
72 .crtc_ps1_active = 0x41060010,
75 static struct w100_gpio_regs e740_w100_gpio_info = {
76 .init_data1 = 0x21002103,
77 .gpio_dir1 = 0xffffdeff,
78 .gpio_oe1 = 0x03c00643,
79 .init_data2 = 0x003f003f,
80 .gpio_dir2 = 0xffffffff,
81 .gpio_oe2 = 0x000000ff,
84 static struct w100fb_mach_info e740_fb_info = {
85 .modelist = &e740_lcd_mode,
87 .regs = &e740_lcd_regs,
88 .gpio = &e740_w100_gpio_info,
89 .xtal_freq = 14318000,
93 static struct resource e740_fb_resources[] = {
97 .flags = IORESOURCE_MEM,
101 static struct platform_device e740_fb_device = {
105 .platform_data = &e740_fb_info,
107 .num_resources = ARRAY_SIZE(e740_fb_resources),
108 .resource = e740_fb_resources,
111 /* --------------------------- MFP Pin config -------------------------- */
113 static unsigned long e740_pin_config[] __initdata = {
115 GPIO15_nCS_1, /* CS1 - Flash */
116 GPIO79_nCS_3, /* CS3 - IMAGEON */
117 GPIO80_nCS_4, /* CS4 - TMIO */
127 /* TMIO controller */
128 GPIO19_GPIO, /* t7l66xb #PCLR */
129 GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */
136 GPIO38_GPIO | MFP_LPM_DRIVE_HIGH,
139 GPIO8_GPIO, /* CD0 */
140 GPIO44_GPIO, /* CD1 */
141 GPIO11_GPIO, /* IRQ0 */
142 GPIO6_GPIO, /* IRQ1 */
143 GPIO27_GPIO, /* RST0 */
144 GPIO24_GPIO, /* RST1 */
145 GPIO20_GPIO, /* PWR0 */
146 GPIO23_GPIO, /* PWR1 */
159 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
162 /* -------------------- e740 t7l66xb parameters -------------------- */
164 static struct t7l66xb_platform_data e740_t7l66xb_info = {
165 .irq_base = IRQ_BOARD_START,
166 .enable = &eseries_tmio_enable,
167 .suspend = &eseries_tmio_suspend,
168 .resume = &eseries_tmio_resume,
171 static struct platform_device e740_t7l66xb_device = {
175 .platform_data = &e740_t7l66xb_info,
178 .resource = eseries_tmio_resources,
181 /* ----------------------------------------------------------------------- */
183 static struct platform_device *devices[] __initdata = {
185 &e740_t7l66xb_device,
188 static void __init e740_init(void)
190 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
191 eseries_register_clks();
192 clk_add_alias("CLK_CK48M", &e740_t7l66xb_device.dev,
193 "UDCCLK", &pxa25x_device_udc.dev),
194 eseries_get_tmio_gpios();
195 platform_add_devices(devices, ARRAY_SIZE(devices));
196 pxa_set_udc_info(&e7xx_udc_mach_info);
198 pxa_set_ficp_info(&e7xx_ficp_platform_data);
201 MACHINE_START(E740, "Toshiba e740")
202 /* Maintainer: Ian Molton (spyro@f2s.com) */
203 .phys_io = 0x40000000,
204 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
205 .boot_params = 0xa0000100,
206 .map_io = pxa_map_io,
207 .init_irq = pxa25x_init_irq,
208 .fixup = eseries_fixup,
209 .init_machine = e740_init,