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/gpio.h>
16 #include <linux/delay.h>
17 #include <linux/platform_device.h>
18 #include <linux/mfd/tc6387xb.h>
19 #include <linux/mfd/tc6393xb.h>
20 #include <linux/mfd/t7l66xb.h>
21 #include <linux/mtd/nand.h>
22 #include <linux/mtd/partitions.h>
24 #include <video/w100fb.h>
26 #include <asm/setup.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach-types.h>
30 #include <mach/pxa25x.h>
31 #include <mach/eseries-gpio.h>
32 #include <mach/eseries-irq.h>
33 #include <mach/audio.h>
34 #include <mach/pxafb.h>
36 #include <mach/irda.h>
42 /* Only e800 has 128MB RAM */
43 void __init
eseries_fixup(struct machine_desc
*desc
,
44 struct tag
*tags
, char **cmdline
, struct meminfo
*mi
)
47 mi
->bank
[0].start
= 0xa0000000;
48 if (machine_is_e800())
49 mi
->bank
[0].size
= (128*1024*1024);
51 mi
->bank
[0].size
= (64*1024*1024);
54 struct pxa2xx_udc_mach_info e7xx_udc_mach_info
= {
55 .gpio_vbus
= GPIO_E7XX_USB_DISC
,
56 .gpio_pullup
= GPIO_E7XX_USB_PULLUP
,
57 .gpio_pullup_inverted
= 1
60 struct pxaficp_platform_data e7xx_ficp_platform_data
= {
61 .gpio_pwdown
= GPIO_E7XX_IR_OFF
,
62 .transceiver_cap
= IR_SIRMODE
| IR_OFF
,
65 int eseries_tmio_enable(struct platform_device
*dev
)
67 /* Reset - bring SUSPEND high before PCLR */
68 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
69 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
71 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
73 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 1);
78 int eseries_tmio_disable(struct platform_device
*dev
)
80 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
81 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
85 int eseries_tmio_suspend(struct platform_device
*dev
)
87 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
91 int eseries_tmio_resume(struct platform_device
*dev
)
93 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
98 void eseries_get_tmio_gpios(void)
100 gpio_request(GPIO_ESERIES_TMIO_SUSPEND
, NULL
);
101 gpio_request(GPIO_ESERIES_TMIO_PCLR
, NULL
);
102 gpio_direction_output(GPIO_ESERIES_TMIO_SUSPEND
, 0);
103 gpio_direction_output(GPIO_ESERIES_TMIO_PCLR
, 0);
106 /* TMIO controller uses the same resources on all e-series machines. */
107 struct resource eseries_tmio_resources
[] = {
109 .start
= PXA_CS4_PHYS
,
110 .end
= PXA_CS4_PHYS
+ 0x1fffff,
111 .flags
= IORESOURCE_MEM
,
114 .start
= IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ
),
115 .end
= IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ
),
116 .flags
= IORESOURCE_IRQ
,
120 /* Some e-series hardware cannot control the 32K clock */
121 static void clk_32k_dummy(struct clk
*clk
)
125 static const struct clkops clk_32k_dummy_ops
= {
126 .enable
= clk_32k_dummy
,
127 .disable
= clk_32k_dummy
,
130 static struct clk tmio_dummy_clk
= {
131 .ops
= &clk_32k_dummy_ops
,
135 static struct clk_lookup eseries_clkregs
[] = {
136 INIT_CLKREG(&tmio_dummy_clk
, NULL
, "CLK_CK32K"),
139 void eseries_register_clks(void)
141 clkdev_add_table(eseries_clkregs
, ARRAY_SIZE(eseries_clkregs
));
144 #ifdef CONFIG_MACH_E330
145 /* -------------------- e330 tc6387xb parameters -------------------- */
147 static struct tc6387xb_platform_data e330_tc6387xb_info
= {
148 .enable
= &eseries_tmio_enable
,
149 .disable
= &eseries_tmio_disable
,
150 .suspend
= &eseries_tmio_suspend
,
151 .resume
= &eseries_tmio_resume
,
154 static struct platform_device e330_tc6387xb_device
= {
158 .platform_data
= &e330_tc6387xb_info
,
161 .resource
= eseries_tmio_resources
,
164 /* --------------------------------------------------------------- */
166 static struct platform_device
*e330_devices
[] __initdata
= {
167 &e330_tc6387xb_device
,
170 static void __init
e330_init(void)
172 pxa_set_ffuart_info(NULL
);
173 pxa_set_btuart_info(NULL
);
174 pxa_set_stuart_info(NULL
);
175 eseries_register_clks();
176 eseries_get_tmio_gpios();
177 platform_add_devices(ARRAY_AND_SIZE(e330_devices
));
178 pxa_set_udc_info(&e7xx_udc_mach_info
);
181 MACHINE_START(E330
, "Toshiba e330")
182 /* Maintainer: Ian Molton (spyro@f2s.com) */
183 .boot_params
= 0xa0000100,
184 .map_io
= pxa_map_io
,
185 .nr_irqs
= ESERIES_NR_IRQS
,
186 .init_irq
= pxa25x_init_irq
,
187 .fixup
= eseries_fixup
,
188 .init_machine
= e330_init
,
193 #ifdef CONFIG_MACH_E350
194 /* -------------------- e350 t7l66xb parameters -------------------- */
196 static struct t7l66xb_platform_data e350_t7l66xb_info
= {
197 .irq_base
= IRQ_BOARD_START
,
198 .enable
= &eseries_tmio_enable
,
199 .suspend
= &eseries_tmio_suspend
,
200 .resume
= &eseries_tmio_resume
,
203 static struct platform_device e350_t7l66xb_device
= {
207 .platform_data
= &e350_t7l66xb_info
,
210 .resource
= eseries_tmio_resources
,
213 /* ---------------------------------------------------------- */
215 static struct platform_device
*e350_devices
[] __initdata
= {
216 &e350_t7l66xb_device
,
219 static void __init
e350_init(void)
221 pxa_set_ffuart_info(NULL
);
222 pxa_set_btuart_info(NULL
);
223 pxa_set_stuart_info(NULL
);
224 eseries_register_clks();
225 eseries_get_tmio_gpios();
226 platform_add_devices(ARRAY_AND_SIZE(e350_devices
));
227 pxa_set_udc_info(&e7xx_udc_mach_info
);
230 MACHINE_START(E350
, "Toshiba e350")
231 /* Maintainer: Ian Molton (spyro@f2s.com) */
232 .boot_params
= 0xa0000100,
233 .map_io
= pxa_map_io
,
234 .nr_irqs
= ESERIES_NR_IRQS
,
235 .init_irq
= pxa25x_init_irq
,
236 .fixup
= eseries_fixup
,
237 .init_machine
= e350_init
,
242 #ifdef CONFIG_MACH_E400
243 /* ------------------------ E400 LCD definitions ------------------------ */
245 static struct pxafb_mode_info e400_pxafb_mode_info
= {
259 static struct pxafb_mach_info e400_pxafb_mach_info
= {
260 .modes
= &e400_pxafb_mode_info
,
262 .lcd_conn
= LCD_COLOR_TFT_16BPP
,
264 .pxafb_backlight_power
= NULL
,
267 /* ------------------------ E400 MFP config ----------------------------- */
269 static unsigned long e400_pin_config
[] __initdata
= {
271 GPIO15_nCS_1
, /* CS1 - Flash */
272 GPIO80_nCS_4
, /* CS4 - TMIO */
282 /* TMIO controller */
283 GPIO19_GPIO
, /* t7l66xb #PCLR */
284 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
287 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
290 /* ---------------------------------------------------------------------- */
292 static struct mtd_partition partition_a
= {
293 .name
= "Internal NAND flash",
295 .size
= MTDPART_SIZ_FULL
,
298 static uint8_t scan_ff_pattern
[] = { 0xff, 0xff };
300 static struct nand_bbt_descr e400_t7l66xb_nand_bbt
= {
304 .pattern
= scan_ff_pattern
307 static struct tmio_nand_data e400_t7l66xb_nand_config
= {
309 .partition
= &partition_a
,
310 .badblock_pattern
= &e400_t7l66xb_nand_bbt
,
313 static struct t7l66xb_platform_data e400_t7l66xb_info
= {
314 .irq_base
= IRQ_BOARD_START
,
315 .enable
= &eseries_tmio_enable
,
316 .suspend
= &eseries_tmio_suspend
,
317 .resume
= &eseries_tmio_resume
,
319 .nand_data
= &e400_t7l66xb_nand_config
,
322 static struct platform_device e400_t7l66xb_device
= {
326 .platform_data
= &e400_t7l66xb_info
,
329 .resource
= eseries_tmio_resources
,
332 /* ---------------------------------------------------------- */
334 static struct platform_device
*e400_devices
[] __initdata
= {
335 &e400_t7l66xb_device
,
338 static void __init
e400_init(void)
340 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config
));
341 pxa_set_ffuart_info(NULL
);
342 pxa_set_btuart_info(NULL
);
343 pxa_set_stuart_info(NULL
);
344 /* Fixme - e400 may have a switched clock */
345 eseries_register_clks();
346 eseries_get_tmio_gpios();
347 set_pxa_fb_info(&e400_pxafb_mach_info
);
348 platform_add_devices(ARRAY_AND_SIZE(e400_devices
));
349 pxa_set_udc_info(&e7xx_udc_mach_info
);
352 MACHINE_START(E400
, "Toshiba e400")
353 /* Maintainer: Ian Molton (spyro@f2s.com) */
354 .boot_params
= 0xa0000100,
355 .map_io
= pxa_map_io
,
356 .nr_irqs
= ESERIES_NR_IRQS
,
357 .init_irq
= pxa25x_init_irq
,
358 .fixup
= eseries_fixup
,
359 .init_machine
= e400_init
,
364 #ifdef CONFIG_MACH_E740
365 /* ------------------------ e740 video support --------------------------- */
367 static struct w100_gen_regs e740_lcd_regs
= {
368 .lcd_format
= 0x00008023,
369 .lcdd_cntl1
= 0x0f000000,
370 .lcdd_cntl2
= 0x0003ffff,
371 .genlcd_cntl1
= 0x00ffff03,
372 .genlcd_cntl2
= 0x003c0f03,
373 .genlcd_cntl3
= 0x000143aa,
376 static struct w100_mode e740_lcd_mode
= {
383 .crtc_ss
= 0x80140013,
384 .crtc_ls
= 0x81150110,
385 .crtc_gs
= 0x80050005,
386 .crtc_vpos_gs
= 0x000a0009,
387 .crtc_rev
= 0x0040010a,
388 .crtc_dclk
= 0xa906000a,
389 .crtc_gclk
= 0x80050108,
390 .crtc_goe
= 0x80050108,
393 .pixclk_divider_rotated
= 4,
394 .pixclk_src
= CLK_SRC_XTAL
,
396 .sysclk_src
= CLK_SRC_PLL
,
397 .crtc_ps1_active
= 0x41060010,
400 static struct w100_gpio_regs e740_w100_gpio_info
= {
401 .init_data1
= 0x21002103,
402 .gpio_dir1
= 0xffffdeff,
403 .gpio_oe1
= 0x03c00643,
404 .init_data2
= 0x003f003f,
405 .gpio_dir2
= 0xffffffff,
406 .gpio_oe2
= 0x000000ff,
409 static struct w100fb_mach_info e740_fb_info
= {
410 .modelist
= &e740_lcd_mode
,
412 .regs
= &e740_lcd_regs
,
413 .gpio
= &e740_w100_gpio_info
,
414 .xtal_freq
= 14318000,
418 static struct resource e740_fb_resources
[] = {
422 .flags
= IORESOURCE_MEM
,
426 static struct platform_device e740_fb_device
= {
430 .platform_data
= &e740_fb_info
,
432 .num_resources
= ARRAY_SIZE(e740_fb_resources
),
433 .resource
= e740_fb_resources
,
436 /* --------------------------- MFP Pin config -------------------------- */
438 static unsigned long e740_pin_config
[] __initdata
= {
440 GPIO15_nCS_1
, /* CS1 - Flash */
441 GPIO79_nCS_3
, /* CS3 - IMAGEON */
442 GPIO80_nCS_4
, /* CS4 - TMIO */
452 /* TMIO controller */
453 GPIO19_GPIO
, /* t7l66xb #PCLR */
454 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
461 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
465 GPIO29_AC97_SDATA_IN_0
,
466 GPIO30_AC97_SDATA_OUT
,
469 /* Audio power control */
470 GPIO16_GPIO
, /* AC97 codec AVDD2 supply (analogue power) */
471 GPIO40_GPIO
, /* Mic amp power */
472 GPIO41_GPIO
, /* Headphone amp power */
475 GPIO8_GPIO
, /* CD0 */
476 GPIO44_GPIO
, /* CD1 */
477 GPIO11_GPIO
, /* IRQ0 */
478 GPIO6_GPIO
, /* IRQ1 */
479 GPIO27_GPIO
, /* RST0 */
480 GPIO24_GPIO
, /* RST1 */
481 GPIO20_GPIO
, /* PWR0 */
482 GPIO23_GPIO
, /* PWR1 */
495 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
498 /* -------------------- e740 t7l66xb parameters -------------------- */
500 static struct t7l66xb_platform_data e740_t7l66xb_info
= {
501 .irq_base
= IRQ_BOARD_START
,
502 .enable
= &eseries_tmio_enable
,
503 .suspend
= &eseries_tmio_suspend
,
504 .resume
= &eseries_tmio_resume
,
507 static struct platform_device e740_t7l66xb_device
= {
511 .platform_data
= &e740_t7l66xb_info
,
514 .resource
= eseries_tmio_resources
,
517 /* ----------------------------------------------------------------------- */
519 static struct platform_device
*e740_devices
[] __initdata
= {
521 &e740_t7l66xb_device
,
524 static void __init
e740_init(void)
526 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
527 pxa_set_ffuart_info(NULL
);
528 pxa_set_btuart_info(NULL
);
529 pxa_set_stuart_info(NULL
);
530 eseries_register_clks();
531 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
532 "UDCCLK", &pxa25x_device_udc
.dev
),
533 eseries_get_tmio_gpios();
534 platform_add_devices(ARRAY_AND_SIZE(e740_devices
));
535 pxa_set_udc_info(&e7xx_udc_mach_info
);
536 pxa_set_ac97_info(NULL
);
537 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
540 MACHINE_START(E740
, "Toshiba e740")
541 /* Maintainer: Ian Molton (spyro@f2s.com) */
542 .boot_params
= 0xa0000100,
543 .map_io
= pxa_map_io
,
544 .nr_irqs
= ESERIES_NR_IRQS
,
545 .init_irq
= pxa25x_init_irq
,
546 .fixup
= eseries_fixup
,
547 .init_machine
= e740_init
,
552 #ifdef CONFIG_MACH_E750
553 /* ---------------------- E750 LCD definitions -------------------- */
555 static struct w100_gen_regs e750_lcd_regs
= {
556 .lcd_format
= 0x00008003,
557 .lcdd_cntl1
= 0x00000000,
558 .lcdd_cntl2
= 0x0003ffff,
559 .genlcd_cntl1
= 0x00fff003,
560 .genlcd_cntl2
= 0x003c0f03,
561 .genlcd_cntl3
= 0x000143aa,
564 static struct w100_mode e750_lcd_mode
= {
571 .crtc_ss
= 0x80150014,
572 .crtc_ls
= 0x8014000d,
573 .crtc_gs
= 0xc1000005,
574 .crtc_vpos_gs
= 0x00020147,
575 .crtc_rev
= 0x0040010a,
576 .crtc_dclk
= 0xa1700030,
577 .crtc_gclk
= 0x80cc0015,
578 .crtc_goe
= 0x80cc0015,
579 .crtc_ps1_active
= 0x61060017,
582 .pixclk_divider_rotated
= 4,
583 .pixclk_src
= CLK_SRC_XTAL
,
585 .sysclk_src
= CLK_SRC_PLL
,
588 static struct w100_gpio_regs e750_w100_gpio_info
= {
589 .init_data1
= 0x01192f1b,
590 .gpio_dir1
= 0xd5ffdeff,
591 .gpio_oe1
= 0x000020bf,
592 .init_data2
= 0x010f010f,
593 .gpio_dir2
= 0xffffffff,
594 .gpio_oe2
= 0x000001cf,
597 static struct w100fb_mach_info e750_fb_info
= {
598 .modelist
= &e750_lcd_mode
,
600 .regs
= &e750_lcd_regs
,
601 .gpio
= &e750_w100_gpio_info
,
602 .xtal_freq
= 14318000,
606 static struct resource e750_fb_resources
[] = {
610 .flags
= IORESOURCE_MEM
,
614 static struct platform_device e750_fb_device
= {
618 .platform_data
= &e750_fb_info
,
620 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
621 .resource
= e750_fb_resources
,
624 /* -------------------- e750 MFP parameters -------------------- */
626 static unsigned long e750_pin_config
[] __initdata
= {
628 GPIO15_nCS_1
, /* CS1 - Flash */
629 GPIO79_nCS_3
, /* CS3 - IMAGEON */
630 GPIO80_nCS_4
, /* CS4 - TMIO */
640 /* TMIO controller */
641 GPIO19_GPIO
, /* t7l66xb #PCLR */
642 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
649 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
653 GPIO29_AC97_SDATA_IN_0
,
654 GPIO30_AC97_SDATA_OUT
,
657 /* Audio power control */
658 GPIO4_GPIO
, /* Headphone amp power */
659 GPIO7_GPIO
, /* Speaker amp power */
660 GPIO37_GPIO
, /* Headphone detect */
663 GPIO8_GPIO
, /* CD0 */
664 GPIO44_GPIO
, /* CD1 */
665 GPIO11_GPIO
, /* IRQ0 */
666 GPIO6_GPIO
, /* IRQ1 */
667 GPIO27_GPIO
, /* RST0 */
668 GPIO24_GPIO
, /* RST1 */
669 GPIO20_GPIO
, /* PWR0 */
670 GPIO23_GPIO
, /* PWR1 */
683 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
686 /* ----------------- e750 tc6393xb parameters ------------------ */
688 static struct tc6393xb_platform_data e750_tc6393xb_info
= {
689 .irq_base
= IRQ_BOARD_START
,
690 .scr_pll2cr
= 0x0cc1,
693 .suspend
= &eseries_tmio_suspend
,
694 .resume
= &eseries_tmio_resume
,
695 .enable
= &eseries_tmio_enable
,
696 .disable
= &eseries_tmio_disable
,
699 static struct platform_device e750_tc6393xb_device
= {
703 .platform_data
= &e750_tc6393xb_info
,
706 .resource
= eseries_tmio_resources
,
709 /* ------------------------------------------------------------- */
711 static struct platform_device
*e750_devices
[] __initdata
= {
713 &e750_tc6393xb_device
,
716 static void __init
e750_init(void)
718 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config
));
719 pxa_set_ffuart_info(NULL
);
720 pxa_set_btuart_info(NULL
);
721 pxa_set_stuart_info(NULL
);
722 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device
.name
,
724 eseries_get_tmio_gpios();
725 platform_add_devices(ARRAY_AND_SIZE(e750_devices
));
726 pxa_set_udc_info(&e7xx_udc_mach_info
);
727 pxa_set_ac97_info(NULL
);
728 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
731 MACHINE_START(E750
, "Toshiba e750")
732 /* Maintainer: Ian Molton (spyro@f2s.com) */
733 .boot_params
= 0xa0000100,
734 .map_io
= pxa_map_io
,
735 .nr_irqs
= ESERIES_NR_IRQS
,
736 .init_irq
= pxa25x_init_irq
,
737 .fixup
= eseries_fixup
,
738 .init_machine
= e750_init
,
743 #ifdef CONFIG_MACH_E800
744 /* ------------------------ e800 LCD definitions ------------------------- */
746 static unsigned long e800_pin_config
[] __initdata
= {
749 GPIO29_AC97_SDATA_IN_0
,
750 GPIO30_AC97_SDATA_OUT
,
754 static struct w100_gen_regs e800_lcd_regs
= {
755 .lcd_format
= 0x00008003,
756 .lcdd_cntl1
= 0x02a00000,
757 .lcdd_cntl2
= 0x0003ffff,
758 .genlcd_cntl1
= 0x000ff2a3,
759 .genlcd_cntl2
= 0x000002a3,
760 .genlcd_cntl3
= 0x000102aa,
763 static struct w100_mode e800_lcd_mode
[2] = {
771 .crtc_ss
= 0x80350034,
772 .crtc_ls
= 0x802b0026,
773 .crtc_gs
= 0x80160016,
774 .crtc_vpos_gs
= 0x00020003,
775 .crtc_rev
= 0x0040001d,
776 .crtc_dclk
= 0xe0000000,
777 .crtc_gclk
= 0x82a50049,
778 .crtc_goe
= 0x80ee001c,
779 .crtc_ps1_active
= 0x00000000,
782 .pixclk_divider_rotated
= 6,
783 .pixclk_src
= CLK_SRC_PLL
,
785 .sysclk_src
= CLK_SRC_PLL
,
794 .crtc_ss
= 0xd010000f,
795 .crtc_ls
= 0x80070003,
796 .crtc_gs
= 0x80000000,
797 .crtc_vpos_gs
= 0x01460147,
798 .crtc_rev
= 0x00400003,
799 .crtc_dclk
= 0xa1700030,
800 .crtc_gclk
= 0x814b0008,
801 .crtc_goe
= 0x80cc0015,
802 .crtc_ps1_active
= 0x00000000,
804 .pixclk_divider
= 6, /* Wince uses 14 which gives a */
805 .pixclk_divider_rotated
= 6, /* 7MHz Pclk. We use a 14MHz one */
806 .pixclk_src
= CLK_SRC_PLL
,
808 .sysclk_src
= CLK_SRC_PLL
,
813 static struct w100_gpio_regs e800_w100_gpio_info
= {
814 .init_data1
= 0xc13fc019,
815 .gpio_dir1
= 0x3e40df7f,
816 .gpio_oe1
= 0x003c3000,
817 .init_data2
= 0x00000000,
818 .gpio_dir2
= 0x00000000,
819 .gpio_oe2
= 0x00000000,
822 static struct w100_mem_info e800_w100_mem_info
= {
823 .ext_cntl
= 0x09640011,
824 .sdram_mode_reg
= 0x00600021,
825 .ext_timing_cntl
= 0x10001545,
826 .io_cntl
= 0x7ddd7333,
830 static void e800_tg_change(struct w100fb_par
*par
)
834 tmp
= w100fb_gpio_read(W100_GPIO_PORT_A
);
835 if (par
->mode
->xres
== 480)
839 w100fb_gpio_write(W100_GPIO_PORT_A
, tmp
);
842 static struct w100_tg_info e800_tg_info
= {
843 .change
= e800_tg_change
,
846 static struct w100fb_mach_info e800_fb_info
= {
847 .modelist
= e800_lcd_mode
,
849 .regs
= &e800_lcd_regs
,
850 .gpio
= &e800_w100_gpio_info
,
851 .mem
= &e800_w100_mem_info
,
853 .xtal_freq
= 16000000,
856 static struct resource e800_fb_resources
[] = {
860 .flags
= IORESOURCE_MEM
,
864 static struct platform_device e800_fb_device
= {
868 .platform_data
= &e800_fb_info
,
870 .num_resources
= ARRAY_SIZE(e800_fb_resources
),
871 .resource
= e800_fb_resources
,
874 /* --------------------------- UDC definitions --------------------------- */
876 static struct pxa2xx_udc_mach_info e800_udc_mach_info
= {
877 .gpio_vbus
= GPIO_E800_USB_DISC
,
878 .gpio_pullup
= GPIO_E800_USB_PULLUP
,
879 .gpio_pullup_inverted
= 1
882 /* ----------------- e800 tc6393xb parameters ------------------ */
884 static struct tc6393xb_platform_data e800_tc6393xb_info
= {
885 .irq_base
= IRQ_BOARD_START
,
886 .scr_pll2cr
= 0x0cc1,
889 .suspend
= &eseries_tmio_suspend
,
890 .resume
= &eseries_tmio_resume
,
891 .enable
= &eseries_tmio_enable
,
892 .disable
= &eseries_tmio_disable
,
895 static struct platform_device e800_tc6393xb_device
= {
899 .platform_data
= &e800_tc6393xb_info
,
902 .resource
= eseries_tmio_resources
,
905 /* ----------------------------------------------------------------------- */
907 static struct platform_device
*e800_devices
[] __initdata
= {
909 &e800_tc6393xb_device
,
912 static void __init
e800_init(void)
914 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config
));
915 pxa_set_ffuart_info(NULL
);
916 pxa_set_btuart_info(NULL
);
917 pxa_set_stuart_info(NULL
);
918 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device
.name
,
920 eseries_get_tmio_gpios();
921 platform_add_devices(ARRAY_AND_SIZE(e800_devices
));
922 pxa_set_udc_info(&e800_udc_mach_info
);
923 pxa_set_ac97_info(NULL
);
926 MACHINE_START(E800
, "Toshiba e800")
927 /* Maintainer: Ian Molton (spyro@f2s.com) */
928 .boot_params
= 0xa0000100,
929 .map_io
= pxa_map_io
,
930 .nr_irqs
= ESERIES_NR_IRQS
,
931 .init_irq
= pxa25x_init_irq
,
932 .fixup
= eseries_fixup
,
933 .init_machine
= e800_init
,