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>
23 #include <linux/usb/gpio_vbus.h>
25 #include <video/w100fb.h>
27 #include <asm/setup.h>
28 #include <asm/mach/arch.h>
29 #include <asm/mach-types.h>
31 #include <mach/pxa25x.h>
32 #include <mach/eseries-gpio.h>
33 #include <mach/eseries-irq.h>
34 #include <mach/audio.h>
35 #include <mach/pxafb.h>
37 #include <mach/irda.h>
43 /* Only e800 has 128MB RAM */
44 void __init
eseries_fixup(struct machine_desc
*desc
,
45 struct tag
*tags
, char **cmdline
, struct meminfo
*mi
)
48 mi
->bank
[0].start
= 0xa0000000;
49 if (machine_is_e800())
50 mi
->bank
[0].size
= (128*1024*1024);
52 mi
->bank
[0].size
= (64*1024*1024);
55 struct gpio_vbus_mach_info e7xx_udc_info
= {
56 .gpio_vbus
= GPIO_E7XX_USB_DISC
,
57 .gpio_pullup
= GPIO_E7XX_USB_PULLUP
,
58 .gpio_pullup_inverted
= 1
61 static struct platform_device e7xx_gpio_vbus
= {
65 .platform_data
= &e7xx_udc_info
,
69 struct pxaficp_platform_data e7xx_ficp_platform_data
= {
70 .gpio_pwdown
= GPIO_E7XX_IR_OFF
,
71 .transceiver_cap
= IR_SIRMODE
| IR_OFF
,
74 int eseries_tmio_enable(struct platform_device
*dev
)
76 /* Reset - bring SUSPEND high before PCLR */
77 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
78 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
80 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
82 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 1);
87 int eseries_tmio_disable(struct platform_device
*dev
)
89 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
90 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
94 int eseries_tmio_suspend(struct platform_device
*dev
)
96 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
100 int eseries_tmio_resume(struct platform_device
*dev
)
102 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
107 void eseries_get_tmio_gpios(void)
109 gpio_request(GPIO_ESERIES_TMIO_SUSPEND
, NULL
);
110 gpio_request(GPIO_ESERIES_TMIO_PCLR
, NULL
);
111 gpio_direction_output(GPIO_ESERIES_TMIO_SUSPEND
, 0);
112 gpio_direction_output(GPIO_ESERIES_TMIO_PCLR
, 0);
115 /* TMIO controller uses the same resources on all e-series machines. */
116 struct resource eseries_tmio_resources
[] = {
118 .start
= PXA_CS4_PHYS
,
119 .end
= PXA_CS4_PHYS
+ 0x1fffff,
120 .flags
= IORESOURCE_MEM
,
123 .start
= IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ
),
124 .end
= IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ
),
125 .flags
= IORESOURCE_IRQ
,
129 /* Some e-series hardware cannot control the 32K clock */
130 static void clk_32k_dummy(struct clk
*clk
)
134 static const struct clkops clk_32k_dummy_ops
= {
135 .enable
= clk_32k_dummy
,
136 .disable
= clk_32k_dummy
,
139 static struct clk tmio_dummy_clk
= {
140 .ops
= &clk_32k_dummy_ops
,
144 static struct clk_lookup eseries_clkregs
[] = {
145 INIT_CLKREG(&tmio_dummy_clk
, NULL
, "CLK_CK32K"),
148 void eseries_register_clks(void)
150 clkdev_add_table(eseries_clkregs
, ARRAY_SIZE(eseries_clkregs
));
153 #ifdef CONFIG_MACH_E330
154 /* -------------------- e330 tc6387xb parameters -------------------- */
156 static struct tc6387xb_platform_data e330_tc6387xb_info
= {
157 .enable
= &eseries_tmio_enable
,
158 .disable
= &eseries_tmio_disable
,
159 .suspend
= &eseries_tmio_suspend
,
160 .resume
= &eseries_tmio_resume
,
163 static struct platform_device e330_tc6387xb_device
= {
167 .platform_data
= &e330_tc6387xb_info
,
170 .resource
= eseries_tmio_resources
,
173 /* --------------------------------------------------------------- */
175 static struct platform_device
*e330_devices
[] __initdata
= {
176 &e330_tc6387xb_device
,
180 static void __init
e330_init(void)
182 pxa_set_ffuart_info(NULL
);
183 pxa_set_btuart_info(NULL
);
184 pxa_set_stuart_info(NULL
);
185 eseries_register_clks();
186 eseries_get_tmio_gpios();
187 platform_add_devices(ARRAY_AND_SIZE(e330_devices
));
190 MACHINE_START(E330
, "Toshiba e330")
191 /* Maintainer: Ian Molton (spyro@f2s.com) */
192 .boot_params
= 0xa0000100,
193 .map_io
= pxa25x_map_io
,
194 .nr_irqs
= ESERIES_NR_IRQS
,
195 .init_irq
= pxa25x_init_irq
,
196 .fixup
= eseries_fixup
,
197 .init_machine
= e330_init
,
202 #ifdef CONFIG_MACH_E350
203 /* -------------------- e350 t7l66xb parameters -------------------- */
205 static struct t7l66xb_platform_data e350_t7l66xb_info
= {
206 .irq_base
= IRQ_BOARD_START
,
207 .enable
= &eseries_tmio_enable
,
208 .suspend
= &eseries_tmio_suspend
,
209 .resume
= &eseries_tmio_resume
,
212 static struct platform_device e350_t7l66xb_device
= {
216 .platform_data
= &e350_t7l66xb_info
,
219 .resource
= eseries_tmio_resources
,
222 /* ---------------------------------------------------------- */
224 static struct platform_device
*e350_devices
[] __initdata
= {
225 &e350_t7l66xb_device
,
229 static void __init
e350_init(void)
231 pxa_set_ffuart_info(NULL
);
232 pxa_set_btuart_info(NULL
);
233 pxa_set_stuart_info(NULL
);
234 eseries_register_clks();
235 eseries_get_tmio_gpios();
236 platform_add_devices(ARRAY_AND_SIZE(e350_devices
));
239 MACHINE_START(E350
, "Toshiba e350")
240 /* Maintainer: Ian Molton (spyro@f2s.com) */
241 .boot_params
= 0xa0000100,
242 .map_io
= pxa25x_map_io
,
243 .nr_irqs
= ESERIES_NR_IRQS
,
244 .init_irq
= pxa25x_init_irq
,
245 .fixup
= eseries_fixup
,
246 .init_machine
= e350_init
,
251 #ifdef CONFIG_MACH_E400
252 /* ------------------------ E400 LCD definitions ------------------------ */
254 static struct pxafb_mode_info e400_pxafb_mode_info
= {
268 static struct pxafb_mach_info e400_pxafb_mach_info
= {
269 .modes
= &e400_pxafb_mode_info
,
271 .lcd_conn
= LCD_COLOR_TFT_16BPP
,
273 .pxafb_backlight_power
= NULL
,
276 /* ------------------------ E400 MFP config ----------------------------- */
278 static unsigned long e400_pin_config
[] __initdata
= {
280 GPIO15_nCS_1
, /* CS1 - Flash */
281 GPIO80_nCS_4
, /* CS4 - TMIO */
291 /* TMIO controller */
292 GPIO19_GPIO
, /* t7l66xb #PCLR */
293 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
296 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
299 /* ---------------------------------------------------------------------- */
301 static struct mtd_partition partition_a
= {
302 .name
= "Internal NAND flash",
304 .size
= MTDPART_SIZ_FULL
,
307 static uint8_t scan_ff_pattern
[] = { 0xff, 0xff };
309 static struct nand_bbt_descr e400_t7l66xb_nand_bbt
= {
313 .pattern
= scan_ff_pattern
316 static struct tmio_nand_data e400_t7l66xb_nand_config
= {
318 .partition
= &partition_a
,
319 .badblock_pattern
= &e400_t7l66xb_nand_bbt
,
322 static struct t7l66xb_platform_data e400_t7l66xb_info
= {
323 .irq_base
= IRQ_BOARD_START
,
324 .enable
= &eseries_tmio_enable
,
325 .suspend
= &eseries_tmio_suspend
,
326 .resume
= &eseries_tmio_resume
,
328 .nand_data
= &e400_t7l66xb_nand_config
,
331 static struct platform_device e400_t7l66xb_device
= {
335 .platform_data
= &e400_t7l66xb_info
,
338 .resource
= eseries_tmio_resources
,
341 /* ---------------------------------------------------------- */
343 static struct platform_device
*e400_devices
[] __initdata
= {
344 &e400_t7l66xb_device
,
348 static void __init
e400_init(void)
350 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config
));
351 pxa_set_ffuart_info(NULL
);
352 pxa_set_btuart_info(NULL
);
353 pxa_set_stuart_info(NULL
);
354 /* Fixme - e400 may have a switched clock */
355 eseries_register_clks();
356 eseries_get_tmio_gpios();
357 pxa_set_fb_info(NULL
, &e400_pxafb_mach_info
);
358 platform_add_devices(ARRAY_AND_SIZE(e400_devices
));
361 MACHINE_START(E400
, "Toshiba e400")
362 /* Maintainer: Ian Molton (spyro@f2s.com) */
363 .boot_params
= 0xa0000100,
364 .map_io
= pxa25x_map_io
,
365 .nr_irqs
= ESERIES_NR_IRQS
,
366 .init_irq
= pxa25x_init_irq
,
367 .fixup
= eseries_fixup
,
368 .init_machine
= e400_init
,
373 #ifdef CONFIG_MACH_E740
374 /* ------------------------ e740 video support --------------------------- */
376 static struct w100_gen_regs e740_lcd_regs
= {
377 .lcd_format
= 0x00008023,
378 .lcdd_cntl1
= 0x0f000000,
379 .lcdd_cntl2
= 0x0003ffff,
380 .genlcd_cntl1
= 0x00ffff03,
381 .genlcd_cntl2
= 0x003c0f03,
382 .genlcd_cntl3
= 0x000143aa,
385 static struct w100_mode e740_lcd_mode
= {
392 .crtc_ss
= 0x80140013,
393 .crtc_ls
= 0x81150110,
394 .crtc_gs
= 0x80050005,
395 .crtc_vpos_gs
= 0x000a0009,
396 .crtc_rev
= 0x0040010a,
397 .crtc_dclk
= 0xa906000a,
398 .crtc_gclk
= 0x80050108,
399 .crtc_goe
= 0x80050108,
402 .pixclk_divider_rotated
= 4,
403 .pixclk_src
= CLK_SRC_XTAL
,
405 .sysclk_src
= CLK_SRC_PLL
,
406 .crtc_ps1_active
= 0x41060010,
409 static struct w100_gpio_regs e740_w100_gpio_info
= {
410 .init_data1
= 0x21002103,
411 .gpio_dir1
= 0xffffdeff,
412 .gpio_oe1
= 0x03c00643,
413 .init_data2
= 0x003f003f,
414 .gpio_dir2
= 0xffffffff,
415 .gpio_oe2
= 0x000000ff,
418 static struct w100fb_mach_info e740_fb_info
= {
419 .modelist
= &e740_lcd_mode
,
421 .regs
= &e740_lcd_regs
,
422 .gpio
= &e740_w100_gpio_info
,
423 .xtal_freq
= 14318000,
427 static struct resource e740_fb_resources
[] = {
431 .flags
= IORESOURCE_MEM
,
435 static struct platform_device e740_fb_device
= {
439 .platform_data
= &e740_fb_info
,
441 .num_resources
= ARRAY_SIZE(e740_fb_resources
),
442 .resource
= e740_fb_resources
,
445 /* --------------------------- MFP Pin config -------------------------- */
447 static unsigned long e740_pin_config
[] __initdata
= {
449 GPIO15_nCS_1
, /* CS1 - Flash */
450 GPIO79_nCS_3
, /* CS3 - IMAGEON */
451 GPIO80_nCS_4
, /* CS4 - TMIO */
461 /* TMIO controller */
462 GPIO19_GPIO
, /* t7l66xb #PCLR */
463 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
470 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
474 GPIO29_AC97_SDATA_IN_0
,
475 GPIO30_AC97_SDATA_OUT
,
478 /* Audio power control */
479 GPIO16_GPIO
, /* AC97 codec AVDD2 supply (analogue power) */
480 GPIO40_GPIO
, /* Mic amp power */
481 GPIO41_GPIO
, /* Headphone amp power */
484 GPIO8_GPIO
, /* CD0 */
485 GPIO44_GPIO
, /* CD1 */
486 GPIO11_GPIO
, /* IRQ0 */
487 GPIO6_GPIO
, /* IRQ1 */
488 GPIO27_GPIO
, /* RST0 */
489 GPIO24_GPIO
, /* RST1 */
490 GPIO20_GPIO
, /* PWR0 */
491 GPIO23_GPIO
, /* PWR1 */
504 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
507 /* -------------------- e740 t7l66xb parameters -------------------- */
509 static struct t7l66xb_platform_data e740_t7l66xb_info
= {
510 .irq_base
= IRQ_BOARD_START
,
511 .enable
= &eseries_tmio_enable
,
512 .suspend
= &eseries_tmio_suspend
,
513 .resume
= &eseries_tmio_resume
,
516 static struct platform_device e740_t7l66xb_device
= {
520 .platform_data
= &e740_t7l66xb_info
,
523 .resource
= eseries_tmio_resources
,
526 /* ----------------------------------------------------------------------- */
528 static struct platform_device
*e740_devices
[] __initdata
= {
530 &e740_t7l66xb_device
,
534 static void __init
e740_init(void)
536 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
537 pxa_set_ffuart_info(NULL
);
538 pxa_set_btuart_info(NULL
);
539 pxa_set_stuart_info(NULL
);
540 eseries_register_clks();
541 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
542 "UDCCLK", &pxa25x_device_udc
.dev
),
543 eseries_get_tmio_gpios();
544 platform_add_devices(ARRAY_AND_SIZE(e740_devices
));
545 pxa_set_ac97_info(NULL
);
546 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
549 MACHINE_START(E740
, "Toshiba e740")
550 /* Maintainer: Ian Molton (spyro@f2s.com) */
551 .boot_params
= 0xa0000100,
552 .map_io
= pxa25x_map_io
,
553 .nr_irqs
= ESERIES_NR_IRQS
,
554 .init_irq
= pxa25x_init_irq
,
555 .fixup
= eseries_fixup
,
556 .init_machine
= e740_init
,
561 #ifdef CONFIG_MACH_E750
562 /* ---------------------- E750 LCD definitions -------------------- */
564 static struct w100_gen_regs e750_lcd_regs
= {
565 .lcd_format
= 0x00008003,
566 .lcdd_cntl1
= 0x00000000,
567 .lcdd_cntl2
= 0x0003ffff,
568 .genlcd_cntl1
= 0x00fff003,
569 .genlcd_cntl2
= 0x003c0f03,
570 .genlcd_cntl3
= 0x000143aa,
573 static struct w100_mode e750_lcd_mode
= {
580 .crtc_ss
= 0x80150014,
581 .crtc_ls
= 0x8014000d,
582 .crtc_gs
= 0xc1000005,
583 .crtc_vpos_gs
= 0x00020147,
584 .crtc_rev
= 0x0040010a,
585 .crtc_dclk
= 0xa1700030,
586 .crtc_gclk
= 0x80cc0015,
587 .crtc_goe
= 0x80cc0015,
588 .crtc_ps1_active
= 0x61060017,
591 .pixclk_divider_rotated
= 4,
592 .pixclk_src
= CLK_SRC_XTAL
,
594 .sysclk_src
= CLK_SRC_PLL
,
597 static struct w100_gpio_regs e750_w100_gpio_info
= {
598 .init_data1
= 0x01192f1b,
599 .gpio_dir1
= 0xd5ffdeff,
600 .gpio_oe1
= 0x000020bf,
601 .init_data2
= 0x010f010f,
602 .gpio_dir2
= 0xffffffff,
603 .gpio_oe2
= 0x000001cf,
606 static struct w100fb_mach_info e750_fb_info
= {
607 .modelist
= &e750_lcd_mode
,
609 .regs
= &e750_lcd_regs
,
610 .gpio
= &e750_w100_gpio_info
,
611 .xtal_freq
= 14318000,
615 static struct resource e750_fb_resources
[] = {
619 .flags
= IORESOURCE_MEM
,
623 static struct platform_device e750_fb_device
= {
627 .platform_data
= &e750_fb_info
,
629 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
630 .resource
= e750_fb_resources
,
633 /* -------------------- e750 MFP parameters -------------------- */
635 static unsigned long e750_pin_config
[] __initdata
= {
637 GPIO15_nCS_1
, /* CS1 - Flash */
638 GPIO79_nCS_3
, /* CS3 - IMAGEON */
639 GPIO80_nCS_4
, /* CS4 - TMIO */
649 /* TMIO controller */
650 GPIO19_GPIO
, /* t7l66xb #PCLR */
651 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
658 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
662 GPIO29_AC97_SDATA_IN_0
,
663 GPIO30_AC97_SDATA_OUT
,
666 /* Audio power control */
667 GPIO4_GPIO
, /* Headphone amp power */
668 GPIO7_GPIO
, /* Speaker amp power */
669 GPIO37_GPIO
, /* Headphone detect */
672 GPIO8_GPIO
, /* CD0 */
673 GPIO44_GPIO
, /* CD1 */
674 GPIO11_GPIO
, /* IRQ0 */
675 GPIO6_GPIO
, /* IRQ1 */
676 GPIO27_GPIO
, /* RST0 */
677 GPIO24_GPIO
, /* RST1 */
678 GPIO20_GPIO
, /* PWR0 */
679 GPIO23_GPIO
, /* PWR1 */
692 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
695 /* ----------------- e750 tc6393xb parameters ------------------ */
697 static struct tc6393xb_platform_data e750_tc6393xb_info
= {
698 .irq_base
= IRQ_BOARD_START
,
699 .scr_pll2cr
= 0x0cc1,
702 .suspend
= &eseries_tmio_suspend
,
703 .resume
= &eseries_tmio_resume
,
704 .enable
= &eseries_tmio_enable
,
705 .disable
= &eseries_tmio_disable
,
708 static struct platform_device e750_tc6393xb_device
= {
712 .platform_data
= &e750_tc6393xb_info
,
715 .resource
= eseries_tmio_resources
,
718 /* ------------------------------------------------------------- */
720 static struct platform_device
*e750_devices
[] __initdata
= {
722 &e750_tc6393xb_device
,
726 static void __init
e750_init(void)
728 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config
));
729 pxa_set_ffuart_info(NULL
);
730 pxa_set_btuart_info(NULL
);
731 pxa_set_stuart_info(NULL
);
732 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device
.name
,
734 eseries_get_tmio_gpios();
735 platform_add_devices(ARRAY_AND_SIZE(e750_devices
));
736 pxa_set_ac97_info(NULL
);
737 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
740 MACHINE_START(E750
, "Toshiba e750")
741 /* Maintainer: Ian Molton (spyro@f2s.com) */
742 .boot_params
= 0xa0000100,
743 .map_io
= pxa25x_map_io
,
744 .nr_irqs
= ESERIES_NR_IRQS
,
745 .init_irq
= pxa25x_init_irq
,
746 .fixup
= eseries_fixup
,
747 .init_machine
= e750_init
,
752 #ifdef CONFIG_MACH_E800
753 /* ------------------------ e800 LCD definitions ------------------------- */
755 static unsigned long e800_pin_config
[] __initdata
= {
758 GPIO29_AC97_SDATA_IN_0
,
759 GPIO30_AC97_SDATA_OUT
,
763 static struct w100_gen_regs e800_lcd_regs
= {
764 .lcd_format
= 0x00008003,
765 .lcdd_cntl1
= 0x02a00000,
766 .lcdd_cntl2
= 0x0003ffff,
767 .genlcd_cntl1
= 0x000ff2a3,
768 .genlcd_cntl2
= 0x000002a3,
769 .genlcd_cntl3
= 0x000102aa,
772 static struct w100_mode e800_lcd_mode
[2] = {
780 .crtc_ss
= 0x80350034,
781 .crtc_ls
= 0x802b0026,
782 .crtc_gs
= 0x80160016,
783 .crtc_vpos_gs
= 0x00020003,
784 .crtc_rev
= 0x0040001d,
785 .crtc_dclk
= 0xe0000000,
786 .crtc_gclk
= 0x82a50049,
787 .crtc_goe
= 0x80ee001c,
788 .crtc_ps1_active
= 0x00000000,
791 .pixclk_divider_rotated
= 6,
792 .pixclk_src
= CLK_SRC_PLL
,
794 .sysclk_src
= CLK_SRC_PLL
,
803 .crtc_ss
= 0xd010000f,
804 .crtc_ls
= 0x80070003,
805 .crtc_gs
= 0x80000000,
806 .crtc_vpos_gs
= 0x01460147,
807 .crtc_rev
= 0x00400003,
808 .crtc_dclk
= 0xa1700030,
809 .crtc_gclk
= 0x814b0008,
810 .crtc_goe
= 0x80cc0015,
811 .crtc_ps1_active
= 0x00000000,
813 .pixclk_divider
= 6, /* Wince uses 14 which gives a */
814 .pixclk_divider_rotated
= 6, /* 7MHz Pclk. We use a 14MHz one */
815 .pixclk_src
= CLK_SRC_PLL
,
817 .sysclk_src
= CLK_SRC_PLL
,
822 static struct w100_gpio_regs e800_w100_gpio_info
= {
823 .init_data1
= 0xc13fc019,
824 .gpio_dir1
= 0x3e40df7f,
825 .gpio_oe1
= 0x003c3000,
826 .init_data2
= 0x00000000,
827 .gpio_dir2
= 0x00000000,
828 .gpio_oe2
= 0x00000000,
831 static struct w100_mem_info e800_w100_mem_info
= {
832 .ext_cntl
= 0x09640011,
833 .sdram_mode_reg
= 0x00600021,
834 .ext_timing_cntl
= 0x10001545,
835 .io_cntl
= 0x7ddd7333,
839 static void e800_tg_change(struct w100fb_par
*par
)
843 tmp
= w100fb_gpio_read(W100_GPIO_PORT_A
);
844 if (par
->mode
->xres
== 480)
848 w100fb_gpio_write(W100_GPIO_PORT_A
, tmp
);
851 static struct w100_tg_info e800_tg_info
= {
852 .change
= e800_tg_change
,
855 static struct w100fb_mach_info e800_fb_info
= {
856 .modelist
= e800_lcd_mode
,
858 .regs
= &e800_lcd_regs
,
859 .gpio
= &e800_w100_gpio_info
,
860 .mem
= &e800_w100_mem_info
,
862 .xtal_freq
= 16000000,
865 static struct resource e800_fb_resources
[] = {
869 .flags
= IORESOURCE_MEM
,
873 static struct platform_device e800_fb_device
= {
877 .platform_data
= &e800_fb_info
,
879 .num_resources
= ARRAY_SIZE(e800_fb_resources
),
880 .resource
= e800_fb_resources
,
883 /* --------------------------- UDC definitions --------------------------- */
885 static struct gpio_vbus_mach_info e800_udc_info
= {
886 .gpio_vbus
= GPIO_E800_USB_DISC
,
887 .gpio_pullup
= GPIO_E800_USB_PULLUP
,
888 .gpio_pullup_inverted
= 1
891 static struct platform_device e800_gpio_vbus
= {
895 .platform_data
= &e800_udc_info
,
900 /* ----------------- e800 tc6393xb parameters ------------------ */
902 static struct tc6393xb_platform_data e800_tc6393xb_info
= {
903 .irq_base
= IRQ_BOARD_START
,
904 .scr_pll2cr
= 0x0cc1,
907 .suspend
= &eseries_tmio_suspend
,
908 .resume
= &eseries_tmio_resume
,
909 .enable
= &eseries_tmio_enable
,
910 .disable
= &eseries_tmio_disable
,
913 static struct platform_device e800_tc6393xb_device
= {
917 .platform_data
= &e800_tc6393xb_info
,
920 .resource
= eseries_tmio_resources
,
923 /* ----------------------------------------------------------------------- */
925 static struct platform_device
*e800_devices
[] __initdata
= {
927 &e800_tc6393xb_device
,
931 static void __init
e800_init(void)
933 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config
));
934 pxa_set_ffuart_info(NULL
);
935 pxa_set_btuart_info(NULL
);
936 pxa_set_stuart_info(NULL
);
937 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device
.name
,
939 eseries_get_tmio_gpios();
940 platform_add_devices(ARRAY_AND_SIZE(e800_devices
));
941 pxa_set_ac97_info(NULL
);
944 MACHINE_START(E800
, "Toshiba e800")
945 /* Maintainer: Ian Molton (spyro@f2s.com) */
946 .boot_params
= 0xa0000100,
947 .map_io
= pxa25x_map_io
,
948 .nr_irqs
= ESERIES_NR_IRQS
,
949 .init_irq
= pxa25x_init_irq
,
950 .fixup
= eseries_fixup
,
951 .init_machine
= e800_init
,