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 .atag_offset
= 0x100,
193 .map_io
= pxa25x_map_io
,
194 .nr_irqs
= ESERIES_NR_IRQS
,
195 .init_irq
= pxa25x_init_irq
,
196 .handle_irq
= pxa25x_handle_irq
,
197 .fixup
= eseries_fixup
,
198 .init_machine
= e330_init
,
203 #ifdef CONFIG_MACH_E350
204 /* -------------------- e350 t7l66xb parameters -------------------- */
206 static struct t7l66xb_platform_data e350_t7l66xb_info
= {
207 .irq_base
= IRQ_BOARD_START
,
208 .enable
= &eseries_tmio_enable
,
209 .suspend
= &eseries_tmio_suspend
,
210 .resume
= &eseries_tmio_resume
,
213 static struct platform_device e350_t7l66xb_device
= {
217 .platform_data
= &e350_t7l66xb_info
,
220 .resource
= eseries_tmio_resources
,
223 /* ---------------------------------------------------------- */
225 static struct platform_device
*e350_devices
[] __initdata
= {
226 &e350_t7l66xb_device
,
230 static void __init
e350_init(void)
232 pxa_set_ffuart_info(NULL
);
233 pxa_set_btuart_info(NULL
);
234 pxa_set_stuart_info(NULL
);
235 eseries_register_clks();
236 eseries_get_tmio_gpios();
237 platform_add_devices(ARRAY_AND_SIZE(e350_devices
));
240 MACHINE_START(E350
, "Toshiba e350")
241 /* Maintainer: Ian Molton (spyro@f2s.com) */
242 .atag_offset
= 0x100,
243 .map_io
= pxa25x_map_io
,
244 .nr_irqs
= ESERIES_NR_IRQS
,
245 .init_irq
= pxa25x_init_irq
,
246 .handle_irq
= pxa25x_handle_irq
,
247 .fixup
= eseries_fixup
,
248 .init_machine
= e350_init
,
253 #ifdef CONFIG_MACH_E400
254 /* ------------------------ E400 LCD definitions ------------------------ */
256 static struct pxafb_mode_info e400_pxafb_mode_info
= {
270 static struct pxafb_mach_info e400_pxafb_mach_info
= {
271 .modes
= &e400_pxafb_mode_info
,
273 .lcd_conn
= LCD_COLOR_TFT_16BPP
,
275 .pxafb_backlight_power
= NULL
,
278 /* ------------------------ E400 MFP config ----------------------------- */
280 static unsigned long e400_pin_config
[] __initdata
= {
282 GPIO15_nCS_1
, /* CS1 - Flash */
283 GPIO80_nCS_4
, /* CS4 - TMIO */
293 /* TMIO controller */
294 GPIO19_GPIO
, /* t7l66xb #PCLR */
295 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
298 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
301 /* ---------------------------------------------------------------------- */
303 static struct mtd_partition partition_a
= {
304 .name
= "Internal NAND flash",
306 .size
= MTDPART_SIZ_FULL
,
309 static uint8_t scan_ff_pattern
[] = { 0xff, 0xff };
311 static struct nand_bbt_descr e400_t7l66xb_nand_bbt
= {
315 .pattern
= scan_ff_pattern
318 static struct tmio_nand_data e400_t7l66xb_nand_config
= {
320 .partition
= &partition_a
,
321 .badblock_pattern
= &e400_t7l66xb_nand_bbt
,
324 static struct t7l66xb_platform_data e400_t7l66xb_info
= {
325 .irq_base
= IRQ_BOARD_START
,
326 .enable
= &eseries_tmio_enable
,
327 .suspend
= &eseries_tmio_suspend
,
328 .resume
= &eseries_tmio_resume
,
330 .nand_data
= &e400_t7l66xb_nand_config
,
333 static struct platform_device e400_t7l66xb_device
= {
337 .platform_data
= &e400_t7l66xb_info
,
340 .resource
= eseries_tmio_resources
,
343 /* ---------------------------------------------------------- */
345 static struct platform_device
*e400_devices
[] __initdata
= {
346 &e400_t7l66xb_device
,
350 static void __init
e400_init(void)
352 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config
));
353 pxa_set_ffuart_info(NULL
);
354 pxa_set_btuart_info(NULL
);
355 pxa_set_stuart_info(NULL
);
356 /* Fixme - e400 may have a switched clock */
357 eseries_register_clks();
358 eseries_get_tmio_gpios();
359 pxa_set_fb_info(NULL
, &e400_pxafb_mach_info
);
360 platform_add_devices(ARRAY_AND_SIZE(e400_devices
));
363 MACHINE_START(E400
, "Toshiba e400")
364 /* Maintainer: Ian Molton (spyro@f2s.com) */
365 .atag_offset
= 0x100,
366 .map_io
= pxa25x_map_io
,
367 .nr_irqs
= ESERIES_NR_IRQS
,
368 .init_irq
= pxa25x_init_irq
,
369 .handle_irq
= pxa25x_handle_irq
,
370 .fixup
= eseries_fixup
,
371 .init_machine
= e400_init
,
376 #ifdef CONFIG_MACH_E740
377 /* ------------------------ e740 video support --------------------------- */
379 static struct w100_gen_regs e740_lcd_regs
= {
380 .lcd_format
= 0x00008023,
381 .lcdd_cntl1
= 0x0f000000,
382 .lcdd_cntl2
= 0x0003ffff,
383 .genlcd_cntl1
= 0x00ffff03,
384 .genlcd_cntl2
= 0x003c0f03,
385 .genlcd_cntl3
= 0x000143aa,
388 static struct w100_mode e740_lcd_mode
= {
395 .crtc_ss
= 0x80140013,
396 .crtc_ls
= 0x81150110,
397 .crtc_gs
= 0x80050005,
398 .crtc_vpos_gs
= 0x000a0009,
399 .crtc_rev
= 0x0040010a,
400 .crtc_dclk
= 0xa906000a,
401 .crtc_gclk
= 0x80050108,
402 .crtc_goe
= 0x80050108,
405 .pixclk_divider_rotated
= 4,
406 .pixclk_src
= CLK_SRC_XTAL
,
408 .sysclk_src
= CLK_SRC_PLL
,
409 .crtc_ps1_active
= 0x41060010,
412 static struct w100_gpio_regs e740_w100_gpio_info
= {
413 .init_data1
= 0x21002103,
414 .gpio_dir1
= 0xffffdeff,
415 .gpio_oe1
= 0x03c00643,
416 .init_data2
= 0x003f003f,
417 .gpio_dir2
= 0xffffffff,
418 .gpio_oe2
= 0x000000ff,
421 static struct w100fb_mach_info e740_fb_info
= {
422 .modelist
= &e740_lcd_mode
,
424 .regs
= &e740_lcd_regs
,
425 .gpio
= &e740_w100_gpio_info
,
426 .xtal_freq
= 14318000,
430 static struct resource e740_fb_resources
[] = {
434 .flags
= IORESOURCE_MEM
,
438 static struct platform_device e740_fb_device
= {
442 .platform_data
= &e740_fb_info
,
444 .num_resources
= ARRAY_SIZE(e740_fb_resources
),
445 .resource
= e740_fb_resources
,
448 /* --------------------------- MFP Pin config -------------------------- */
450 static unsigned long e740_pin_config
[] __initdata
= {
452 GPIO15_nCS_1
, /* CS1 - Flash */
453 GPIO79_nCS_3
, /* CS3 - IMAGEON */
454 GPIO80_nCS_4
, /* CS4 - TMIO */
464 /* TMIO controller */
465 GPIO19_GPIO
, /* t7l66xb #PCLR */
466 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
473 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
477 GPIO29_AC97_SDATA_IN_0
,
478 GPIO30_AC97_SDATA_OUT
,
481 /* Audio power control */
482 GPIO16_GPIO
, /* AC97 codec AVDD2 supply (analogue power) */
483 GPIO40_GPIO
, /* Mic amp power */
484 GPIO41_GPIO
, /* Headphone amp power */
487 GPIO8_GPIO
, /* CD0 */
488 GPIO44_GPIO
, /* CD1 */
489 GPIO11_GPIO
, /* IRQ0 */
490 GPIO6_GPIO
, /* IRQ1 */
491 GPIO27_GPIO
, /* RST0 */
492 GPIO24_GPIO
, /* RST1 */
493 GPIO20_GPIO
, /* PWR0 */
494 GPIO23_GPIO
, /* PWR1 */
507 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
510 /* -------------------- e740 t7l66xb parameters -------------------- */
512 static struct t7l66xb_platform_data e740_t7l66xb_info
= {
513 .irq_base
= IRQ_BOARD_START
,
514 .enable
= &eseries_tmio_enable
,
515 .suspend
= &eseries_tmio_suspend
,
516 .resume
= &eseries_tmio_resume
,
519 static struct platform_device e740_t7l66xb_device
= {
523 .platform_data
= &e740_t7l66xb_info
,
526 .resource
= eseries_tmio_resources
,
529 /* ----------------------------------------------------------------------- */
531 static struct platform_device
*e740_devices
[] __initdata
= {
533 &e740_t7l66xb_device
,
537 static void __init
e740_init(void)
539 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
540 pxa_set_ffuart_info(NULL
);
541 pxa_set_btuart_info(NULL
);
542 pxa_set_stuart_info(NULL
);
543 eseries_register_clks();
544 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
545 "UDCCLK", &pxa25x_device_udc
.dev
),
546 eseries_get_tmio_gpios();
547 platform_add_devices(ARRAY_AND_SIZE(e740_devices
));
548 pxa_set_ac97_info(NULL
);
549 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
552 MACHINE_START(E740
, "Toshiba e740")
553 /* Maintainer: Ian Molton (spyro@f2s.com) */
554 .atag_offset
= 0x100,
555 .map_io
= pxa25x_map_io
,
556 .nr_irqs
= ESERIES_NR_IRQS
,
557 .init_irq
= pxa25x_init_irq
,
558 .handle_irq
= pxa25x_handle_irq
,
559 .fixup
= eseries_fixup
,
560 .init_machine
= e740_init
,
565 #ifdef CONFIG_MACH_E750
566 /* ---------------------- E750 LCD definitions -------------------- */
568 static struct w100_gen_regs e750_lcd_regs
= {
569 .lcd_format
= 0x00008003,
570 .lcdd_cntl1
= 0x00000000,
571 .lcdd_cntl2
= 0x0003ffff,
572 .genlcd_cntl1
= 0x00fff003,
573 .genlcd_cntl2
= 0x003c0f03,
574 .genlcd_cntl3
= 0x000143aa,
577 static struct w100_mode e750_lcd_mode
= {
584 .crtc_ss
= 0x80150014,
585 .crtc_ls
= 0x8014000d,
586 .crtc_gs
= 0xc1000005,
587 .crtc_vpos_gs
= 0x00020147,
588 .crtc_rev
= 0x0040010a,
589 .crtc_dclk
= 0xa1700030,
590 .crtc_gclk
= 0x80cc0015,
591 .crtc_goe
= 0x80cc0015,
592 .crtc_ps1_active
= 0x61060017,
595 .pixclk_divider_rotated
= 4,
596 .pixclk_src
= CLK_SRC_XTAL
,
598 .sysclk_src
= CLK_SRC_PLL
,
601 static struct w100_gpio_regs e750_w100_gpio_info
= {
602 .init_data1
= 0x01192f1b,
603 .gpio_dir1
= 0xd5ffdeff,
604 .gpio_oe1
= 0x000020bf,
605 .init_data2
= 0x010f010f,
606 .gpio_dir2
= 0xffffffff,
607 .gpio_oe2
= 0x000001cf,
610 static struct w100fb_mach_info e750_fb_info
= {
611 .modelist
= &e750_lcd_mode
,
613 .regs
= &e750_lcd_regs
,
614 .gpio
= &e750_w100_gpio_info
,
615 .xtal_freq
= 14318000,
619 static struct resource e750_fb_resources
[] = {
623 .flags
= IORESOURCE_MEM
,
627 static struct platform_device e750_fb_device
= {
631 .platform_data
= &e750_fb_info
,
633 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
634 .resource
= e750_fb_resources
,
637 /* -------------------- e750 MFP parameters -------------------- */
639 static unsigned long e750_pin_config
[] __initdata
= {
641 GPIO15_nCS_1
, /* CS1 - Flash */
642 GPIO79_nCS_3
, /* CS3 - IMAGEON */
643 GPIO80_nCS_4
, /* CS4 - TMIO */
653 /* TMIO controller */
654 GPIO19_GPIO
, /* t7l66xb #PCLR */
655 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
662 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
666 GPIO29_AC97_SDATA_IN_0
,
667 GPIO30_AC97_SDATA_OUT
,
670 /* Audio power control */
671 GPIO4_GPIO
, /* Headphone amp power */
672 GPIO7_GPIO
, /* Speaker amp power */
673 GPIO37_GPIO
, /* Headphone detect */
676 GPIO8_GPIO
, /* CD0 */
677 GPIO44_GPIO
, /* CD1 */
678 GPIO11_GPIO
, /* IRQ0 */
679 GPIO6_GPIO
, /* IRQ1 */
680 GPIO27_GPIO
, /* RST0 */
681 GPIO24_GPIO
, /* RST1 */
682 GPIO20_GPIO
, /* PWR0 */
683 GPIO23_GPIO
, /* PWR1 */
696 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
699 /* ----------------- e750 tc6393xb parameters ------------------ */
701 static struct tc6393xb_platform_data e750_tc6393xb_info
= {
702 .irq_base
= IRQ_BOARD_START
,
703 .scr_pll2cr
= 0x0cc1,
706 .suspend
= &eseries_tmio_suspend
,
707 .resume
= &eseries_tmio_resume
,
708 .enable
= &eseries_tmio_enable
,
709 .disable
= &eseries_tmio_disable
,
712 static struct platform_device e750_tc6393xb_device
= {
716 .platform_data
= &e750_tc6393xb_info
,
719 .resource
= eseries_tmio_resources
,
722 /* ------------------------------------------------------------- */
724 static struct platform_device
*e750_devices
[] __initdata
= {
726 &e750_tc6393xb_device
,
730 static void __init
e750_init(void)
732 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config
));
733 pxa_set_ffuart_info(NULL
);
734 pxa_set_btuart_info(NULL
);
735 pxa_set_stuart_info(NULL
);
736 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device
.name
,
738 eseries_get_tmio_gpios();
739 platform_add_devices(ARRAY_AND_SIZE(e750_devices
));
740 pxa_set_ac97_info(NULL
);
741 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
744 MACHINE_START(E750
, "Toshiba e750")
745 /* Maintainer: Ian Molton (spyro@f2s.com) */
746 .atag_offset
= 0x100,
747 .map_io
= pxa25x_map_io
,
748 .nr_irqs
= ESERIES_NR_IRQS
,
749 .init_irq
= pxa25x_init_irq
,
750 .handle_irq
= pxa25x_handle_irq
,
751 .fixup
= eseries_fixup
,
752 .init_machine
= e750_init
,
757 #ifdef CONFIG_MACH_E800
758 /* ------------------------ e800 LCD definitions ------------------------- */
760 static unsigned long e800_pin_config
[] __initdata
= {
763 GPIO29_AC97_SDATA_IN_0
,
764 GPIO30_AC97_SDATA_OUT
,
768 static struct w100_gen_regs e800_lcd_regs
= {
769 .lcd_format
= 0x00008003,
770 .lcdd_cntl1
= 0x02a00000,
771 .lcdd_cntl2
= 0x0003ffff,
772 .genlcd_cntl1
= 0x000ff2a3,
773 .genlcd_cntl2
= 0x000002a3,
774 .genlcd_cntl3
= 0x000102aa,
777 static struct w100_mode e800_lcd_mode
[2] = {
785 .crtc_ss
= 0x80350034,
786 .crtc_ls
= 0x802b0026,
787 .crtc_gs
= 0x80160016,
788 .crtc_vpos_gs
= 0x00020003,
789 .crtc_rev
= 0x0040001d,
790 .crtc_dclk
= 0xe0000000,
791 .crtc_gclk
= 0x82a50049,
792 .crtc_goe
= 0x80ee001c,
793 .crtc_ps1_active
= 0x00000000,
796 .pixclk_divider_rotated
= 6,
797 .pixclk_src
= CLK_SRC_PLL
,
799 .sysclk_src
= CLK_SRC_PLL
,
808 .crtc_ss
= 0xd010000f,
809 .crtc_ls
= 0x80070003,
810 .crtc_gs
= 0x80000000,
811 .crtc_vpos_gs
= 0x01460147,
812 .crtc_rev
= 0x00400003,
813 .crtc_dclk
= 0xa1700030,
814 .crtc_gclk
= 0x814b0008,
815 .crtc_goe
= 0x80cc0015,
816 .crtc_ps1_active
= 0x00000000,
818 .pixclk_divider
= 6, /* Wince uses 14 which gives a */
819 .pixclk_divider_rotated
= 6, /* 7MHz Pclk. We use a 14MHz one */
820 .pixclk_src
= CLK_SRC_PLL
,
822 .sysclk_src
= CLK_SRC_PLL
,
827 static struct w100_gpio_regs e800_w100_gpio_info
= {
828 .init_data1
= 0xc13fc019,
829 .gpio_dir1
= 0x3e40df7f,
830 .gpio_oe1
= 0x003c3000,
831 .init_data2
= 0x00000000,
832 .gpio_dir2
= 0x00000000,
833 .gpio_oe2
= 0x00000000,
836 static struct w100_mem_info e800_w100_mem_info
= {
837 .ext_cntl
= 0x09640011,
838 .sdram_mode_reg
= 0x00600021,
839 .ext_timing_cntl
= 0x10001545,
840 .io_cntl
= 0x7ddd7333,
844 static void e800_tg_change(struct w100fb_par
*par
)
848 tmp
= w100fb_gpio_read(W100_GPIO_PORT_A
);
849 if (par
->mode
->xres
== 480)
853 w100fb_gpio_write(W100_GPIO_PORT_A
, tmp
);
856 static struct w100_tg_info e800_tg_info
= {
857 .change
= e800_tg_change
,
860 static struct w100fb_mach_info e800_fb_info
= {
861 .modelist
= e800_lcd_mode
,
863 .regs
= &e800_lcd_regs
,
864 .gpio
= &e800_w100_gpio_info
,
865 .mem
= &e800_w100_mem_info
,
867 .xtal_freq
= 16000000,
870 static struct resource e800_fb_resources
[] = {
874 .flags
= IORESOURCE_MEM
,
878 static struct platform_device e800_fb_device
= {
882 .platform_data
= &e800_fb_info
,
884 .num_resources
= ARRAY_SIZE(e800_fb_resources
),
885 .resource
= e800_fb_resources
,
888 /* --------------------------- UDC definitions --------------------------- */
890 static struct gpio_vbus_mach_info e800_udc_info
= {
891 .gpio_vbus
= GPIO_E800_USB_DISC
,
892 .gpio_pullup
= GPIO_E800_USB_PULLUP
,
893 .gpio_pullup_inverted
= 1
896 static struct platform_device e800_gpio_vbus
= {
900 .platform_data
= &e800_udc_info
,
905 /* ----------------- e800 tc6393xb parameters ------------------ */
907 static struct tc6393xb_platform_data e800_tc6393xb_info
= {
908 .irq_base
= IRQ_BOARD_START
,
909 .scr_pll2cr
= 0x0cc1,
912 .suspend
= &eseries_tmio_suspend
,
913 .resume
= &eseries_tmio_resume
,
914 .enable
= &eseries_tmio_enable
,
915 .disable
= &eseries_tmio_disable
,
918 static struct platform_device e800_tc6393xb_device
= {
922 .platform_data
= &e800_tc6393xb_info
,
925 .resource
= eseries_tmio_resources
,
928 /* ----------------------------------------------------------------------- */
930 static struct platform_device
*e800_devices
[] __initdata
= {
932 &e800_tc6393xb_device
,
936 static void __init
e800_init(void)
938 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config
));
939 pxa_set_ffuart_info(NULL
);
940 pxa_set_btuart_info(NULL
);
941 pxa_set_stuart_info(NULL
);
942 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device
.name
,
944 eseries_get_tmio_gpios();
945 platform_add_devices(ARRAY_AND_SIZE(e800_devices
));
946 pxa_set_ac97_info(NULL
);
949 MACHINE_START(E800
, "Toshiba e800")
950 /* Maintainer: Ian Molton (spyro@f2s.com) */
951 .atag_offset
= 0x100,
952 .map_io
= pxa25x_map_io
,
953 .nr_irqs
= ESERIES_NR_IRQS
,
954 .init_irq
= pxa25x_init_irq
,
955 .handle_irq
= pxa25x_handle_irq
,
956 .fixup
= eseries_fixup
,
957 .init_machine
= e800_init
,