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 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 gpio_vbus_mach_info e7xx_udc_info
= {
55 .gpio_vbus
= GPIO_E7XX_USB_DISC
,
56 .gpio_pullup
= GPIO_E7XX_USB_PULLUP
,
57 .gpio_pullup_inverted
= 1
60 static struct platform_device e7xx_gpio_vbus
= {
64 .platform_data
= &e7xx_udc_info
,
68 struct pxaficp_platform_data e7xx_ficp_platform_data
= {
69 .gpio_pwdown
= GPIO_E7XX_IR_OFF
,
70 .transceiver_cap
= IR_SIRMODE
| IR_OFF
,
73 int eseries_tmio_enable(struct platform_device
*dev
)
75 /* Reset - bring SUSPEND high before PCLR */
76 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
77 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
79 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
81 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 1);
86 int eseries_tmio_disable(struct platform_device
*dev
)
88 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
89 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
93 int eseries_tmio_suspend(struct platform_device
*dev
)
95 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
99 int eseries_tmio_resume(struct platform_device
*dev
)
101 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
106 void eseries_get_tmio_gpios(void)
108 gpio_request(GPIO_ESERIES_TMIO_SUSPEND
, NULL
);
109 gpio_request(GPIO_ESERIES_TMIO_PCLR
, NULL
);
110 gpio_direction_output(GPIO_ESERIES_TMIO_SUSPEND
, 0);
111 gpio_direction_output(GPIO_ESERIES_TMIO_PCLR
, 0);
114 /* TMIO controller uses the same resources on all e-series machines. */
115 struct resource eseries_tmio_resources
[] = {
117 .start
= PXA_CS4_PHYS
,
118 .end
= PXA_CS4_PHYS
+ 0x1fffff,
119 .flags
= IORESOURCE_MEM
,
122 .start
= IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ
),
123 .end
= IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ
),
124 .flags
= IORESOURCE_IRQ
,
128 /* Some e-series hardware cannot control the 32K clock */
129 static void clk_32k_dummy(struct clk
*clk
)
133 static const struct clkops clk_32k_dummy_ops
= {
134 .enable
= clk_32k_dummy
,
135 .disable
= clk_32k_dummy
,
138 static struct clk tmio_dummy_clk
= {
139 .ops
= &clk_32k_dummy_ops
,
143 static struct clk_lookup eseries_clkregs
[] = {
144 INIT_CLKREG(&tmio_dummy_clk
, NULL
, "CLK_CK32K"),
147 void eseries_register_clks(void)
149 clkdev_add_table(eseries_clkregs
, ARRAY_SIZE(eseries_clkregs
));
152 #ifdef CONFIG_MACH_E330
153 /* -------------------- e330 tc6387xb parameters -------------------- */
155 static struct tc6387xb_platform_data e330_tc6387xb_info
= {
156 .enable
= &eseries_tmio_enable
,
157 .disable
= &eseries_tmio_disable
,
158 .suspend
= &eseries_tmio_suspend
,
159 .resume
= &eseries_tmio_resume
,
162 static struct platform_device e330_tc6387xb_device
= {
166 .platform_data
= &e330_tc6387xb_info
,
169 .resource
= eseries_tmio_resources
,
172 /* --------------------------------------------------------------- */
174 static struct platform_device
*e330_devices
[] __initdata
= {
175 &e330_tc6387xb_device
,
179 static void __init
e330_init(void)
181 pxa_set_ffuart_info(NULL
);
182 pxa_set_btuart_info(NULL
);
183 pxa_set_stuart_info(NULL
);
184 eseries_register_clks();
185 eseries_get_tmio_gpios();
186 platform_add_devices(ARRAY_AND_SIZE(e330_devices
));
189 MACHINE_START(E330
, "Toshiba e330")
190 /* Maintainer: Ian Molton (spyro@f2s.com) */
191 .atag_offset
= 0x100,
192 .map_io
= pxa25x_map_io
,
193 .nr_irqs
= ESERIES_NR_IRQS
,
194 .init_irq
= pxa25x_init_irq
,
195 .handle_irq
= pxa25x_handle_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 .atag_offset
= 0x100,
242 .map_io
= pxa25x_map_io
,
243 .nr_irqs
= ESERIES_NR_IRQS
,
244 .init_irq
= pxa25x_init_irq
,
245 .handle_irq
= pxa25x_handle_irq
,
246 .fixup
= eseries_fixup
,
247 .init_machine
= e350_init
,
252 #ifdef CONFIG_MACH_E400
253 /* ------------------------ E400 LCD definitions ------------------------ */
255 static struct pxafb_mode_info e400_pxafb_mode_info
= {
269 static struct pxafb_mach_info e400_pxafb_mach_info
= {
270 .modes
= &e400_pxafb_mode_info
,
272 .lcd_conn
= LCD_COLOR_TFT_16BPP
,
274 .pxafb_backlight_power
= NULL
,
277 /* ------------------------ E400 MFP config ----------------------------- */
279 static unsigned long e400_pin_config
[] __initdata
= {
281 GPIO15_nCS_1
, /* CS1 - Flash */
282 GPIO80_nCS_4
, /* CS4 - TMIO */
292 /* TMIO controller */
293 GPIO19_GPIO
, /* t7l66xb #PCLR */
294 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
297 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
300 /* ---------------------------------------------------------------------- */
302 static struct mtd_partition partition_a
= {
303 .name
= "Internal NAND flash",
305 .size
= MTDPART_SIZ_FULL
,
308 static uint8_t scan_ff_pattern
[] = { 0xff, 0xff };
310 static struct nand_bbt_descr e400_t7l66xb_nand_bbt
= {
314 .pattern
= scan_ff_pattern
317 static struct tmio_nand_data e400_t7l66xb_nand_config
= {
319 .partition
= &partition_a
,
320 .badblock_pattern
= &e400_t7l66xb_nand_bbt
,
323 static struct t7l66xb_platform_data e400_t7l66xb_info
= {
324 .irq_base
= IRQ_BOARD_START
,
325 .enable
= &eseries_tmio_enable
,
326 .suspend
= &eseries_tmio_suspend
,
327 .resume
= &eseries_tmio_resume
,
329 .nand_data
= &e400_t7l66xb_nand_config
,
332 static struct platform_device e400_t7l66xb_device
= {
336 .platform_data
= &e400_t7l66xb_info
,
339 .resource
= eseries_tmio_resources
,
342 /* ---------------------------------------------------------- */
344 static struct platform_device
*e400_devices
[] __initdata
= {
345 &e400_t7l66xb_device
,
349 static void __init
e400_init(void)
351 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config
));
352 pxa_set_ffuart_info(NULL
);
353 pxa_set_btuart_info(NULL
);
354 pxa_set_stuart_info(NULL
);
355 /* Fixme - e400 may have a switched clock */
356 eseries_register_clks();
357 eseries_get_tmio_gpios();
358 pxa_set_fb_info(NULL
, &e400_pxafb_mach_info
);
359 platform_add_devices(ARRAY_AND_SIZE(e400_devices
));
362 MACHINE_START(E400
, "Toshiba e400")
363 /* Maintainer: Ian Molton (spyro@f2s.com) */
364 .atag_offset
= 0x100,
365 .map_io
= pxa25x_map_io
,
366 .nr_irqs
= ESERIES_NR_IRQS
,
367 .init_irq
= pxa25x_init_irq
,
368 .handle_irq
= pxa25x_handle_irq
,
369 .fixup
= eseries_fixup
,
370 .init_machine
= e400_init
,
375 #ifdef CONFIG_MACH_E740
376 /* ------------------------ e740 video support --------------------------- */
378 static struct w100_gen_regs e740_lcd_regs
= {
379 .lcd_format
= 0x00008023,
380 .lcdd_cntl1
= 0x0f000000,
381 .lcdd_cntl2
= 0x0003ffff,
382 .genlcd_cntl1
= 0x00ffff03,
383 .genlcd_cntl2
= 0x003c0f03,
384 .genlcd_cntl3
= 0x000143aa,
387 static struct w100_mode e740_lcd_mode
= {
394 .crtc_ss
= 0x80140013,
395 .crtc_ls
= 0x81150110,
396 .crtc_gs
= 0x80050005,
397 .crtc_vpos_gs
= 0x000a0009,
398 .crtc_rev
= 0x0040010a,
399 .crtc_dclk
= 0xa906000a,
400 .crtc_gclk
= 0x80050108,
401 .crtc_goe
= 0x80050108,
404 .pixclk_divider_rotated
= 4,
405 .pixclk_src
= CLK_SRC_XTAL
,
407 .sysclk_src
= CLK_SRC_PLL
,
408 .crtc_ps1_active
= 0x41060010,
411 static struct w100_gpio_regs e740_w100_gpio_info
= {
412 .init_data1
= 0x21002103,
413 .gpio_dir1
= 0xffffdeff,
414 .gpio_oe1
= 0x03c00643,
415 .init_data2
= 0x003f003f,
416 .gpio_dir2
= 0xffffffff,
417 .gpio_oe2
= 0x000000ff,
420 static struct w100fb_mach_info e740_fb_info
= {
421 .modelist
= &e740_lcd_mode
,
423 .regs
= &e740_lcd_regs
,
424 .gpio
= &e740_w100_gpio_info
,
425 .xtal_freq
= 14318000,
429 static struct resource e740_fb_resources
[] = {
433 .flags
= IORESOURCE_MEM
,
437 static struct platform_device e740_fb_device
= {
441 .platform_data
= &e740_fb_info
,
443 .num_resources
= ARRAY_SIZE(e740_fb_resources
),
444 .resource
= e740_fb_resources
,
447 /* --------------------------- MFP Pin config -------------------------- */
449 static unsigned long e740_pin_config
[] __initdata
= {
451 GPIO15_nCS_1
, /* CS1 - Flash */
452 GPIO79_nCS_3
, /* CS3 - IMAGEON */
453 GPIO80_nCS_4
, /* CS4 - TMIO */
463 /* TMIO controller */
464 GPIO19_GPIO
, /* t7l66xb #PCLR */
465 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
472 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
476 GPIO29_AC97_SDATA_IN_0
,
477 GPIO30_AC97_SDATA_OUT
,
480 /* Audio power control */
481 GPIO16_GPIO
, /* AC97 codec AVDD2 supply (analogue power) */
482 GPIO40_GPIO
, /* Mic amp power */
483 GPIO41_GPIO
, /* Headphone amp power */
486 GPIO8_GPIO
, /* CD0 */
487 GPIO44_GPIO
, /* CD1 */
488 GPIO11_GPIO
, /* IRQ0 */
489 GPIO6_GPIO
, /* IRQ1 */
490 GPIO27_GPIO
, /* RST0 */
491 GPIO24_GPIO
, /* RST1 */
492 GPIO20_GPIO
, /* PWR0 */
493 GPIO23_GPIO
, /* PWR1 */
506 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
509 /* -------------------- e740 t7l66xb parameters -------------------- */
511 static struct t7l66xb_platform_data e740_t7l66xb_info
= {
512 .irq_base
= IRQ_BOARD_START
,
513 .enable
= &eseries_tmio_enable
,
514 .suspend
= &eseries_tmio_suspend
,
515 .resume
= &eseries_tmio_resume
,
518 static struct platform_device e740_t7l66xb_device
= {
522 .platform_data
= &e740_t7l66xb_info
,
525 .resource
= eseries_tmio_resources
,
528 /* ----------------------------------------------------------------------- */
530 static struct platform_device
*e740_devices
[] __initdata
= {
532 &e740_t7l66xb_device
,
536 static void __init
e740_init(void)
538 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
539 pxa_set_ffuart_info(NULL
);
540 pxa_set_btuart_info(NULL
);
541 pxa_set_stuart_info(NULL
);
542 eseries_register_clks();
543 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
544 "UDCCLK", &pxa25x_device_udc
.dev
),
545 eseries_get_tmio_gpios();
546 platform_add_devices(ARRAY_AND_SIZE(e740_devices
));
547 pxa_set_ac97_info(NULL
);
548 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
551 MACHINE_START(E740
, "Toshiba e740")
552 /* Maintainer: Ian Molton (spyro@f2s.com) */
553 .atag_offset
= 0x100,
554 .map_io
= pxa25x_map_io
,
555 .nr_irqs
= ESERIES_NR_IRQS
,
556 .init_irq
= pxa25x_init_irq
,
557 .handle_irq
= pxa25x_handle_irq
,
558 .fixup
= eseries_fixup
,
559 .init_machine
= e740_init
,
564 #ifdef CONFIG_MACH_E750
565 /* ---------------------- E750 LCD definitions -------------------- */
567 static struct w100_gen_regs e750_lcd_regs
= {
568 .lcd_format
= 0x00008003,
569 .lcdd_cntl1
= 0x00000000,
570 .lcdd_cntl2
= 0x0003ffff,
571 .genlcd_cntl1
= 0x00fff003,
572 .genlcd_cntl2
= 0x003c0f03,
573 .genlcd_cntl3
= 0x000143aa,
576 static struct w100_mode e750_lcd_mode
= {
583 .crtc_ss
= 0x80150014,
584 .crtc_ls
= 0x8014000d,
585 .crtc_gs
= 0xc1000005,
586 .crtc_vpos_gs
= 0x00020147,
587 .crtc_rev
= 0x0040010a,
588 .crtc_dclk
= 0xa1700030,
589 .crtc_gclk
= 0x80cc0015,
590 .crtc_goe
= 0x80cc0015,
591 .crtc_ps1_active
= 0x61060017,
594 .pixclk_divider_rotated
= 4,
595 .pixclk_src
= CLK_SRC_XTAL
,
597 .sysclk_src
= CLK_SRC_PLL
,
600 static struct w100_gpio_regs e750_w100_gpio_info
= {
601 .init_data1
= 0x01192f1b,
602 .gpio_dir1
= 0xd5ffdeff,
603 .gpio_oe1
= 0x000020bf,
604 .init_data2
= 0x010f010f,
605 .gpio_dir2
= 0xffffffff,
606 .gpio_oe2
= 0x000001cf,
609 static struct w100fb_mach_info e750_fb_info
= {
610 .modelist
= &e750_lcd_mode
,
612 .regs
= &e750_lcd_regs
,
613 .gpio
= &e750_w100_gpio_info
,
614 .xtal_freq
= 14318000,
618 static struct resource e750_fb_resources
[] = {
622 .flags
= IORESOURCE_MEM
,
626 static struct platform_device e750_fb_device
= {
630 .platform_data
= &e750_fb_info
,
632 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
633 .resource
= e750_fb_resources
,
636 /* -------------------- e750 MFP parameters -------------------- */
638 static unsigned long e750_pin_config
[] __initdata
= {
640 GPIO15_nCS_1
, /* CS1 - Flash */
641 GPIO79_nCS_3
, /* CS3 - IMAGEON */
642 GPIO80_nCS_4
, /* CS4 - TMIO */
652 /* TMIO controller */
653 GPIO19_GPIO
, /* t7l66xb #PCLR */
654 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
661 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
665 GPIO29_AC97_SDATA_IN_0
,
666 GPIO30_AC97_SDATA_OUT
,
669 /* Audio power control */
670 GPIO4_GPIO
, /* Headphone amp power */
671 GPIO7_GPIO
, /* Speaker amp power */
672 GPIO37_GPIO
, /* Headphone detect */
675 GPIO8_GPIO
, /* CD0 */
676 GPIO44_GPIO
, /* CD1 */
677 GPIO11_GPIO
, /* IRQ0 */
678 GPIO6_GPIO
, /* IRQ1 */
679 GPIO27_GPIO
, /* RST0 */
680 GPIO24_GPIO
, /* RST1 */
681 GPIO20_GPIO
, /* PWR0 */
682 GPIO23_GPIO
, /* PWR1 */
695 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
698 /* ----------------- e750 tc6393xb parameters ------------------ */
700 static struct tc6393xb_platform_data e750_tc6393xb_info
= {
701 .irq_base
= IRQ_BOARD_START
,
702 .scr_pll2cr
= 0x0cc1,
705 .suspend
= &eseries_tmio_suspend
,
706 .resume
= &eseries_tmio_resume
,
707 .enable
= &eseries_tmio_enable
,
708 .disable
= &eseries_tmio_disable
,
711 static struct platform_device e750_tc6393xb_device
= {
715 .platform_data
= &e750_tc6393xb_info
,
718 .resource
= eseries_tmio_resources
,
721 /* ------------------------------------------------------------- */
723 static struct platform_device
*e750_devices
[] __initdata
= {
725 &e750_tc6393xb_device
,
729 static void __init
e750_init(void)
731 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config
));
732 pxa_set_ffuart_info(NULL
);
733 pxa_set_btuart_info(NULL
);
734 pxa_set_stuart_info(NULL
);
735 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device
.name
,
737 eseries_get_tmio_gpios();
738 platform_add_devices(ARRAY_AND_SIZE(e750_devices
));
739 pxa_set_ac97_info(NULL
);
740 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
743 MACHINE_START(E750
, "Toshiba e750")
744 /* Maintainer: Ian Molton (spyro@f2s.com) */
745 .atag_offset
= 0x100,
746 .map_io
= pxa25x_map_io
,
747 .nr_irqs
= ESERIES_NR_IRQS
,
748 .init_irq
= pxa25x_init_irq
,
749 .handle_irq
= pxa25x_handle_irq
,
750 .fixup
= eseries_fixup
,
751 .init_machine
= e750_init
,
756 #ifdef CONFIG_MACH_E800
757 /* ------------------------ e800 LCD definitions ------------------------- */
759 static unsigned long e800_pin_config
[] __initdata
= {
762 GPIO29_AC97_SDATA_IN_0
,
763 GPIO30_AC97_SDATA_OUT
,
767 static struct w100_gen_regs e800_lcd_regs
= {
768 .lcd_format
= 0x00008003,
769 .lcdd_cntl1
= 0x02a00000,
770 .lcdd_cntl2
= 0x0003ffff,
771 .genlcd_cntl1
= 0x000ff2a3,
772 .genlcd_cntl2
= 0x000002a3,
773 .genlcd_cntl3
= 0x000102aa,
776 static struct w100_mode e800_lcd_mode
[2] = {
784 .crtc_ss
= 0x80350034,
785 .crtc_ls
= 0x802b0026,
786 .crtc_gs
= 0x80160016,
787 .crtc_vpos_gs
= 0x00020003,
788 .crtc_rev
= 0x0040001d,
789 .crtc_dclk
= 0xe0000000,
790 .crtc_gclk
= 0x82a50049,
791 .crtc_goe
= 0x80ee001c,
792 .crtc_ps1_active
= 0x00000000,
795 .pixclk_divider_rotated
= 6,
796 .pixclk_src
= CLK_SRC_PLL
,
798 .sysclk_src
= CLK_SRC_PLL
,
807 .crtc_ss
= 0xd010000f,
808 .crtc_ls
= 0x80070003,
809 .crtc_gs
= 0x80000000,
810 .crtc_vpos_gs
= 0x01460147,
811 .crtc_rev
= 0x00400003,
812 .crtc_dclk
= 0xa1700030,
813 .crtc_gclk
= 0x814b0008,
814 .crtc_goe
= 0x80cc0015,
815 .crtc_ps1_active
= 0x00000000,
817 .pixclk_divider
= 6, /* Wince uses 14 which gives a */
818 .pixclk_divider_rotated
= 6, /* 7MHz Pclk. We use a 14MHz one */
819 .pixclk_src
= CLK_SRC_PLL
,
821 .sysclk_src
= CLK_SRC_PLL
,
826 static struct w100_gpio_regs e800_w100_gpio_info
= {
827 .init_data1
= 0xc13fc019,
828 .gpio_dir1
= 0x3e40df7f,
829 .gpio_oe1
= 0x003c3000,
830 .init_data2
= 0x00000000,
831 .gpio_dir2
= 0x00000000,
832 .gpio_oe2
= 0x00000000,
835 static struct w100_mem_info e800_w100_mem_info
= {
836 .ext_cntl
= 0x09640011,
837 .sdram_mode_reg
= 0x00600021,
838 .ext_timing_cntl
= 0x10001545,
839 .io_cntl
= 0x7ddd7333,
843 static void e800_tg_change(struct w100fb_par
*par
)
847 tmp
= w100fb_gpio_read(W100_GPIO_PORT_A
);
848 if (par
->mode
->xres
== 480)
852 w100fb_gpio_write(W100_GPIO_PORT_A
, tmp
);
855 static struct w100_tg_info e800_tg_info
= {
856 .change
= e800_tg_change
,
859 static struct w100fb_mach_info e800_fb_info
= {
860 .modelist
= e800_lcd_mode
,
862 .regs
= &e800_lcd_regs
,
863 .gpio
= &e800_w100_gpio_info
,
864 .mem
= &e800_w100_mem_info
,
866 .xtal_freq
= 16000000,
869 static struct resource e800_fb_resources
[] = {
873 .flags
= IORESOURCE_MEM
,
877 static struct platform_device e800_fb_device
= {
881 .platform_data
= &e800_fb_info
,
883 .num_resources
= ARRAY_SIZE(e800_fb_resources
),
884 .resource
= e800_fb_resources
,
887 /* --------------------------- UDC definitions --------------------------- */
889 static struct gpio_vbus_mach_info e800_udc_info
= {
890 .gpio_vbus
= GPIO_E800_USB_DISC
,
891 .gpio_pullup
= GPIO_E800_USB_PULLUP
,
892 .gpio_pullup_inverted
= 1
895 static struct platform_device e800_gpio_vbus
= {
899 .platform_data
= &e800_udc_info
,
904 /* ----------------- e800 tc6393xb parameters ------------------ */
906 static struct tc6393xb_platform_data e800_tc6393xb_info
= {
907 .irq_base
= IRQ_BOARD_START
,
908 .scr_pll2cr
= 0x0cc1,
911 .suspend
= &eseries_tmio_suspend
,
912 .resume
= &eseries_tmio_resume
,
913 .enable
= &eseries_tmio_enable
,
914 .disable
= &eseries_tmio_disable
,
917 static struct platform_device e800_tc6393xb_device
= {
921 .platform_data
= &e800_tc6393xb_info
,
924 .resource
= eseries_tmio_resources
,
927 /* ----------------------------------------------------------------------- */
929 static struct platform_device
*e800_devices
[] __initdata
= {
931 &e800_tc6393xb_device
,
935 static void __init
e800_init(void)
937 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config
));
938 pxa_set_ffuart_info(NULL
);
939 pxa_set_btuart_info(NULL
);
940 pxa_set_stuart_info(NULL
);
941 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device
.name
,
943 eseries_get_tmio_gpios();
944 platform_add_devices(ARRAY_AND_SIZE(e800_devices
));
945 pxa_set_ac97_info(NULL
);
948 MACHINE_START(E800
, "Toshiba e800")
949 /* Maintainer: Ian Molton (spyro@f2s.com) */
950 .atag_offset
= 0x100,
951 .map_io
= pxa25x_map_io
,
952 .nr_irqs
= ESERIES_NR_IRQS
,
953 .init_irq
= pxa25x_init_irq
,
954 .handle_irq
= pxa25x_handle_irq
,
955 .fixup
= eseries_fixup
,
956 .init_machine
= e800_init
,