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/pxa25x.h>
28 #include <mach/eseries-gpio.h>
30 #include <mach/irda.h>
31 #include <mach/irqs.h>
32 #include <mach/audio.h>
39 /* ------------------------ e740 video support --------------------------- */
41 static struct w100_gen_regs e740_lcd_regs
= {
42 .lcd_format
= 0x00008023,
43 .lcdd_cntl1
= 0x0f000000,
44 .lcdd_cntl2
= 0x0003ffff,
45 .genlcd_cntl1
= 0x00ffff03,
46 .genlcd_cntl2
= 0x003c0f03,
47 .genlcd_cntl3
= 0x000143aa,
50 static struct w100_mode e740_lcd_mode
= {
57 .crtc_ss
= 0x80140013,
58 .crtc_ls
= 0x81150110,
59 .crtc_gs
= 0x80050005,
60 .crtc_vpos_gs
= 0x000a0009,
61 .crtc_rev
= 0x0040010a,
62 .crtc_dclk
= 0xa906000a,
63 .crtc_gclk
= 0x80050108,
64 .crtc_goe
= 0x80050108,
67 .pixclk_divider_rotated
= 4,
68 .pixclk_src
= CLK_SRC_XTAL
,
70 .sysclk_src
= CLK_SRC_PLL
,
71 .crtc_ps1_active
= 0x41060010,
74 static struct w100_gpio_regs e740_w100_gpio_info
= {
75 .init_data1
= 0x21002103,
76 .gpio_dir1
= 0xffffdeff,
77 .gpio_oe1
= 0x03c00643,
78 .init_data2
= 0x003f003f,
79 .gpio_dir2
= 0xffffffff,
80 .gpio_oe2
= 0x000000ff,
83 static struct w100fb_mach_info e740_fb_info
= {
84 .modelist
= &e740_lcd_mode
,
86 .regs
= &e740_lcd_regs
,
87 .gpio
= &e740_w100_gpio_info
,
88 .xtal_freq
= 14318000,
92 static struct resource e740_fb_resources
[] = {
96 .flags
= IORESOURCE_MEM
,
100 static struct platform_device e740_fb_device
= {
104 .platform_data
= &e740_fb_info
,
106 .num_resources
= ARRAY_SIZE(e740_fb_resources
),
107 .resource
= e740_fb_resources
,
110 /* --------------------------- MFP Pin config -------------------------- */
112 static unsigned long e740_pin_config
[] __initdata
= {
114 GPIO15_nCS_1
, /* CS1 - Flash */
115 GPIO79_nCS_3
, /* CS3 - IMAGEON */
116 GPIO80_nCS_4
, /* CS4 - TMIO */
126 /* TMIO controller */
127 GPIO19_GPIO
, /* t7l66xb #PCLR */
128 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
135 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
139 GPIO29_AC97_SDATA_IN_0
,
140 GPIO30_AC97_SDATA_OUT
,
143 /* Audio power control */
144 GPIO16_GPIO
, /* AC97 codec AVDD2 supply (analogue power) */
145 GPIO40_GPIO
, /* Mic amp power */
146 GPIO41_GPIO
, /* Headphone amp power */
149 GPIO8_GPIO
, /* CD0 */
150 GPIO44_GPIO
, /* CD1 */
151 GPIO11_GPIO
, /* IRQ0 */
152 GPIO6_GPIO
, /* IRQ1 */
153 GPIO27_GPIO
, /* RST0 */
154 GPIO24_GPIO
, /* RST1 */
155 GPIO20_GPIO
, /* PWR0 */
156 GPIO23_GPIO
, /* PWR1 */
169 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
172 /* -------------------- e740 t7l66xb parameters -------------------- */
174 static struct t7l66xb_platform_data e740_t7l66xb_info
= {
175 .irq_base
= IRQ_BOARD_START
,
176 .enable
= &eseries_tmio_enable
,
177 .suspend
= &eseries_tmio_suspend
,
178 .resume
= &eseries_tmio_resume
,
181 static struct platform_device e740_t7l66xb_device
= {
185 .platform_data
= &e740_t7l66xb_info
,
188 .resource
= eseries_tmio_resources
,
191 /* ----------------------------------------------------------------------- */
193 static struct platform_device
*devices
[] __initdata
= {
195 &e740_t7l66xb_device
,
198 static void __init
e740_init(void)
200 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
201 pxa_set_ffuart_info(NULL
);
202 pxa_set_btuart_info(NULL
);
203 pxa_set_stuart_info(NULL
);
204 eseries_register_clks();
205 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
206 "UDCCLK", &pxa25x_device_udc
.dev
),
207 eseries_get_tmio_gpios();
208 platform_add_devices(devices
, ARRAY_SIZE(devices
));
209 pxa_set_udc_info(&e7xx_udc_mach_info
);
210 pxa_set_ac97_info(NULL
);
211 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
214 MACHINE_START(E740
, "Toshiba e740")
215 /* Maintainer: Ian Molton (spyro@f2s.com) */
216 .phys_io
= 0x40000000,
217 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
218 .boot_params
= 0xa0000100,
219 .map_io
= pxa_map_io
,
220 .init_irq
= pxa25x_init_irq
,
221 .fixup
= eseries_fixup
,
222 .init_machine
= e740_init
,