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>
24 #include <video/w100fb.h>
26 #include <asm/setup.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach-types.h>
30 #include <mach/pxa25x.h>
31 #include <mach/eseries-gpio.h>
32 #include <mach/audio.h>
33 #include <mach/pxafb.h>
35 #include <mach/irda.h>
41 /* Only e800 has 128MB RAM */
42 void __init
eseries_fixup(struct machine_desc
*desc
,
43 struct tag
*tags
, char **cmdline
, struct meminfo
*mi
)
46 mi
->bank
[0].start
= 0xa0000000;
47 if (machine_is_e800())
48 mi
->bank
[0].size
= (128*1024*1024);
50 mi
->bank
[0].size
= (64*1024*1024);
53 struct pxa2xx_udc_mach_info e7xx_udc_mach_info
= {
54 .gpio_vbus
= GPIO_E7XX_USB_DISC
,
55 .gpio_pullup
= GPIO_E7XX_USB_PULLUP
,
56 .gpio_pullup_inverted
= 1
59 struct pxaficp_platform_data e7xx_ficp_platform_data
= {
60 .gpio_pwdown
= GPIO_E7XX_IR_OFF
,
61 .transceiver_cap
= IR_SIRMODE
| IR_OFF
,
64 int eseries_tmio_enable(struct platform_device
*dev
)
66 /* Reset - bring SUSPEND high before PCLR */
67 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
68 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
70 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
72 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 1);
77 int eseries_tmio_disable(struct platform_device
*dev
)
79 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
80 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
84 int eseries_tmio_suspend(struct platform_device
*dev
)
86 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
90 int eseries_tmio_resume(struct platform_device
*dev
)
92 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
97 void eseries_get_tmio_gpios(void)
99 gpio_request(GPIO_ESERIES_TMIO_SUSPEND
, NULL
);
100 gpio_request(GPIO_ESERIES_TMIO_PCLR
, NULL
);
101 gpio_direction_output(GPIO_ESERIES_TMIO_SUSPEND
, 0);
102 gpio_direction_output(GPIO_ESERIES_TMIO_PCLR
, 0);
105 /* TMIO controller uses the same resources on all e-series machines. */
106 struct resource eseries_tmio_resources
[] = {
108 .start
= PXA_CS4_PHYS
,
109 .end
= PXA_CS4_PHYS
+ 0x1fffff,
110 .flags
= IORESOURCE_MEM
,
113 .start
= IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ
),
114 .end
= IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ
),
115 .flags
= IORESOURCE_IRQ
,
119 /* Some e-series hardware cannot control the 32K clock */
120 static void clk_32k_dummy(struct clk
*clk
)
124 static const struct clkops clk_32k_dummy_ops
= {
125 .enable
= clk_32k_dummy
,
126 .disable
= clk_32k_dummy
,
129 static struct clk tmio_dummy_clk
= {
130 .ops
= &clk_32k_dummy_ops
,
134 static struct clk_lookup eseries_clkregs
[] = {
135 INIT_CLKREG(&tmio_dummy_clk
, NULL
, "CLK_CK32K"),
138 void eseries_register_clks(void)
140 clkdev_add_table(eseries_clkregs
, ARRAY_SIZE(eseries_clkregs
));
143 #ifdef CONFIG_MACH_E330
144 /* -------------------- e330 tc6387xb parameters -------------------- */
146 static struct tc6387xb_platform_data e330_tc6387xb_info
= {
147 .enable
= &eseries_tmio_enable
,
148 .disable
= &eseries_tmio_disable
,
149 .suspend
= &eseries_tmio_suspend
,
150 .resume
= &eseries_tmio_resume
,
153 static struct platform_device e330_tc6387xb_device
= {
157 .platform_data
= &e330_tc6387xb_info
,
160 .resource
= eseries_tmio_resources
,
163 /* --------------------------------------------------------------- */
165 static struct platform_device
*e330_devices
[] __initdata
= {
166 &e330_tc6387xb_device
,
169 static void __init
e330_init(void)
171 pxa_set_ffuart_info(NULL
);
172 pxa_set_btuart_info(NULL
);
173 pxa_set_stuart_info(NULL
);
174 eseries_register_clks();
175 eseries_get_tmio_gpios();
176 platform_add_devices(ARRAY_AND_SIZE(e330_devices
));
177 pxa_set_udc_info(&e7xx_udc_mach_info
);
180 MACHINE_START(E330
, "Toshiba e330")
181 /* Maintainer: Ian Molton (spyro@f2s.com) */
182 .phys_io
= 0x40000000,
183 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
184 .boot_params
= 0xa0000100,
185 .map_io
= pxa_map_io
,
186 .init_irq
= pxa25x_init_irq
,
187 .fixup
= eseries_fixup
,
188 .init_machine
= e330_init
,
193 #ifdef CONFIG_MACH_E350
194 /* -------------------- e350 t7l66xb parameters -------------------- */
196 static struct t7l66xb_platform_data e350_t7l66xb_info
= {
197 .irq_base
= IRQ_BOARD_START
,
198 .enable
= &eseries_tmio_enable
,
199 .suspend
= &eseries_tmio_suspend
,
200 .resume
= &eseries_tmio_resume
,
203 static struct platform_device e350_t7l66xb_device
= {
207 .platform_data
= &e350_t7l66xb_info
,
210 .resource
= eseries_tmio_resources
,
213 /* ---------------------------------------------------------- */
215 static struct platform_device
*e350_devices
[] __initdata
= {
216 &e350_t7l66xb_device
,
219 static void __init
e350_init(void)
221 pxa_set_ffuart_info(NULL
);
222 pxa_set_btuart_info(NULL
);
223 pxa_set_stuart_info(NULL
);
224 eseries_register_clks();
225 eseries_get_tmio_gpios();
226 platform_add_devices(ARRAY_AND_SIZE(e350_devices
));
227 pxa_set_udc_info(&e7xx_udc_mach_info
);
230 MACHINE_START(E350
, "Toshiba e350")
231 /* Maintainer: Ian Molton (spyro@f2s.com) */
232 .phys_io
= 0x40000000,
233 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
234 .boot_params
= 0xa0000100,
235 .map_io
= pxa_map_io
,
236 .init_irq
= pxa25x_init_irq
,
237 .fixup
= eseries_fixup
,
238 .init_machine
= e350_init
,
243 #ifdef CONFIG_MACH_E400
244 /* ------------------------ E400 LCD definitions ------------------------ */
246 static struct pxafb_mode_info e400_pxafb_mode_info
= {
260 static struct pxafb_mach_info e400_pxafb_mach_info
= {
261 .modes
= &e400_pxafb_mode_info
,
263 .lcd_conn
= LCD_COLOR_TFT_16BPP
,
265 .pxafb_backlight_power
= NULL
,
268 /* ------------------------ E400 MFP config ----------------------------- */
270 static unsigned long e400_pin_config
[] __initdata
= {
272 GPIO15_nCS_1
, /* CS1 - Flash */
273 GPIO80_nCS_4
, /* CS4 - TMIO */
283 /* TMIO controller */
284 GPIO19_GPIO
, /* t7l66xb #PCLR */
285 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
288 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
291 /* ---------------------------------------------------------------------- */
293 static struct mtd_partition partition_a
= {
294 .name
= "Internal NAND flash",
296 .size
= MTDPART_SIZ_FULL
,
299 static uint8_t scan_ff_pattern
[] = { 0xff, 0xff };
301 static struct nand_bbt_descr e400_t7l66xb_nand_bbt
= {
305 .pattern
= scan_ff_pattern
308 static struct tmio_nand_data e400_t7l66xb_nand_config
= {
310 .partition
= &partition_a
,
311 .badblock_pattern
= &e400_t7l66xb_nand_bbt
,
314 static struct t7l66xb_platform_data e400_t7l66xb_info
= {
315 .irq_base
= IRQ_BOARD_START
,
316 .enable
= &eseries_tmio_enable
,
317 .suspend
= &eseries_tmio_suspend
,
318 .resume
= &eseries_tmio_resume
,
320 .nand_data
= &e400_t7l66xb_nand_config
,
323 static struct platform_device e400_t7l66xb_device
= {
327 .platform_data
= &e400_t7l66xb_info
,
330 .resource
= eseries_tmio_resources
,
333 /* ---------------------------------------------------------- */
335 static struct platform_device
*e400_devices
[] __initdata
= {
336 &e400_t7l66xb_device
,
339 static void __init
e400_init(void)
341 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config
));
342 pxa_set_ffuart_info(NULL
);
343 pxa_set_btuart_info(NULL
);
344 pxa_set_stuart_info(NULL
);
345 eseries_register_clks();
346 eseries_get_tmio_gpios();
347 set_pxa_fb_info(&e400_pxafb_mach_info
);
348 platform_add_devices(ARRAY_AND_SIZE(e400_devices
));
349 pxa_set_udc_info(&e7xx_udc_mach_info
);
352 MACHINE_START(E400
, "Toshiba e400")
353 /* Maintainer: Ian Molton (spyro@f2s.com) */
354 .phys_io
= 0x40000000,
355 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
356 .boot_params
= 0xa0000100,
357 .map_io
= pxa_map_io
,
358 .init_irq
= pxa25x_init_irq
,
359 .fixup
= eseries_fixup
,
360 .init_machine
= e400_init
,
365 #ifdef CONFIG_MACH_E740
366 /* ------------------------ e740 video support --------------------------- */
368 static struct w100_gen_regs e740_lcd_regs
= {
369 .lcd_format
= 0x00008023,
370 .lcdd_cntl1
= 0x0f000000,
371 .lcdd_cntl2
= 0x0003ffff,
372 .genlcd_cntl1
= 0x00ffff03,
373 .genlcd_cntl2
= 0x003c0f03,
374 .genlcd_cntl3
= 0x000143aa,
377 static struct w100_mode e740_lcd_mode
= {
384 .crtc_ss
= 0x80140013,
385 .crtc_ls
= 0x81150110,
386 .crtc_gs
= 0x80050005,
387 .crtc_vpos_gs
= 0x000a0009,
388 .crtc_rev
= 0x0040010a,
389 .crtc_dclk
= 0xa906000a,
390 .crtc_gclk
= 0x80050108,
391 .crtc_goe
= 0x80050108,
394 .pixclk_divider_rotated
= 4,
395 .pixclk_src
= CLK_SRC_XTAL
,
397 .sysclk_src
= CLK_SRC_PLL
,
398 .crtc_ps1_active
= 0x41060010,
401 static struct w100_gpio_regs e740_w100_gpio_info
= {
402 .init_data1
= 0x21002103,
403 .gpio_dir1
= 0xffffdeff,
404 .gpio_oe1
= 0x03c00643,
405 .init_data2
= 0x003f003f,
406 .gpio_dir2
= 0xffffffff,
407 .gpio_oe2
= 0x000000ff,
410 static struct w100fb_mach_info e740_fb_info
= {
411 .modelist
= &e740_lcd_mode
,
413 .regs
= &e740_lcd_regs
,
414 .gpio
= &e740_w100_gpio_info
,
415 .xtal_freq
= 14318000,
419 static struct resource e740_fb_resources
[] = {
423 .flags
= IORESOURCE_MEM
,
427 static struct platform_device e740_fb_device
= {
431 .platform_data
= &e740_fb_info
,
433 .num_resources
= ARRAY_SIZE(e740_fb_resources
),
434 .resource
= e740_fb_resources
,
437 /* --------------------------- MFP Pin config -------------------------- */
439 static unsigned long e740_pin_config
[] __initdata
= {
441 GPIO15_nCS_1
, /* CS1 - Flash */
442 GPIO79_nCS_3
, /* CS3 - IMAGEON */
443 GPIO80_nCS_4
, /* CS4 - TMIO */
453 /* TMIO controller */
454 GPIO19_GPIO
, /* t7l66xb #PCLR */
455 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
462 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
466 GPIO29_AC97_SDATA_IN_0
,
467 GPIO30_AC97_SDATA_OUT
,
470 /* Audio power control */
471 GPIO16_GPIO
, /* AC97 codec AVDD2 supply (analogue power) */
472 GPIO40_GPIO
, /* Mic amp power */
473 GPIO41_GPIO
, /* Headphone amp power */
476 GPIO8_GPIO
, /* CD0 */
477 GPIO44_GPIO
, /* CD1 */
478 GPIO11_GPIO
, /* IRQ0 */
479 GPIO6_GPIO
, /* IRQ1 */
480 GPIO27_GPIO
, /* RST0 */
481 GPIO24_GPIO
, /* RST1 */
482 GPIO20_GPIO
, /* PWR0 */
483 GPIO23_GPIO
, /* PWR1 */
496 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
499 /* -------------------- e740 t7l66xb parameters -------------------- */
501 static struct t7l66xb_platform_data e740_t7l66xb_info
= {
502 .irq_base
= IRQ_BOARD_START
,
503 .enable
= &eseries_tmio_enable
,
504 .suspend
= &eseries_tmio_suspend
,
505 .resume
= &eseries_tmio_resume
,
508 static struct platform_device e740_t7l66xb_device
= {
512 .platform_data
= &e740_t7l66xb_info
,
515 .resource
= eseries_tmio_resources
,
518 /* ----------------------------------------------------------------------- */
520 static struct platform_device
*e740_devices
[] __initdata
= {
522 &e740_t7l66xb_device
,
525 static void __init
e740_init(void)
527 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
528 pxa_set_ffuart_info(NULL
);
529 pxa_set_btuart_info(NULL
);
530 pxa_set_stuart_info(NULL
);
531 eseries_register_clks();
532 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
533 "UDCCLK", &pxa25x_device_udc
.dev
),
534 eseries_get_tmio_gpios();
535 platform_add_devices(ARRAY_AND_SIZE(e740_devices
));
536 pxa_set_udc_info(&e7xx_udc_mach_info
);
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 .phys_io
= 0x40000000,
544 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
545 .boot_params
= 0xa0000100,
546 .map_io
= pxa_map_io
,
547 .init_irq
= pxa25x_init_irq
,
548 .fixup
= eseries_fixup
,
549 .init_machine
= e740_init
,
554 #ifdef CONFIG_MACH_E750
555 /* ---------------------- E750 LCD definitions -------------------- */
557 static struct w100_gen_regs e750_lcd_regs
= {
558 .lcd_format
= 0x00008003,
559 .lcdd_cntl1
= 0x00000000,
560 .lcdd_cntl2
= 0x0003ffff,
561 .genlcd_cntl1
= 0x00fff003,
562 .genlcd_cntl2
= 0x003c0f03,
563 .genlcd_cntl3
= 0x000143aa,
566 static struct w100_mode e750_lcd_mode
= {
573 .crtc_ss
= 0x80150014,
574 .crtc_ls
= 0x8014000d,
575 .crtc_gs
= 0xc1000005,
576 .crtc_vpos_gs
= 0x00020147,
577 .crtc_rev
= 0x0040010a,
578 .crtc_dclk
= 0xa1700030,
579 .crtc_gclk
= 0x80cc0015,
580 .crtc_goe
= 0x80cc0015,
581 .crtc_ps1_active
= 0x61060017,
584 .pixclk_divider_rotated
= 4,
585 .pixclk_src
= CLK_SRC_XTAL
,
587 .sysclk_src
= CLK_SRC_PLL
,
590 static struct w100_gpio_regs e750_w100_gpio_info
= {
591 .init_data1
= 0x01192f1b,
592 .gpio_dir1
= 0xd5ffdeff,
593 .gpio_oe1
= 0x000020bf,
594 .init_data2
= 0x010f010f,
595 .gpio_dir2
= 0xffffffff,
596 .gpio_oe2
= 0x000001cf,
599 static struct w100fb_mach_info e750_fb_info
= {
600 .modelist
= &e750_lcd_mode
,
602 .regs
= &e750_lcd_regs
,
603 .gpio
= &e750_w100_gpio_info
,
604 .xtal_freq
= 14318000,
608 static struct resource e750_fb_resources
[] = {
612 .flags
= IORESOURCE_MEM
,
616 static struct platform_device e750_fb_device
= {
620 .platform_data
= &e750_fb_info
,
622 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
623 .resource
= e750_fb_resources
,
626 /* -------------------- e750 MFP parameters -------------------- */
628 static unsigned long e750_pin_config
[] __initdata
= {
630 GPIO15_nCS_1
, /* CS1 - Flash */
631 GPIO79_nCS_3
, /* CS3 - IMAGEON */
632 GPIO80_nCS_4
, /* CS4 - TMIO */
642 /* TMIO controller */
643 GPIO19_GPIO
, /* t7l66xb #PCLR */
644 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
651 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
655 GPIO29_AC97_SDATA_IN_0
,
656 GPIO30_AC97_SDATA_OUT
,
659 /* Audio power control */
660 GPIO4_GPIO
, /* Headphone amp power */
661 GPIO7_GPIO
, /* Speaker amp power */
662 GPIO37_GPIO
, /* Headphone detect */
665 GPIO8_GPIO
, /* CD0 */
666 GPIO44_GPIO
, /* CD1 */
667 GPIO11_GPIO
, /* IRQ0 */
668 GPIO6_GPIO
, /* IRQ1 */
669 GPIO27_GPIO
, /* RST0 */
670 GPIO24_GPIO
, /* RST1 */
671 GPIO20_GPIO
, /* PWR0 */
672 GPIO23_GPIO
, /* PWR1 */
685 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
688 /* ----------------- e750 tc6393xb parameters ------------------ */
690 static struct tc6393xb_platform_data e750_tc6393xb_info
= {
691 .irq_base
= IRQ_BOARD_START
,
692 .scr_pll2cr
= 0x0cc1,
695 .suspend
= &eseries_tmio_suspend
,
696 .resume
= &eseries_tmio_resume
,
697 .enable
= &eseries_tmio_enable
,
698 .disable
= &eseries_tmio_disable
,
701 static struct platform_device e750_tc6393xb_device
= {
705 .platform_data
= &e750_tc6393xb_info
,
708 .resource
= eseries_tmio_resources
,
711 /* ------------------------------------------------------------- */
713 static struct platform_device
*e750_devices
[] __initdata
= {
715 &e750_tc6393xb_device
,
718 static void __init
e750_init(void)
720 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config
));
721 pxa_set_ffuart_info(NULL
);
722 pxa_set_btuart_info(NULL
);
723 pxa_set_stuart_info(NULL
);
724 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device
.name
,
726 eseries_get_tmio_gpios();
727 platform_add_devices(ARRAY_AND_SIZE(e750_devices
));
728 pxa_set_udc_info(&e7xx_udc_mach_info
);
729 pxa_set_ac97_info(NULL
);
730 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
733 MACHINE_START(E750
, "Toshiba e750")
734 /* Maintainer: Ian Molton (spyro@f2s.com) */
735 .phys_io
= 0x40000000,
736 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
737 .boot_params
= 0xa0000100,
738 .map_io
= pxa_map_io
,
739 .init_irq
= pxa25x_init_irq
,
740 .fixup
= eseries_fixup
,
741 .init_machine
= e750_init
,
746 #ifdef CONFIG_MACH_E800
747 /* ------------------------ e800 LCD definitions ------------------------- */
749 static unsigned long e800_pin_config
[] __initdata
= {
752 GPIO29_AC97_SDATA_IN_0
,
753 GPIO30_AC97_SDATA_OUT
,
757 static struct w100_gen_regs e800_lcd_regs
= {
758 .lcd_format
= 0x00008003,
759 .lcdd_cntl1
= 0x02a00000,
760 .lcdd_cntl2
= 0x0003ffff,
761 .genlcd_cntl1
= 0x000ff2a3,
762 .genlcd_cntl2
= 0x000002a3,
763 .genlcd_cntl3
= 0x000102aa,
766 static struct w100_mode e800_lcd_mode
[2] = {
774 .crtc_ss
= 0x80350034,
775 .crtc_ls
= 0x802b0026,
776 .crtc_gs
= 0x80160016,
777 .crtc_vpos_gs
= 0x00020003,
778 .crtc_rev
= 0x0040001d,
779 .crtc_dclk
= 0xe0000000,
780 .crtc_gclk
= 0x82a50049,
781 .crtc_goe
= 0x80ee001c,
782 .crtc_ps1_active
= 0x00000000,
785 .pixclk_divider_rotated
= 6,
786 .pixclk_src
= CLK_SRC_PLL
,
788 .sysclk_src
= CLK_SRC_PLL
,
797 .crtc_ss
= 0xd010000f,
798 .crtc_ls
= 0x80070003,
799 .crtc_gs
= 0x80000000,
800 .crtc_vpos_gs
= 0x01460147,
801 .crtc_rev
= 0x00400003,
802 .crtc_dclk
= 0xa1700030,
803 .crtc_gclk
= 0x814b0008,
804 .crtc_goe
= 0x80cc0015,
805 .crtc_ps1_active
= 0x00000000,
807 .pixclk_divider
= 6, /* Wince uses 14 which gives a */
808 .pixclk_divider_rotated
= 6, /* 7MHz Pclk. We use a 14MHz one */
809 .pixclk_src
= CLK_SRC_PLL
,
811 .sysclk_src
= CLK_SRC_PLL
,
816 static struct w100_gpio_regs e800_w100_gpio_info
= {
817 .init_data1
= 0xc13fc019,
818 .gpio_dir1
= 0x3e40df7f,
819 .gpio_oe1
= 0x003c3000,
820 .init_data2
= 0x00000000,
821 .gpio_dir2
= 0x00000000,
822 .gpio_oe2
= 0x00000000,
825 static struct w100_mem_info e800_w100_mem_info
= {
826 .ext_cntl
= 0x09640011,
827 .sdram_mode_reg
= 0x00600021,
828 .ext_timing_cntl
= 0x10001545,
829 .io_cntl
= 0x7ddd7333,
833 static void e800_tg_change(struct w100fb_par
*par
)
837 tmp
= w100fb_gpio_read(W100_GPIO_PORT_A
);
838 if (par
->mode
->xres
== 480)
842 w100fb_gpio_write(W100_GPIO_PORT_A
, tmp
);
845 static struct w100_tg_info e800_tg_info
= {
846 .change
= e800_tg_change
,
849 static struct w100fb_mach_info e800_fb_info
= {
850 .modelist
= e800_lcd_mode
,
852 .regs
= &e800_lcd_regs
,
853 .gpio
= &e800_w100_gpio_info
,
854 .mem
= &e800_w100_mem_info
,
856 .xtal_freq
= 16000000,
859 static struct resource e800_fb_resources
[] = {
863 .flags
= IORESOURCE_MEM
,
867 static struct platform_device e800_fb_device
= {
871 .platform_data
= &e800_fb_info
,
873 .num_resources
= ARRAY_SIZE(e800_fb_resources
),
874 .resource
= e800_fb_resources
,
877 /* --------------------------- UDC definitions --------------------------- */
879 static struct pxa2xx_udc_mach_info e800_udc_mach_info
= {
880 .gpio_vbus
= GPIO_E800_USB_DISC
,
881 .gpio_pullup
= GPIO_E800_USB_PULLUP
,
882 .gpio_pullup_inverted
= 1
885 /* ----------------- e800 tc6393xb parameters ------------------ */
887 static struct tc6393xb_platform_data e800_tc6393xb_info
= {
888 .irq_base
= IRQ_BOARD_START
,
889 .scr_pll2cr
= 0x0cc1,
892 .suspend
= &eseries_tmio_suspend
,
893 .resume
= &eseries_tmio_resume
,
894 .enable
= &eseries_tmio_enable
,
895 .disable
= &eseries_tmio_disable
,
898 static struct platform_device e800_tc6393xb_device
= {
902 .platform_data
= &e800_tc6393xb_info
,
905 .resource
= eseries_tmio_resources
,
908 /* ----------------------------------------------------------------------- */
910 static struct platform_device
*e800_devices
[] __initdata
= {
912 &e800_tc6393xb_device
,
915 static void __init
e800_init(void)
917 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config
));
918 pxa_set_ffuart_info(NULL
);
919 pxa_set_btuart_info(NULL
);
920 pxa_set_stuart_info(NULL
);
921 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device
.name
,
923 eseries_get_tmio_gpios();
924 platform_add_devices(ARRAY_AND_SIZE(e800_devices
));
925 pxa_set_udc_info(&e800_udc_mach_info
);
926 pxa_set_ac97_info(NULL
);
929 MACHINE_START(E800
, "Toshiba e800")
930 /* Maintainer: Ian Molton (spyro@f2s.com) */
931 .phys_io
= 0x40000000,
932 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
933 .boot_params
= 0xa0000100,
934 .map_io
= pxa_map_io
,
935 .init_irq
= pxa25x_init_irq
,
936 .fixup
= eseries_fixup
,
937 .init_machine
= e800_init
,