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/clk-provider.h>
16 #include <linux/gpio.h>
17 #include <linux/delay.h>
18 #include <linux/platform_device.h>
19 #include <linux/mfd/tc6387xb.h>
20 #include <linux/mfd/tc6393xb.h>
21 #include <linux/mfd/t7l66xb.h>
22 #include <linux/mtd/nand.h>
23 #include <linux/mtd/partitions.h>
24 #include <linux/usb/gpio_vbus.h>
25 #include <linux/memblock.h>
27 #include <video/w100fb.h>
29 #include <asm/setup.h>
30 #include <asm/mach/arch.h>
31 #include <asm/mach-types.h>
33 #include <mach/pxa25x.h>
34 #include <mach/eseries-gpio.h>
35 #include <mach/eseries-irq.h>
36 #include <mach/audio.h>
37 #include <linux/platform_data/video-pxafb.h>
39 #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 __init
eseries_register_clks(void)
130 clk_register_fixed_rate(NULL
, "CLK_CK32K", NULL
, CLK_IS_ROOT
, 32768);
133 #ifdef CONFIG_MACH_E330
134 /* -------------------- e330 tc6387xb parameters -------------------- */
136 static struct tc6387xb_platform_data e330_tc6387xb_info
= {
137 .enable
= &eseries_tmio_enable
,
138 .disable
= &eseries_tmio_disable
,
139 .suspend
= &eseries_tmio_suspend
,
140 .resume
= &eseries_tmio_resume
,
143 static struct platform_device e330_tc6387xb_device
= {
147 .platform_data
= &e330_tc6387xb_info
,
150 .resource
= eseries_tmio_resources
,
153 /* --------------------------------------------------------------- */
155 static struct platform_device
*e330_devices
[] __initdata
= {
156 &e330_tc6387xb_device
,
160 static void __init
e330_init(void)
162 pxa_set_ffuart_info(NULL
);
163 pxa_set_btuart_info(NULL
);
164 pxa_set_stuart_info(NULL
);
165 eseries_register_clks();
166 eseries_get_tmio_gpios();
167 platform_add_devices(ARRAY_AND_SIZE(e330_devices
));
170 MACHINE_START(E330
, "Toshiba e330")
171 /* Maintainer: Ian Molton (spyro@f2s.com) */
172 .atag_offset
= 0x100,
173 .map_io
= pxa25x_map_io
,
174 .nr_irqs
= ESERIES_NR_IRQS
,
175 .init_irq
= pxa25x_init_irq
,
176 .handle_irq
= pxa25x_handle_irq
,
177 .fixup
= eseries_fixup
,
178 .init_machine
= e330_init
,
179 .init_time
= pxa_timer_init
,
180 .restart
= pxa_restart
,
184 #ifdef CONFIG_MACH_E350
185 /* -------------------- e350 t7l66xb parameters -------------------- */
187 static struct t7l66xb_platform_data e350_t7l66xb_info
= {
188 .irq_base
= IRQ_BOARD_START
,
189 .enable
= &eseries_tmio_enable
,
190 .suspend
= &eseries_tmio_suspend
,
191 .resume
= &eseries_tmio_resume
,
194 static struct platform_device e350_t7l66xb_device
= {
198 .platform_data
= &e350_t7l66xb_info
,
201 .resource
= eseries_tmio_resources
,
204 /* ---------------------------------------------------------- */
206 static struct platform_device
*e350_devices
[] __initdata
= {
207 &e350_t7l66xb_device
,
211 static void __init
e350_init(void)
213 pxa_set_ffuart_info(NULL
);
214 pxa_set_btuart_info(NULL
);
215 pxa_set_stuart_info(NULL
);
216 eseries_register_clks();
217 eseries_get_tmio_gpios();
218 platform_add_devices(ARRAY_AND_SIZE(e350_devices
));
221 MACHINE_START(E350
, "Toshiba e350")
222 /* Maintainer: Ian Molton (spyro@f2s.com) */
223 .atag_offset
= 0x100,
224 .map_io
= pxa25x_map_io
,
225 .nr_irqs
= ESERIES_NR_IRQS
,
226 .init_irq
= pxa25x_init_irq
,
227 .handle_irq
= pxa25x_handle_irq
,
228 .fixup
= eseries_fixup
,
229 .init_machine
= e350_init
,
230 .init_time
= pxa_timer_init
,
231 .restart
= pxa_restart
,
235 #ifdef CONFIG_MACH_E400
236 /* ------------------------ E400 LCD definitions ------------------------ */
238 static struct pxafb_mode_info e400_pxafb_mode_info
= {
252 static struct pxafb_mach_info e400_pxafb_mach_info
= {
253 .modes
= &e400_pxafb_mode_info
,
255 .lcd_conn
= LCD_COLOR_TFT_16BPP
,
257 .pxafb_backlight_power
= NULL
,
260 /* ------------------------ E400 MFP config ----------------------------- */
262 static unsigned long e400_pin_config
[] __initdata
= {
264 GPIO15_nCS_1
, /* CS1 - Flash */
265 GPIO80_nCS_4
, /* CS4 - TMIO */
275 /* TMIO controller */
276 GPIO19_GPIO
, /* t7l66xb #PCLR */
277 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
280 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
283 /* ---------------------------------------------------------------------- */
285 static struct mtd_partition partition_a
= {
286 .name
= "Internal NAND flash",
288 .size
= MTDPART_SIZ_FULL
,
291 static uint8_t scan_ff_pattern
[] = { 0xff, 0xff };
293 static struct nand_bbt_descr e400_t7l66xb_nand_bbt
= {
297 .pattern
= scan_ff_pattern
300 static struct tmio_nand_data e400_t7l66xb_nand_config
= {
302 .partition
= &partition_a
,
303 .badblock_pattern
= &e400_t7l66xb_nand_bbt
,
306 static struct t7l66xb_platform_data e400_t7l66xb_info
= {
307 .irq_base
= IRQ_BOARD_START
,
308 .enable
= &eseries_tmio_enable
,
309 .suspend
= &eseries_tmio_suspend
,
310 .resume
= &eseries_tmio_resume
,
312 .nand_data
= &e400_t7l66xb_nand_config
,
315 static struct platform_device e400_t7l66xb_device
= {
319 .platform_data
= &e400_t7l66xb_info
,
322 .resource
= eseries_tmio_resources
,
325 /* ---------------------------------------------------------- */
327 static struct platform_device
*e400_devices
[] __initdata
= {
328 &e400_t7l66xb_device
,
332 static void __init
e400_init(void)
334 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config
));
335 pxa_set_ffuart_info(NULL
);
336 pxa_set_btuart_info(NULL
);
337 pxa_set_stuart_info(NULL
);
338 /* Fixme - e400 may have a switched clock */
339 eseries_register_clks();
340 eseries_get_tmio_gpios();
341 pxa_set_fb_info(NULL
, &e400_pxafb_mach_info
);
342 platform_add_devices(ARRAY_AND_SIZE(e400_devices
));
345 MACHINE_START(E400
, "Toshiba e400")
346 /* Maintainer: Ian Molton (spyro@f2s.com) */
347 .atag_offset
= 0x100,
348 .map_io
= pxa25x_map_io
,
349 .nr_irqs
= ESERIES_NR_IRQS
,
350 .init_irq
= pxa25x_init_irq
,
351 .handle_irq
= pxa25x_handle_irq
,
352 .fixup
= eseries_fixup
,
353 .init_machine
= e400_init
,
354 .init_time
= pxa_timer_init
,
355 .restart
= pxa_restart
,
359 #ifdef CONFIG_MACH_E740
360 /* ------------------------ e740 video support --------------------------- */
362 static struct w100_gen_regs e740_lcd_regs
= {
363 .lcd_format
= 0x00008023,
364 .lcdd_cntl1
= 0x0f000000,
365 .lcdd_cntl2
= 0x0003ffff,
366 .genlcd_cntl1
= 0x00ffff03,
367 .genlcd_cntl2
= 0x003c0f03,
368 .genlcd_cntl3
= 0x000143aa,
371 static struct w100_mode e740_lcd_mode
= {
378 .crtc_ss
= 0x80140013,
379 .crtc_ls
= 0x81150110,
380 .crtc_gs
= 0x80050005,
381 .crtc_vpos_gs
= 0x000a0009,
382 .crtc_rev
= 0x0040010a,
383 .crtc_dclk
= 0xa906000a,
384 .crtc_gclk
= 0x80050108,
385 .crtc_goe
= 0x80050108,
388 .pixclk_divider_rotated
= 4,
389 .pixclk_src
= CLK_SRC_XTAL
,
391 .sysclk_src
= CLK_SRC_PLL
,
392 .crtc_ps1_active
= 0x41060010,
395 static struct w100_gpio_regs e740_w100_gpio_info
= {
396 .init_data1
= 0x21002103,
397 .gpio_dir1
= 0xffffdeff,
398 .gpio_oe1
= 0x03c00643,
399 .init_data2
= 0x003f003f,
400 .gpio_dir2
= 0xffffffff,
401 .gpio_oe2
= 0x000000ff,
404 static struct w100fb_mach_info e740_fb_info
= {
405 .modelist
= &e740_lcd_mode
,
407 .regs
= &e740_lcd_regs
,
408 .gpio
= &e740_w100_gpio_info
,
409 .xtal_freq
= 14318000,
413 static struct resource e740_fb_resources
[] = {
417 .flags
= IORESOURCE_MEM
,
421 static struct platform_device e740_fb_device
= {
425 .platform_data
= &e740_fb_info
,
427 .num_resources
= ARRAY_SIZE(e740_fb_resources
),
428 .resource
= e740_fb_resources
,
431 /* --------------------------- MFP Pin config -------------------------- */
433 static unsigned long e740_pin_config
[] __initdata
= {
435 GPIO15_nCS_1
, /* CS1 - Flash */
436 GPIO79_nCS_3
, /* CS3 - IMAGEON */
437 GPIO80_nCS_4
, /* CS4 - TMIO */
447 /* TMIO controller */
448 GPIO19_GPIO
, /* t7l66xb #PCLR */
449 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
456 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
460 GPIO29_AC97_SDATA_IN_0
,
461 GPIO30_AC97_SDATA_OUT
,
464 /* Audio power control */
465 GPIO16_GPIO
, /* AC97 codec AVDD2 supply (analogue power) */
466 GPIO40_GPIO
, /* Mic amp power */
467 GPIO41_GPIO
, /* Headphone amp power */
470 GPIO8_GPIO
, /* CD0 */
471 GPIO44_GPIO
, /* CD1 */
472 GPIO11_GPIO
, /* IRQ0 */
473 GPIO6_GPIO
, /* IRQ1 */
474 GPIO27_GPIO
, /* RST0 */
475 GPIO24_GPIO
, /* RST1 */
476 GPIO20_GPIO
, /* PWR0 */
477 GPIO23_GPIO
, /* PWR1 */
490 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
493 /* -------------------- e740 t7l66xb parameters -------------------- */
495 static struct t7l66xb_platform_data e740_t7l66xb_info
= {
496 .irq_base
= IRQ_BOARD_START
,
497 .enable
= &eseries_tmio_enable
,
498 .suspend
= &eseries_tmio_suspend
,
499 .resume
= &eseries_tmio_resume
,
502 static struct platform_device e740_t7l66xb_device
= {
506 .platform_data
= &e740_t7l66xb_info
,
509 .resource
= eseries_tmio_resources
,
512 static struct platform_device e740_audio_device
= {
513 .name
= "e740-audio",
517 /* ----------------------------------------------------------------------- */
519 static struct platform_device
*e740_devices
[] __initdata
= {
521 &e740_t7l66xb_device
,
526 static void __init
e740_init(void)
528 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
529 pxa_set_ffuart_info(NULL
);
530 pxa_set_btuart_info(NULL
);
531 pxa_set_stuart_info(NULL
);
532 eseries_register_clks();
533 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
534 "UDCCLK", &pxa25x_device_udc
.dev
),
535 eseries_get_tmio_gpios();
536 platform_add_devices(ARRAY_AND_SIZE(e740_devices
));
537 pxa_set_ac97_info(NULL
);
538 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
541 MACHINE_START(E740
, "Toshiba e740")
542 /* Maintainer: Ian Molton (spyro@f2s.com) */
543 .atag_offset
= 0x100,
544 .map_io
= pxa25x_map_io
,
545 .nr_irqs
= ESERIES_NR_IRQS
,
546 .init_irq
= pxa25x_init_irq
,
547 .handle_irq
= pxa25x_handle_irq
,
548 .fixup
= eseries_fixup
,
549 .init_machine
= e740_init
,
550 .init_time
= pxa_timer_init
,
551 .restart
= pxa_restart
,
555 #ifdef CONFIG_MACH_E750
556 /* ---------------------- E750 LCD definitions -------------------- */
558 static struct w100_gen_regs e750_lcd_regs
= {
559 .lcd_format
= 0x00008003,
560 .lcdd_cntl1
= 0x00000000,
561 .lcdd_cntl2
= 0x0003ffff,
562 .genlcd_cntl1
= 0x00fff003,
563 .genlcd_cntl2
= 0x003c0f03,
564 .genlcd_cntl3
= 0x000143aa,
567 static struct w100_mode e750_lcd_mode
= {
574 .crtc_ss
= 0x80150014,
575 .crtc_ls
= 0x8014000d,
576 .crtc_gs
= 0xc1000005,
577 .crtc_vpos_gs
= 0x00020147,
578 .crtc_rev
= 0x0040010a,
579 .crtc_dclk
= 0xa1700030,
580 .crtc_gclk
= 0x80cc0015,
581 .crtc_goe
= 0x80cc0015,
582 .crtc_ps1_active
= 0x61060017,
585 .pixclk_divider_rotated
= 4,
586 .pixclk_src
= CLK_SRC_XTAL
,
588 .sysclk_src
= CLK_SRC_PLL
,
591 static struct w100_gpio_regs e750_w100_gpio_info
= {
592 .init_data1
= 0x01192f1b,
593 .gpio_dir1
= 0xd5ffdeff,
594 .gpio_oe1
= 0x000020bf,
595 .init_data2
= 0x010f010f,
596 .gpio_dir2
= 0xffffffff,
597 .gpio_oe2
= 0x000001cf,
600 static struct w100fb_mach_info e750_fb_info
= {
601 .modelist
= &e750_lcd_mode
,
603 .regs
= &e750_lcd_regs
,
604 .gpio
= &e750_w100_gpio_info
,
605 .xtal_freq
= 14318000,
609 static struct resource e750_fb_resources
[] = {
613 .flags
= IORESOURCE_MEM
,
617 static struct platform_device e750_fb_device
= {
621 .platform_data
= &e750_fb_info
,
623 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
624 .resource
= e750_fb_resources
,
627 /* -------------------- e750 MFP parameters -------------------- */
629 static unsigned long e750_pin_config
[] __initdata
= {
631 GPIO15_nCS_1
, /* CS1 - Flash */
632 GPIO79_nCS_3
, /* CS3 - IMAGEON */
633 GPIO80_nCS_4
, /* CS4 - TMIO */
643 /* TMIO controller */
644 GPIO19_GPIO
, /* t7l66xb #PCLR */
645 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
652 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
656 GPIO29_AC97_SDATA_IN_0
,
657 GPIO30_AC97_SDATA_OUT
,
660 /* Audio power control */
661 GPIO4_GPIO
, /* Headphone amp power */
662 GPIO7_GPIO
, /* Speaker amp power */
663 GPIO37_GPIO
, /* Headphone detect */
666 GPIO8_GPIO
, /* CD0 */
667 GPIO44_GPIO
, /* CD1 */
668 /* GPIO11_GPIO, IRQ0 */
669 GPIO6_GPIO
, /* IRQ1 */
670 GPIO27_GPIO
, /* RST0 */
671 GPIO24_GPIO
, /* RST1 */
672 GPIO20_GPIO
, /* PWR0 */
673 GPIO23_GPIO
, /* PWR1 */
686 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
689 /* ----------------- e750 tc6393xb parameters ------------------ */
691 static struct tc6393xb_platform_data e750_tc6393xb_info
= {
692 .irq_base
= IRQ_BOARD_START
,
693 .scr_pll2cr
= 0x0cc1,
696 .suspend
= &eseries_tmio_suspend
,
697 .resume
= &eseries_tmio_resume
,
698 .enable
= &eseries_tmio_enable
,
699 .disable
= &eseries_tmio_disable
,
702 static struct platform_device e750_tc6393xb_device
= {
706 .platform_data
= &e750_tc6393xb_info
,
709 .resource
= eseries_tmio_resources
,
712 static struct platform_device e750_audio_device
= {
713 .name
= "e750-audio",
717 /* ------------------------------------------------------------- */
719 static struct platform_device
*e750_devices
[] __initdata
= {
721 &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 .atag_offset
= 0x100,
743 .map_io
= pxa25x_map_io
,
744 .nr_irqs
= ESERIES_NR_IRQS
,
745 .init_irq
= pxa25x_init_irq
,
746 .handle_irq
= pxa25x_handle_irq
,
747 .fixup
= eseries_fixup
,
748 .init_machine
= e750_init
,
749 .init_time
= pxa_timer_init
,
750 .restart
= pxa_restart
,
754 #ifdef CONFIG_MACH_E800
755 /* ------------------------ e800 LCD definitions ------------------------- */
757 static unsigned long e800_pin_config
[] __initdata
= {
760 GPIO29_AC97_SDATA_IN_0
,
761 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 static struct platform_device e800_audio_device
= {
929 .name
= "e800-audio",
933 /* ----------------------------------------------------------------------- */
935 static struct platform_device
*e800_devices
[] __initdata
= {
937 &e800_tc6393xb_device
,
942 static void __init
e800_init(void)
944 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config
));
945 pxa_set_ffuart_info(NULL
);
946 pxa_set_btuart_info(NULL
);
947 pxa_set_stuart_info(NULL
);
948 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device
.name
,
950 eseries_get_tmio_gpios();
951 platform_add_devices(ARRAY_AND_SIZE(e800_devices
));
952 pxa_set_ac97_info(NULL
);
955 MACHINE_START(E800
, "Toshiba e800")
956 /* Maintainer: Ian Molton (spyro@f2s.com) */
957 .atag_offset
= 0x100,
958 .map_io
= pxa25x_map_io
,
959 .nr_irqs
= ESERIES_NR_IRQS
,
960 .init_irq
= pxa25x_init_irq
,
961 .handle_irq
= pxa25x_handle_irq
,
962 .fixup
= eseries_fixup
,
963 .init_machine
= e800_init
,
964 .init_time
= pxa_timer_init
,
965 .restart
= pxa_restart
,