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/clkdev.h>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/clk-provider.h>
17 #include <linux/gpio.h>
18 #include <linux/delay.h>
19 #include <linux/platform_device.h>
20 #include <linux/mfd/tc6387xb.h>
21 #include <linux/mfd/tc6393xb.h>
22 #include <linux/mfd/t7l66xb.h>
23 #include <linux/mtd/nand.h>
24 #include <linux/mtd/partitions.h>
25 #include <linux/usb/gpio_vbus.h>
26 #include <linux/memblock.h>
28 #include <video/w100fb.h>
30 #include <asm/setup.h>
31 #include <asm/mach/arch.h>
32 #include <asm/mach-types.h>
35 #include <mach/eseries-gpio.h>
36 #include "eseries-irq.h"
37 #include <mach/audio.h>
38 #include <linux/platform_data/video-pxafb.h>
40 #include <linux/platform_data/irda-pxaficp.h>
45 /* Only e800 has 128MB RAM */
46 void __init
eseries_fixup(struct tag
*tags
, char **cmdline
)
48 if (machine_is_e800())
49 memblock_add(0xa0000000, SZ_128M
);
51 memblock_add(0xa0000000, SZ_64M
);
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 __maybe_unused
= {
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
= PXA_GPIO_TO_IRQ(GPIO_ESERIES_TMIO_IRQ
),
123 .end
= PXA_GPIO_TO_IRQ(GPIO_ESERIES_TMIO_IRQ
),
124 .flags
= IORESOURCE_IRQ
,
128 /* Some e-series hardware cannot control the 32K clock */
129 static void __init __maybe_unused
eseries_register_clks(void)
131 clk_register_fixed_rate(NULL
, "CLK_CK32K", NULL
, CLK_IS_ROOT
, 32768);
134 #ifdef CONFIG_MACH_E330
135 /* -------------------- e330 tc6387xb parameters -------------------- */
137 static struct tc6387xb_platform_data e330_tc6387xb_info
= {
138 .enable
= &eseries_tmio_enable
,
139 .disable
= &eseries_tmio_disable
,
140 .suspend
= &eseries_tmio_suspend
,
141 .resume
= &eseries_tmio_resume
,
144 static struct platform_device e330_tc6387xb_device
= {
148 .platform_data
= &e330_tc6387xb_info
,
151 .resource
= eseries_tmio_resources
,
154 /* --------------------------------------------------------------- */
156 static struct platform_device
*e330_devices
[] __initdata
= {
157 &e330_tc6387xb_device
,
161 static void __init
e330_init(void)
163 pxa_set_ffuart_info(NULL
);
164 pxa_set_btuart_info(NULL
);
165 pxa_set_stuart_info(NULL
);
166 eseries_register_clks();
167 eseries_get_tmio_gpios();
168 platform_add_devices(ARRAY_AND_SIZE(e330_devices
));
171 MACHINE_START(E330
, "Toshiba e330")
172 /* Maintainer: Ian Molton (spyro@f2s.com) */
173 .atag_offset
= 0x100,
174 .map_io
= pxa25x_map_io
,
175 .nr_irqs
= ESERIES_NR_IRQS
,
176 .init_irq
= pxa25x_init_irq
,
177 .handle_irq
= pxa25x_handle_irq
,
178 .fixup
= eseries_fixup
,
179 .init_machine
= e330_init
,
180 .init_time
= pxa_timer_init
,
181 .restart
= pxa_restart
,
185 #ifdef CONFIG_MACH_E350
186 /* -------------------- e350 t7l66xb parameters -------------------- */
188 static struct t7l66xb_platform_data e350_t7l66xb_info
= {
189 .irq_base
= IRQ_BOARD_START
,
190 .enable
= &eseries_tmio_enable
,
191 .suspend
= &eseries_tmio_suspend
,
192 .resume
= &eseries_tmio_resume
,
195 static struct platform_device e350_t7l66xb_device
= {
199 .platform_data
= &e350_t7l66xb_info
,
202 .resource
= eseries_tmio_resources
,
205 /* ---------------------------------------------------------- */
207 static struct platform_device
*e350_devices
[] __initdata
= {
208 &e350_t7l66xb_device
,
212 static void __init
e350_init(void)
214 pxa_set_ffuart_info(NULL
);
215 pxa_set_btuart_info(NULL
);
216 pxa_set_stuart_info(NULL
);
217 eseries_register_clks();
218 eseries_get_tmio_gpios();
219 platform_add_devices(ARRAY_AND_SIZE(e350_devices
));
222 MACHINE_START(E350
, "Toshiba e350")
223 /* Maintainer: Ian Molton (spyro@f2s.com) */
224 .atag_offset
= 0x100,
225 .map_io
= pxa25x_map_io
,
226 .nr_irqs
= ESERIES_NR_IRQS
,
227 .init_irq
= pxa25x_init_irq
,
228 .handle_irq
= pxa25x_handle_irq
,
229 .fixup
= eseries_fixup
,
230 .init_machine
= e350_init
,
231 .init_time
= pxa_timer_init
,
232 .restart
= pxa_restart
,
236 #ifdef CONFIG_MACH_E400
237 /* ------------------------ E400 LCD definitions ------------------------ */
239 static struct pxafb_mode_info e400_pxafb_mode_info
= {
253 static struct pxafb_mach_info e400_pxafb_mach_info
= {
254 .modes
= &e400_pxafb_mode_info
,
256 .lcd_conn
= LCD_COLOR_TFT_16BPP
,
258 .pxafb_backlight_power
= NULL
,
261 /* ------------------------ E400 MFP config ----------------------------- */
263 static unsigned long e400_pin_config
[] __initdata
= {
265 GPIO15_nCS_1
, /* CS1 - Flash */
266 GPIO80_nCS_4
, /* CS4 - TMIO */
276 /* TMIO controller */
277 GPIO19_GPIO
, /* t7l66xb #PCLR */
278 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
281 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
284 /* ---------------------------------------------------------------------- */
286 static struct mtd_partition partition_a
= {
287 .name
= "Internal NAND flash",
289 .size
= MTDPART_SIZ_FULL
,
292 static uint8_t scan_ff_pattern
[] = { 0xff, 0xff };
294 static struct nand_bbt_descr e400_t7l66xb_nand_bbt
= {
298 .pattern
= scan_ff_pattern
301 static struct tmio_nand_data e400_t7l66xb_nand_config
= {
303 .partition
= &partition_a
,
304 .badblock_pattern
= &e400_t7l66xb_nand_bbt
,
307 static struct t7l66xb_platform_data e400_t7l66xb_info
= {
308 .irq_base
= IRQ_BOARD_START
,
309 .enable
= &eseries_tmio_enable
,
310 .suspend
= &eseries_tmio_suspend
,
311 .resume
= &eseries_tmio_resume
,
313 .nand_data
= &e400_t7l66xb_nand_config
,
316 static struct platform_device e400_t7l66xb_device
= {
320 .platform_data
= &e400_t7l66xb_info
,
323 .resource
= eseries_tmio_resources
,
326 /* ---------------------------------------------------------- */
328 static struct platform_device
*e400_devices
[] __initdata
= {
329 &e400_t7l66xb_device
,
333 static void __init
e400_init(void)
335 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config
));
336 pxa_set_ffuart_info(NULL
);
337 pxa_set_btuart_info(NULL
);
338 pxa_set_stuart_info(NULL
);
339 /* Fixme - e400 may have a switched clock */
340 eseries_register_clks();
341 eseries_get_tmio_gpios();
342 pxa_set_fb_info(NULL
, &e400_pxafb_mach_info
);
343 platform_add_devices(ARRAY_AND_SIZE(e400_devices
));
346 MACHINE_START(E400
, "Toshiba e400")
347 /* Maintainer: Ian Molton (spyro@f2s.com) */
348 .atag_offset
= 0x100,
349 .map_io
= pxa25x_map_io
,
350 .nr_irqs
= ESERIES_NR_IRQS
,
351 .init_irq
= pxa25x_init_irq
,
352 .handle_irq
= pxa25x_handle_irq
,
353 .fixup
= eseries_fixup
,
354 .init_machine
= e400_init
,
355 .init_time
= pxa_timer_init
,
356 .restart
= pxa_restart
,
360 #ifdef CONFIG_MACH_E740
361 /* ------------------------ e740 video support --------------------------- */
363 static struct w100_gen_regs e740_lcd_regs
= {
364 .lcd_format
= 0x00008023,
365 .lcdd_cntl1
= 0x0f000000,
366 .lcdd_cntl2
= 0x0003ffff,
367 .genlcd_cntl1
= 0x00ffff03,
368 .genlcd_cntl2
= 0x003c0f03,
369 .genlcd_cntl3
= 0x000143aa,
372 static struct w100_mode e740_lcd_mode
= {
379 .crtc_ss
= 0x80140013,
380 .crtc_ls
= 0x81150110,
381 .crtc_gs
= 0x80050005,
382 .crtc_vpos_gs
= 0x000a0009,
383 .crtc_rev
= 0x0040010a,
384 .crtc_dclk
= 0xa906000a,
385 .crtc_gclk
= 0x80050108,
386 .crtc_goe
= 0x80050108,
389 .pixclk_divider_rotated
= 4,
390 .pixclk_src
= CLK_SRC_XTAL
,
392 .sysclk_src
= CLK_SRC_PLL
,
393 .crtc_ps1_active
= 0x41060010,
396 static struct w100_gpio_regs e740_w100_gpio_info
= {
397 .init_data1
= 0x21002103,
398 .gpio_dir1
= 0xffffdeff,
399 .gpio_oe1
= 0x03c00643,
400 .init_data2
= 0x003f003f,
401 .gpio_dir2
= 0xffffffff,
402 .gpio_oe2
= 0x000000ff,
405 static struct w100fb_mach_info e740_fb_info
= {
406 .modelist
= &e740_lcd_mode
,
408 .regs
= &e740_lcd_regs
,
409 .gpio
= &e740_w100_gpio_info
,
410 .xtal_freq
= 14318000,
414 static struct resource e740_fb_resources
[] = {
418 .flags
= IORESOURCE_MEM
,
422 static struct platform_device e740_fb_device
= {
426 .platform_data
= &e740_fb_info
,
428 .num_resources
= ARRAY_SIZE(e740_fb_resources
),
429 .resource
= e740_fb_resources
,
432 /* --------------------------- MFP Pin config -------------------------- */
434 static unsigned long e740_pin_config
[] __initdata
= {
436 GPIO15_nCS_1
, /* CS1 - Flash */
437 GPIO79_nCS_3
, /* CS3 - IMAGEON */
438 GPIO80_nCS_4
, /* CS4 - TMIO */
448 /* TMIO controller */
449 GPIO19_GPIO
, /* t7l66xb #PCLR */
450 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
457 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
461 GPIO29_AC97_SDATA_IN_0
,
462 GPIO30_AC97_SDATA_OUT
,
465 /* Audio power control */
466 GPIO16_GPIO
, /* AC97 codec AVDD2 supply (analogue power) */
467 GPIO40_GPIO
, /* Mic amp power */
468 GPIO41_GPIO
, /* Headphone amp power */
471 GPIO8_GPIO
, /* CD0 */
472 GPIO44_GPIO
, /* CD1 */
473 GPIO11_GPIO
, /* IRQ0 */
474 GPIO6_GPIO
, /* IRQ1 */
475 GPIO27_GPIO
, /* RST0 */
476 GPIO24_GPIO
, /* RST1 */
477 GPIO20_GPIO
, /* PWR0 */
478 GPIO23_GPIO
, /* PWR1 */
491 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
494 /* -------------------- e740 t7l66xb parameters -------------------- */
496 static struct t7l66xb_platform_data e740_t7l66xb_info
= {
497 .irq_base
= IRQ_BOARD_START
,
498 .enable
= &eseries_tmio_enable
,
499 .suspend
= &eseries_tmio_suspend
,
500 .resume
= &eseries_tmio_resume
,
503 static struct platform_device e740_t7l66xb_device
= {
507 .platform_data
= &e740_t7l66xb_info
,
510 .resource
= eseries_tmio_resources
,
513 static struct platform_device e740_audio_device
= {
514 .name
= "e740-audio",
518 /* ----------------------------------------------------------------------- */
520 static struct platform_device
*e740_devices
[] __initdata
= {
522 &e740_t7l66xb_device
,
527 static void __init
e740_init(void)
529 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
530 pxa_set_ffuart_info(NULL
);
531 pxa_set_btuart_info(NULL
);
532 pxa_set_stuart_info(NULL
);
533 eseries_register_clks();
534 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
535 "UDCCLK", &pxa25x_device_udc
.dev
),
536 eseries_get_tmio_gpios();
537 platform_add_devices(ARRAY_AND_SIZE(e740_devices
));
538 pxa_set_ac97_info(NULL
);
539 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
542 MACHINE_START(E740
, "Toshiba e740")
543 /* Maintainer: Ian Molton (spyro@f2s.com) */
544 .atag_offset
= 0x100,
545 .map_io
= pxa25x_map_io
,
546 .nr_irqs
= ESERIES_NR_IRQS
,
547 .init_irq
= pxa25x_init_irq
,
548 .handle_irq
= pxa25x_handle_irq
,
549 .fixup
= eseries_fixup
,
550 .init_machine
= e740_init
,
551 .init_time
= pxa_timer_init
,
552 .restart
= pxa_restart
,
556 #ifdef CONFIG_MACH_E750
557 /* ---------------------- E750 LCD definitions -------------------- */
559 static struct w100_gen_regs e750_lcd_regs
= {
560 .lcd_format
= 0x00008003,
561 .lcdd_cntl1
= 0x00000000,
562 .lcdd_cntl2
= 0x0003ffff,
563 .genlcd_cntl1
= 0x00fff003,
564 .genlcd_cntl2
= 0x003c0f03,
565 .genlcd_cntl3
= 0x000143aa,
568 static struct w100_mode e750_lcd_mode
= {
575 .crtc_ss
= 0x80150014,
576 .crtc_ls
= 0x8014000d,
577 .crtc_gs
= 0xc1000005,
578 .crtc_vpos_gs
= 0x00020147,
579 .crtc_rev
= 0x0040010a,
580 .crtc_dclk
= 0xa1700030,
581 .crtc_gclk
= 0x80cc0015,
582 .crtc_goe
= 0x80cc0015,
583 .crtc_ps1_active
= 0x61060017,
586 .pixclk_divider_rotated
= 4,
587 .pixclk_src
= CLK_SRC_XTAL
,
589 .sysclk_src
= CLK_SRC_PLL
,
592 static struct w100_gpio_regs e750_w100_gpio_info
= {
593 .init_data1
= 0x01192f1b,
594 .gpio_dir1
= 0xd5ffdeff,
595 .gpio_oe1
= 0x000020bf,
596 .init_data2
= 0x010f010f,
597 .gpio_dir2
= 0xffffffff,
598 .gpio_oe2
= 0x000001cf,
601 static struct w100fb_mach_info e750_fb_info
= {
602 .modelist
= &e750_lcd_mode
,
604 .regs
= &e750_lcd_regs
,
605 .gpio
= &e750_w100_gpio_info
,
606 .xtal_freq
= 14318000,
610 static struct resource e750_fb_resources
[] = {
614 .flags
= IORESOURCE_MEM
,
618 static struct platform_device e750_fb_device
= {
622 .platform_data
= &e750_fb_info
,
624 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
625 .resource
= e750_fb_resources
,
628 /* -------------------- e750 MFP parameters -------------------- */
630 static unsigned long e750_pin_config
[] __initdata
= {
632 GPIO15_nCS_1
, /* CS1 - Flash */
633 GPIO79_nCS_3
, /* CS3 - IMAGEON */
634 GPIO80_nCS_4
, /* CS4 - TMIO */
644 /* TMIO controller */
645 GPIO19_GPIO
, /* t7l66xb #PCLR */
646 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
653 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
657 GPIO29_AC97_SDATA_IN_0
,
658 GPIO30_AC97_SDATA_OUT
,
661 /* Audio power control */
662 GPIO4_GPIO
, /* Headphone amp power */
663 GPIO7_GPIO
, /* Speaker amp power */
664 GPIO37_GPIO
, /* Headphone detect */
667 GPIO8_GPIO
, /* CD0 */
668 GPIO44_GPIO
, /* CD1 */
669 /* GPIO11_GPIO, IRQ0 */
670 GPIO6_GPIO
, /* IRQ1 */
671 GPIO27_GPIO
, /* RST0 */
672 GPIO24_GPIO
, /* RST1 */
673 GPIO20_GPIO
, /* PWR0 */
674 GPIO23_GPIO
, /* PWR1 */
687 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
690 /* ----------------- e750 tc6393xb parameters ------------------ */
692 static struct tc6393xb_platform_data e750_tc6393xb_info
= {
693 .irq_base
= IRQ_BOARD_START
,
694 .scr_pll2cr
= 0x0cc1,
697 .suspend
= &eseries_tmio_suspend
,
698 .resume
= &eseries_tmio_resume
,
699 .enable
= &eseries_tmio_enable
,
700 .disable
= &eseries_tmio_disable
,
703 static struct platform_device e750_tc6393xb_device
= {
707 .platform_data
= &e750_tc6393xb_info
,
710 .resource
= eseries_tmio_resources
,
713 static struct platform_device e750_audio_device
= {
714 .name
= "e750-audio",
718 /* ------------------------------------------------------------- */
720 static struct platform_device
*e750_devices
[] __initdata
= {
722 &e750_tc6393xb_device
,
727 static void __init
e750_init(void)
729 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config
));
730 pxa_set_ffuart_info(NULL
);
731 pxa_set_btuart_info(NULL
);
732 pxa_set_stuart_info(NULL
);
733 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device
.name
,
735 eseries_get_tmio_gpios();
736 platform_add_devices(ARRAY_AND_SIZE(e750_devices
));
737 pxa_set_ac97_info(NULL
);
738 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
741 MACHINE_START(E750
, "Toshiba e750")
742 /* Maintainer: Ian Molton (spyro@f2s.com) */
743 .atag_offset
= 0x100,
744 .map_io
= pxa25x_map_io
,
745 .nr_irqs
= ESERIES_NR_IRQS
,
746 .init_irq
= pxa25x_init_irq
,
747 .handle_irq
= pxa25x_handle_irq
,
748 .fixup
= eseries_fixup
,
749 .init_machine
= e750_init
,
750 .init_time
= pxa_timer_init
,
751 .restart
= pxa_restart
,
755 #ifdef CONFIG_MACH_E800
756 /* ------------------------ e800 LCD definitions ------------------------- */
758 static unsigned long e800_pin_config
[] __initdata
= {
761 GPIO29_AC97_SDATA_IN_0
,
762 GPIO30_AC97_SDATA_OUT
,
769 static struct w100_gen_regs e800_lcd_regs
= {
770 .lcd_format
= 0x00008003,
771 .lcdd_cntl1
= 0x02a00000,
772 .lcdd_cntl2
= 0x0003ffff,
773 .genlcd_cntl1
= 0x000ff2a3,
774 .genlcd_cntl2
= 0x000002a3,
775 .genlcd_cntl3
= 0x000102aa,
778 static struct w100_mode e800_lcd_mode
[2] = {
786 .crtc_ss
= 0x80350034,
787 .crtc_ls
= 0x802b0026,
788 .crtc_gs
= 0x80160016,
789 .crtc_vpos_gs
= 0x00020003,
790 .crtc_rev
= 0x0040001d,
791 .crtc_dclk
= 0xe0000000,
792 .crtc_gclk
= 0x82a50049,
793 .crtc_goe
= 0x80ee001c,
794 .crtc_ps1_active
= 0x00000000,
797 .pixclk_divider_rotated
= 6,
798 .pixclk_src
= CLK_SRC_PLL
,
800 .sysclk_src
= CLK_SRC_PLL
,
809 .crtc_ss
= 0xd010000f,
810 .crtc_ls
= 0x80070003,
811 .crtc_gs
= 0x80000000,
812 .crtc_vpos_gs
= 0x01460147,
813 .crtc_rev
= 0x00400003,
814 .crtc_dclk
= 0xa1700030,
815 .crtc_gclk
= 0x814b0008,
816 .crtc_goe
= 0x80cc0015,
817 .crtc_ps1_active
= 0x00000000,
819 .pixclk_divider
= 6, /* Wince uses 14 which gives a */
820 .pixclk_divider_rotated
= 6, /* 7MHz Pclk. We use a 14MHz one */
821 .pixclk_src
= CLK_SRC_PLL
,
823 .sysclk_src
= CLK_SRC_PLL
,
828 static struct w100_gpio_regs e800_w100_gpio_info
= {
829 .init_data1
= 0xc13fc019,
830 .gpio_dir1
= 0x3e40df7f,
831 .gpio_oe1
= 0x003c3000,
832 .init_data2
= 0x00000000,
833 .gpio_dir2
= 0x00000000,
834 .gpio_oe2
= 0x00000000,
837 static struct w100_mem_info e800_w100_mem_info
= {
838 .ext_cntl
= 0x09640011,
839 .sdram_mode_reg
= 0x00600021,
840 .ext_timing_cntl
= 0x10001545,
841 .io_cntl
= 0x7ddd7333,
845 static void e800_tg_change(struct w100fb_par
*par
)
849 tmp
= w100fb_gpio_read(W100_GPIO_PORT_A
);
850 if (par
->mode
->xres
== 480)
854 w100fb_gpio_write(W100_GPIO_PORT_A
, tmp
);
857 static struct w100_tg_info e800_tg_info
= {
858 .change
= e800_tg_change
,
861 static struct w100fb_mach_info e800_fb_info
= {
862 .modelist
= e800_lcd_mode
,
864 .regs
= &e800_lcd_regs
,
865 .gpio
= &e800_w100_gpio_info
,
866 .mem
= &e800_w100_mem_info
,
868 .xtal_freq
= 16000000,
871 static struct resource e800_fb_resources
[] = {
875 .flags
= IORESOURCE_MEM
,
879 static struct platform_device e800_fb_device
= {
883 .platform_data
= &e800_fb_info
,
885 .num_resources
= ARRAY_SIZE(e800_fb_resources
),
886 .resource
= e800_fb_resources
,
889 /* --------------------------- UDC definitions --------------------------- */
891 static struct gpio_vbus_mach_info e800_udc_info
= {
892 .gpio_vbus
= GPIO_E800_USB_DISC
,
893 .gpio_pullup
= GPIO_E800_USB_PULLUP
,
894 .gpio_pullup_inverted
= 1
897 static struct platform_device e800_gpio_vbus
= {
901 .platform_data
= &e800_udc_info
,
906 /* ----------------- e800 tc6393xb parameters ------------------ */
908 static struct tc6393xb_platform_data e800_tc6393xb_info
= {
909 .irq_base
= IRQ_BOARD_START
,
910 .scr_pll2cr
= 0x0cc1,
913 .suspend
= &eseries_tmio_suspend
,
914 .resume
= &eseries_tmio_resume
,
915 .enable
= &eseries_tmio_enable
,
916 .disable
= &eseries_tmio_disable
,
919 static struct platform_device e800_tc6393xb_device
= {
923 .platform_data
= &e800_tc6393xb_info
,
926 .resource
= eseries_tmio_resources
,
929 static struct platform_device e800_audio_device
= {
930 .name
= "e800-audio",
934 /* ----------------------------------------------------------------------- */
936 static struct platform_device
*e800_devices
[] __initdata
= {
938 &e800_tc6393xb_device
,
943 static void __init
e800_init(void)
945 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config
));
946 pxa_set_ffuart_info(NULL
);
947 pxa_set_btuart_info(NULL
);
948 pxa_set_stuart_info(NULL
);
949 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device
.name
,
951 eseries_get_tmio_gpios();
952 platform_add_devices(ARRAY_AND_SIZE(e800_devices
));
953 pxa_set_ac97_info(NULL
);
956 MACHINE_START(E800
, "Toshiba e800")
957 /* Maintainer: Ian Molton (spyro@f2s.com) */
958 .atag_offset
= 0x100,
959 .map_io
= pxa25x_map_io
,
960 .nr_irqs
= ESERIES_NR_IRQS
,
961 .init_irq
= pxa25x_init_irq
,
962 .handle_irq
= pxa25x_handle_irq
,
963 .fixup
= eseries_fixup
,
964 .init_machine
= e800_init
,
965 .init_time
= pxa_timer_init
,
966 .restart
= pxa_restart
,