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>
24 #include <linux/memblock.h>
26 #include <video/w100fb.h>
28 #include <asm/setup.h>
29 #include <asm/mach/arch.h>
30 #include <asm/mach-types.h>
32 #include <mach/pxa25x.h>
33 #include <mach/eseries-gpio.h>
34 #include <mach/eseries-irq.h>
35 #include <mach/audio.h>
36 #include <linux/platform_data/video-pxafb.h>
38 #include <linux/platform_data/irda-pxaficp.h>
44 /* Only e800 has 128MB RAM */
45 void __init
eseries_fixup(struct tag
*tags
, char **cmdline
)
47 if (machine_is_e800())
48 memblock_add(0xa0000000, SZ_128M
);
50 memblock_add(0xa0000000, SZ_64M
);
53 struct gpio_vbus_mach_info e7xx_udc_info
= {
54 .gpio_vbus
= GPIO_E7XX_USB_DISC
,
55 .gpio_pullup
= GPIO_E7XX_USB_PULLUP
,
56 .gpio_pullup_inverted
= 1
59 static struct platform_device e7xx_gpio_vbus
= {
63 .platform_data
= &e7xx_udc_info
,
67 struct pxaficp_platform_data e7xx_ficp_platform_data
= {
68 .gpio_pwdown
= GPIO_E7XX_IR_OFF
,
69 .transceiver_cap
= IR_SIRMODE
| IR_OFF
,
72 int eseries_tmio_enable(struct platform_device
*dev
)
74 /* Reset - bring SUSPEND high before PCLR */
75 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
76 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
78 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
80 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 1);
85 int eseries_tmio_disable(struct platform_device
*dev
)
87 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
88 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
92 int eseries_tmio_suspend(struct platform_device
*dev
)
94 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
98 int eseries_tmio_resume(struct platform_device
*dev
)
100 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
105 void eseries_get_tmio_gpios(void)
107 gpio_request(GPIO_ESERIES_TMIO_SUSPEND
, NULL
);
108 gpio_request(GPIO_ESERIES_TMIO_PCLR
, NULL
);
109 gpio_direction_output(GPIO_ESERIES_TMIO_SUSPEND
, 0);
110 gpio_direction_output(GPIO_ESERIES_TMIO_PCLR
, 0);
113 /* TMIO controller uses the same resources on all e-series machines. */
114 struct resource eseries_tmio_resources
[] = {
116 .start
= PXA_CS4_PHYS
,
117 .end
= PXA_CS4_PHYS
+ 0x1fffff,
118 .flags
= IORESOURCE_MEM
,
121 .start
= PXA_GPIO_TO_IRQ(GPIO_ESERIES_TMIO_IRQ
),
122 .end
= PXA_GPIO_TO_IRQ(GPIO_ESERIES_TMIO_IRQ
),
123 .flags
= IORESOURCE_IRQ
,
127 /* Some e-series hardware cannot control the 32K clock */
128 static void clk_32k_dummy(struct clk
*clk
)
132 static const struct clkops clk_32k_dummy_ops
= {
133 .enable
= clk_32k_dummy
,
134 .disable
= clk_32k_dummy
,
137 static struct clk tmio_dummy_clk
= {
138 .ops
= &clk_32k_dummy_ops
,
142 static struct clk_lookup eseries_clkregs
[] = {
143 INIT_CLKREG(&tmio_dummy_clk
, NULL
, "CLK_CK32K"),
146 static void __init
eseries_register_clks(void)
148 clkdev_add_table(eseries_clkregs
, ARRAY_SIZE(eseries_clkregs
));
151 #ifdef CONFIG_MACH_E330
152 /* -------------------- e330 tc6387xb parameters -------------------- */
154 static struct tc6387xb_platform_data e330_tc6387xb_info
= {
155 .enable
= &eseries_tmio_enable
,
156 .disable
= &eseries_tmio_disable
,
157 .suspend
= &eseries_tmio_suspend
,
158 .resume
= &eseries_tmio_resume
,
161 static struct platform_device e330_tc6387xb_device
= {
165 .platform_data
= &e330_tc6387xb_info
,
168 .resource
= eseries_tmio_resources
,
171 /* --------------------------------------------------------------- */
173 static struct platform_device
*e330_devices
[] __initdata
= {
174 &e330_tc6387xb_device
,
178 static void __init
e330_init(void)
180 pxa_set_ffuart_info(NULL
);
181 pxa_set_btuart_info(NULL
);
182 pxa_set_stuart_info(NULL
);
183 eseries_register_clks();
184 eseries_get_tmio_gpios();
185 platform_add_devices(ARRAY_AND_SIZE(e330_devices
));
188 MACHINE_START(E330
, "Toshiba e330")
189 /* Maintainer: Ian Molton (spyro@f2s.com) */
190 .atag_offset
= 0x100,
191 .map_io
= pxa25x_map_io
,
192 .nr_irqs
= ESERIES_NR_IRQS
,
193 .init_irq
= pxa25x_init_irq
,
194 .handle_irq
= pxa25x_handle_irq
,
195 .fixup
= eseries_fixup
,
196 .init_machine
= e330_init
,
197 .init_time
= pxa_timer_init
,
198 .restart
= pxa_restart
,
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
,
248 .init_time
= pxa_timer_init
,
249 .restart
= pxa_restart
,
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
,
372 .init_time
= pxa_timer_init
,
373 .restart
= pxa_restart
,
377 #ifdef CONFIG_MACH_E740
378 /* ------------------------ e740 video support --------------------------- */
380 static struct w100_gen_regs e740_lcd_regs
= {
381 .lcd_format
= 0x00008023,
382 .lcdd_cntl1
= 0x0f000000,
383 .lcdd_cntl2
= 0x0003ffff,
384 .genlcd_cntl1
= 0x00ffff03,
385 .genlcd_cntl2
= 0x003c0f03,
386 .genlcd_cntl3
= 0x000143aa,
389 static struct w100_mode e740_lcd_mode
= {
396 .crtc_ss
= 0x80140013,
397 .crtc_ls
= 0x81150110,
398 .crtc_gs
= 0x80050005,
399 .crtc_vpos_gs
= 0x000a0009,
400 .crtc_rev
= 0x0040010a,
401 .crtc_dclk
= 0xa906000a,
402 .crtc_gclk
= 0x80050108,
403 .crtc_goe
= 0x80050108,
406 .pixclk_divider_rotated
= 4,
407 .pixclk_src
= CLK_SRC_XTAL
,
409 .sysclk_src
= CLK_SRC_PLL
,
410 .crtc_ps1_active
= 0x41060010,
413 static struct w100_gpio_regs e740_w100_gpio_info
= {
414 .init_data1
= 0x21002103,
415 .gpio_dir1
= 0xffffdeff,
416 .gpio_oe1
= 0x03c00643,
417 .init_data2
= 0x003f003f,
418 .gpio_dir2
= 0xffffffff,
419 .gpio_oe2
= 0x000000ff,
422 static struct w100fb_mach_info e740_fb_info
= {
423 .modelist
= &e740_lcd_mode
,
425 .regs
= &e740_lcd_regs
,
426 .gpio
= &e740_w100_gpio_info
,
427 .xtal_freq
= 14318000,
431 static struct resource e740_fb_resources
[] = {
435 .flags
= IORESOURCE_MEM
,
439 static struct platform_device e740_fb_device
= {
443 .platform_data
= &e740_fb_info
,
445 .num_resources
= ARRAY_SIZE(e740_fb_resources
),
446 .resource
= e740_fb_resources
,
449 /* --------------------------- MFP Pin config -------------------------- */
451 static unsigned long e740_pin_config
[] __initdata
= {
453 GPIO15_nCS_1
, /* CS1 - Flash */
454 GPIO79_nCS_3
, /* CS3 - IMAGEON */
455 GPIO80_nCS_4
, /* CS4 - TMIO */
465 /* TMIO controller */
466 GPIO19_GPIO
, /* t7l66xb #PCLR */
467 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
474 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
478 GPIO29_AC97_SDATA_IN_0
,
479 GPIO30_AC97_SDATA_OUT
,
482 /* Audio power control */
483 GPIO16_GPIO
, /* AC97 codec AVDD2 supply (analogue power) */
484 GPIO40_GPIO
, /* Mic amp power */
485 GPIO41_GPIO
, /* Headphone amp power */
488 GPIO8_GPIO
, /* CD0 */
489 GPIO44_GPIO
, /* CD1 */
490 GPIO11_GPIO
, /* IRQ0 */
491 GPIO6_GPIO
, /* IRQ1 */
492 GPIO27_GPIO
, /* RST0 */
493 GPIO24_GPIO
, /* RST1 */
494 GPIO20_GPIO
, /* PWR0 */
495 GPIO23_GPIO
, /* PWR1 */
508 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
511 /* -------------------- e740 t7l66xb parameters -------------------- */
513 static struct t7l66xb_platform_data e740_t7l66xb_info
= {
514 .irq_base
= IRQ_BOARD_START
,
515 .enable
= &eseries_tmio_enable
,
516 .suspend
= &eseries_tmio_suspend
,
517 .resume
= &eseries_tmio_resume
,
520 static struct platform_device e740_t7l66xb_device
= {
524 .platform_data
= &e740_t7l66xb_info
,
527 .resource
= eseries_tmio_resources
,
530 static struct platform_device e740_audio_device
= {
531 .name
= "e740-audio",
535 /* ----------------------------------------------------------------------- */
537 static struct platform_device
*e740_devices
[] __initdata
= {
539 &e740_t7l66xb_device
,
544 static void __init
e740_init(void)
546 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
547 pxa_set_ffuart_info(NULL
);
548 pxa_set_btuart_info(NULL
);
549 pxa_set_stuart_info(NULL
);
550 eseries_register_clks();
551 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
552 "UDCCLK", &pxa25x_device_udc
.dev
),
553 eseries_get_tmio_gpios();
554 platform_add_devices(ARRAY_AND_SIZE(e740_devices
));
555 pxa_set_ac97_info(NULL
);
556 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
559 MACHINE_START(E740
, "Toshiba e740")
560 /* Maintainer: Ian Molton (spyro@f2s.com) */
561 .atag_offset
= 0x100,
562 .map_io
= pxa25x_map_io
,
563 .nr_irqs
= ESERIES_NR_IRQS
,
564 .init_irq
= pxa25x_init_irq
,
565 .handle_irq
= pxa25x_handle_irq
,
566 .fixup
= eseries_fixup
,
567 .init_machine
= e740_init
,
568 .init_time
= pxa_timer_init
,
569 .restart
= pxa_restart
,
573 #ifdef CONFIG_MACH_E750
574 /* ---------------------- E750 LCD definitions -------------------- */
576 static struct w100_gen_regs e750_lcd_regs
= {
577 .lcd_format
= 0x00008003,
578 .lcdd_cntl1
= 0x00000000,
579 .lcdd_cntl2
= 0x0003ffff,
580 .genlcd_cntl1
= 0x00fff003,
581 .genlcd_cntl2
= 0x003c0f03,
582 .genlcd_cntl3
= 0x000143aa,
585 static struct w100_mode e750_lcd_mode
= {
592 .crtc_ss
= 0x80150014,
593 .crtc_ls
= 0x8014000d,
594 .crtc_gs
= 0xc1000005,
595 .crtc_vpos_gs
= 0x00020147,
596 .crtc_rev
= 0x0040010a,
597 .crtc_dclk
= 0xa1700030,
598 .crtc_gclk
= 0x80cc0015,
599 .crtc_goe
= 0x80cc0015,
600 .crtc_ps1_active
= 0x61060017,
603 .pixclk_divider_rotated
= 4,
604 .pixclk_src
= CLK_SRC_XTAL
,
606 .sysclk_src
= CLK_SRC_PLL
,
609 static struct w100_gpio_regs e750_w100_gpio_info
= {
610 .init_data1
= 0x01192f1b,
611 .gpio_dir1
= 0xd5ffdeff,
612 .gpio_oe1
= 0x000020bf,
613 .init_data2
= 0x010f010f,
614 .gpio_dir2
= 0xffffffff,
615 .gpio_oe2
= 0x000001cf,
618 static struct w100fb_mach_info e750_fb_info
= {
619 .modelist
= &e750_lcd_mode
,
621 .regs
= &e750_lcd_regs
,
622 .gpio
= &e750_w100_gpio_info
,
623 .xtal_freq
= 14318000,
627 static struct resource e750_fb_resources
[] = {
631 .flags
= IORESOURCE_MEM
,
635 static struct platform_device e750_fb_device
= {
639 .platform_data
= &e750_fb_info
,
641 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
642 .resource
= e750_fb_resources
,
645 /* -------------------- e750 MFP parameters -------------------- */
647 static unsigned long e750_pin_config
[] __initdata
= {
649 GPIO15_nCS_1
, /* CS1 - Flash */
650 GPIO79_nCS_3
, /* CS3 - IMAGEON */
651 GPIO80_nCS_4
, /* CS4 - TMIO */
661 /* TMIO controller */
662 GPIO19_GPIO
, /* t7l66xb #PCLR */
663 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
670 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
674 GPIO29_AC97_SDATA_IN_0
,
675 GPIO30_AC97_SDATA_OUT
,
678 /* Audio power control */
679 GPIO4_GPIO
, /* Headphone amp power */
680 GPIO7_GPIO
, /* Speaker amp power */
681 GPIO37_GPIO
, /* Headphone detect */
684 GPIO8_GPIO
, /* CD0 */
685 GPIO44_GPIO
, /* CD1 */
686 GPIO11_GPIO
, /* IRQ0 */
687 GPIO6_GPIO
, /* IRQ1 */
688 GPIO27_GPIO
, /* RST0 */
689 GPIO24_GPIO
, /* RST1 */
690 GPIO20_GPIO
, /* PWR0 */
691 GPIO23_GPIO
, /* PWR1 */
704 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
707 /* ----------------- e750 tc6393xb parameters ------------------ */
709 static struct tc6393xb_platform_data e750_tc6393xb_info
= {
710 .irq_base
= IRQ_BOARD_START
,
711 .scr_pll2cr
= 0x0cc1,
714 .suspend
= &eseries_tmio_suspend
,
715 .resume
= &eseries_tmio_resume
,
716 .enable
= &eseries_tmio_enable
,
717 .disable
= &eseries_tmio_disable
,
720 static struct platform_device e750_tc6393xb_device
= {
724 .platform_data
= &e750_tc6393xb_info
,
727 .resource
= eseries_tmio_resources
,
730 static struct platform_device e750_audio_device
= {
731 .name
= "e750-audio",
735 /* ------------------------------------------------------------- */
737 static struct platform_device
*e750_devices
[] __initdata
= {
739 &e750_tc6393xb_device
,
744 static void __init
e750_init(void)
746 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config
));
747 pxa_set_ffuart_info(NULL
);
748 pxa_set_btuart_info(NULL
);
749 pxa_set_stuart_info(NULL
);
750 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device
.name
,
752 eseries_get_tmio_gpios();
753 platform_add_devices(ARRAY_AND_SIZE(e750_devices
));
754 pxa_set_ac97_info(NULL
);
755 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
758 MACHINE_START(E750
, "Toshiba e750")
759 /* Maintainer: Ian Molton (spyro@f2s.com) */
760 .atag_offset
= 0x100,
761 .map_io
= pxa25x_map_io
,
762 .nr_irqs
= ESERIES_NR_IRQS
,
763 .init_irq
= pxa25x_init_irq
,
764 .handle_irq
= pxa25x_handle_irq
,
765 .fixup
= eseries_fixup
,
766 .init_machine
= e750_init
,
767 .init_time
= pxa_timer_init
,
768 .restart
= pxa_restart
,
772 #ifdef CONFIG_MACH_E800
773 /* ------------------------ e800 LCD definitions ------------------------- */
775 static unsigned long e800_pin_config
[] __initdata
= {
778 GPIO29_AC97_SDATA_IN_0
,
779 GPIO30_AC97_SDATA_OUT
,
783 static struct w100_gen_regs e800_lcd_regs
= {
784 .lcd_format
= 0x00008003,
785 .lcdd_cntl1
= 0x02a00000,
786 .lcdd_cntl2
= 0x0003ffff,
787 .genlcd_cntl1
= 0x000ff2a3,
788 .genlcd_cntl2
= 0x000002a3,
789 .genlcd_cntl3
= 0x000102aa,
792 static struct w100_mode e800_lcd_mode
[2] = {
800 .crtc_ss
= 0x80350034,
801 .crtc_ls
= 0x802b0026,
802 .crtc_gs
= 0x80160016,
803 .crtc_vpos_gs
= 0x00020003,
804 .crtc_rev
= 0x0040001d,
805 .crtc_dclk
= 0xe0000000,
806 .crtc_gclk
= 0x82a50049,
807 .crtc_goe
= 0x80ee001c,
808 .crtc_ps1_active
= 0x00000000,
811 .pixclk_divider_rotated
= 6,
812 .pixclk_src
= CLK_SRC_PLL
,
814 .sysclk_src
= CLK_SRC_PLL
,
823 .crtc_ss
= 0xd010000f,
824 .crtc_ls
= 0x80070003,
825 .crtc_gs
= 0x80000000,
826 .crtc_vpos_gs
= 0x01460147,
827 .crtc_rev
= 0x00400003,
828 .crtc_dclk
= 0xa1700030,
829 .crtc_gclk
= 0x814b0008,
830 .crtc_goe
= 0x80cc0015,
831 .crtc_ps1_active
= 0x00000000,
833 .pixclk_divider
= 6, /* Wince uses 14 which gives a */
834 .pixclk_divider_rotated
= 6, /* 7MHz Pclk. We use a 14MHz one */
835 .pixclk_src
= CLK_SRC_PLL
,
837 .sysclk_src
= CLK_SRC_PLL
,
842 static struct w100_gpio_regs e800_w100_gpio_info
= {
843 .init_data1
= 0xc13fc019,
844 .gpio_dir1
= 0x3e40df7f,
845 .gpio_oe1
= 0x003c3000,
846 .init_data2
= 0x00000000,
847 .gpio_dir2
= 0x00000000,
848 .gpio_oe2
= 0x00000000,
851 static struct w100_mem_info e800_w100_mem_info
= {
852 .ext_cntl
= 0x09640011,
853 .sdram_mode_reg
= 0x00600021,
854 .ext_timing_cntl
= 0x10001545,
855 .io_cntl
= 0x7ddd7333,
859 static void e800_tg_change(struct w100fb_par
*par
)
863 tmp
= w100fb_gpio_read(W100_GPIO_PORT_A
);
864 if (par
->mode
->xres
== 480)
868 w100fb_gpio_write(W100_GPIO_PORT_A
, tmp
);
871 static struct w100_tg_info e800_tg_info
= {
872 .change
= e800_tg_change
,
875 static struct w100fb_mach_info e800_fb_info
= {
876 .modelist
= e800_lcd_mode
,
878 .regs
= &e800_lcd_regs
,
879 .gpio
= &e800_w100_gpio_info
,
880 .mem
= &e800_w100_mem_info
,
882 .xtal_freq
= 16000000,
885 static struct resource e800_fb_resources
[] = {
889 .flags
= IORESOURCE_MEM
,
893 static struct platform_device e800_fb_device
= {
897 .platform_data
= &e800_fb_info
,
899 .num_resources
= ARRAY_SIZE(e800_fb_resources
),
900 .resource
= e800_fb_resources
,
903 /* --------------------------- UDC definitions --------------------------- */
905 static struct gpio_vbus_mach_info e800_udc_info
= {
906 .gpio_vbus
= GPIO_E800_USB_DISC
,
907 .gpio_pullup
= GPIO_E800_USB_PULLUP
,
908 .gpio_pullup_inverted
= 1
911 static struct platform_device e800_gpio_vbus
= {
915 .platform_data
= &e800_udc_info
,
920 /* ----------------- e800 tc6393xb parameters ------------------ */
922 static struct tc6393xb_platform_data e800_tc6393xb_info
= {
923 .irq_base
= IRQ_BOARD_START
,
924 .scr_pll2cr
= 0x0cc1,
927 .suspend
= &eseries_tmio_suspend
,
928 .resume
= &eseries_tmio_resume
,
929 .enable
= &eseries_tmio_enable
,
930 .disable
= &eseries_tmio_disable
,
933 static struct platform_device e800_tc6393xb_device
= {
937 .platform_data
= &e800_tc6393xb_info
,
940 .resource
= eseries_tmio_resources
,
943 static struct platform_device e800_audio_device
= {
944 .name
= "e800-audio",
948 /* ----------------------------------------------------------------------- */
950 static struct platform_device
*e800_devices
[] __initdata
= {
952 &e800_tc6393xb_device
,
957 static void __init
e800_init(void)
959 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config
));
960 pxa_set_ffuart_info(NULL
);
961 pxa_set_btuart_info(NULL
);
962 pxa_set_stuart_info(NULL
);
963 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device
.name
,
965 eseries_get_tmio_gpios();
966 platform_add_devices(ARRAY_AND_SIZE(e800_devices
));
967 pxa_set_ac97_info(NULL
);
970 MACHINE_START(E800
, "Toshiba e800")
971 /* Maintainer: Ian Molton (spyro@f2s.com) */
972 .atag_offset
= 0x100,
973 .map_io
= pxa25x_map_io
,
974 .nr_irqs
= ESERIES_NR_IRQS
,
975 .init_irq
= pxa25x_init_irq
,
976 .handle_irq
= pxa25x_handle_irq
,
977 .fixup
= eseries_fixup
,
978 .init_machine
= e800_init
,
979 .init_time
= pxa_timer_init
,
980 .restart
= pxa_restart
,