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/machine.h>
18 #include <linux/gpio.h>
19 #include <linux/delay.h>
20 #include <linux/platform_device.h>
21 #include <linux/mfd/tc6387xb.h>
22 #include <linux/mfd/tc6393xb.h>
23 #include <linux/mfd/t7l66xb.h>
24 #include <linux/mtd/rawnand.h>
25 #include <linux/mtd/partitions.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 static struct gpiod_lookup_table e7xx_gpio_vbus_gpiod_table __maybe_unused
= {
55 .dev_id
= "gpio-vbus",
57 GPIO_LOOKUP("gpio-pxa", GPIO_E7XX_USB_DISC
,
58 "vbus", GPIO_ACTIVE_HIGH
),
59 GPIO_LOOKUP("gpio-pxa", GPIO_E7XX_USB_PULLUP
,
60 "pullup", GPIO_ACTIVE_LOW
),
65 static struct platform_device e7xx_gpio_vbus __maybe_unused
= {
70 struct pxaficp_platform_data e7xx_ficp_platform_data
= {
71 .gpio_pwdown
= GPIO_E7XX_IR_OFF
,
72 .transceiver_cap
= IR_SIRMODE
| IR_OFF
,
75 int eseries_tmio_enable(struct platform_device
*dev
)
77 /* Reset - bring SUSPEND high before PCLR */
78 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
79 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
81 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
83 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 1);
88 int eseries_tmio_disable(struct platform_device
*dev
)
90 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
91 gpio_set_value(GPIO_ESERIES_TMIO_PCLR
, 0);
95 int eseries_tmio_suspend(struct platform_device
*dev
)
97 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 0);
101 int eseries_tmio_resume(struct platform_device
*dev
)
103 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND
, 1);
108 void eseries_get_tmio_gpios(void)
110 gpio_request(GPIO_ESERIES_TMIO_SUSPEND
, NULL
);
111 gpio_request(GPIO_ESERIES_TMIO_PCLR
, NULL
);
112 gpio_direction_output(GPIO_ESERIES_TMIO_SUSPEND
, 0);
113 gpio_direction_output(GPIO_ESERIES_TMIO_PCLR
, 0);
116 /* TMIO controller uses the same resources on all e-series machines. */
117 struct resource eseries_tmio_resources
[] = {
119 .start
= PXA_CS4_PHYS
,
120 .end
= PXA_CS4_PHYS
+ 0x1fffff,
121 .flags
= IORESOURCE_MEM
,
124 .start
= PXA_GPIO_TO_IRQ(GPIO_ESERIES_TMIO_IRQ
),
125 .end
= PXA_GPIO_TO_IRQ(GPIO_ESERIES_TMIO_IRQ
),
126 .flags
= IORESOURCE_IRQ
,
130 /* Some e-series hardware cannot control the 32K clock */
131 static void __init __maybe_unused
eseries_register_clks(void)
133 clk_register_fixed_rate(NULL
, "CLK_CK32K", NULL
, 0, 32768);
136 #ifdef CONFIG_MACH_E330
137 /* -------------------- e330 tc6387xb parameters -------------------- */
139 static struct tc6387xb_platform_data e330_tc6387xb_info
= {
140 .enable
= &eseries_tmio_enable
,
141 .disable
= &eseries_tmio_disable
,
142 .suspend
= &eseries_tmio_suspend
,
143 .resume
= &eseries_tmio_resume
,
146 static struct platform_device e330_tc6387xb_device
= {
150 .platform_data
= &e330_tc6387xb_info
,
153 .resource
= eseries_tmio_resources
,
156 /* --------------------------------------------------------------- */
158 static struct platform_device
*e330_devices
[] __initdata
= {
159 &e330_tc6387xb_device
,
163 static void __init
e330_init(void)
165 pxa_set_ffuart_info(NULL
);
166 pxa_set_btuart_info(NULL
);
167 pxa_set_stuart_info(NULL
);
168 eseries_register_clks();
169 eseries_get_tmio_gpios();
170 gpiod_add_lookup_table(&e7xx_gpio_vbus_gpiod_table
);
171 platform_add_devices(ARRAY_AND_SIZE(e330_devices
));
174 MACHINE_START(E330
, "Toshiba e330")
175 /* Maintainer: Ian Molton (spyro@f2s.com) */
176 .atag_offset
= 0x100,
177 .map_io
= pxa25x_map_io
,
178 .nr_irqs
= ESERIES_NR_IRQS
,
179 .init_irq
= pxa25x_init_irq
,
180 .handle_irq
= pxa25x_handle_irq
,
181 .fixup
= eseries_fixup
,
182 .init_machine
= e330_init
,
183 .init_time
= pxa_timer_init
,
184 .restart
= pxa_restart
,
188 #ifdef CONFIG_MACH_E350
189 /* -------------------- e350 t7l66xb parameters -------------------- */
191 static struct t7l66xb_platform_data e350_t7l66xb_info
= {
192 .irq_base
= IRQ_BOARD_START
,
193 .enable
= &eseries_tmio_enable
,
194 .suspend
= &eseries_tmio_suspend
,
195 .resume
= &eseries_tmio_resume
,
198 static struct platform_device e350_t7l66xb_device
= {
202 .platform_data
= &e350_t7l66xb_info
,
205 .resource
= eseries_tmio_resources
,
208 /* ---------------------------------------------------------- */
210 static struct platform_device
*e350_devices
[] __initdata
= {
211 &e350_t7l66xb_device
,
215 static void __init
e350_init(void)
217 pxa_set_ffuart_info(NULL
);
218 pxa_set_btuart_info(NULL
);
219 pxa_set_stuart_info(NULL
);
220 eseries_register_clks();
221 eseries_get_tmio_gpios();
222 gpiod_add_lookup_table(&e7xx_gpio_vbus_gpiod_table
);
223 platform_add_devices(ARRAY_AND_SIZE(e350_devices
));
226 MACHINE_START(E350
, "Toshiba e350")
227 /* Maintainer: Ian Molton (spyro@f2s.com) */
228 .atag_offset
= 0x100,
229 .map_io
= pxa25x_map_io
,
230 .nr_irqs
= ESERIES_NR_IRQS
,
231 .init_irq
= pxa25x_init_irq
,
232 .handle_irq
= pxa25x_handle_irq
,
233 .fixup
= eseries_fixup
,
234 .init_machine
= e350_init
,
235 .init_time
= pxa_timer_init
,
236 .restart
= pxa_restart
,
240 #ifdef CONFIG_MACH_E400
241 /* ------------------------ E400 LCD definitions ------------------------ */
243 static struct pxafb_mode_info e400_pxafb_mode_info
= {
257 static struct pxafb_mach_info e400_pxafb_mach_info
= {
258 .modes
= &e400_pxafb_mode_info
,
260 .lcd_conn
= LCD_COLOR_TFT_16BPP
,
262 .pxafb_backlight_power
= NULL
,
265 /* ------------------------ E400 MFP config ----------------------------- */
267 static unsigned long e400_pin_config
[] __initdata
= {
269 GPIO15_nCS_1
, /* CS1 - Flash */
270 GPIO80_nCS_4
, /* CS4 - TMIO */
280 /* TMIO controller */
281 GPIO19_GPIO
, /* t7l66xb #PCLR */
282 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
285 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
288 /* ---------------------------------------------------------------------- */
290 static struct mtd_partition partition_a
= {
291 .name
= "Internal NAND flash",
293 .size
= MTDPART_SIZ_FULL
,
296 static uint8_t scan_ff_pattern
[] = { 0xff, 0xff };
298 static struct nand_bbt_descr e400_t7l66xb_nand_bbt
= {
302 .pattern
= scan_ff_pattern
305 static struct tmio_nand_data e400_t7l66xb_nand_config
= {
307 .partition
= &partition_a
,
308 .badblock_pattern
= &e400_t7l66xb_nand_bbt
,
311 static struct t7l66xb_platform_data e400_t7l66xb_info
= {
312 .irq_base
= IRQ_BOARD_START
,
313 .enable
= &eseries_tmio_enable
,
314 .suspend
= &eseries_tmio_suspend
,
315 .resume
= &eseries_tmio_resume
,
317 .nand_data
= &e400_t7l66xb_nand_config
,
320 static struct platform_device e400_t7l66xb_device
= {
324 .platform_data
= &e400_t7l66xb_info
,
327 .resource
= eseries_tmio_resources
,
330 /* ---------------------------------------------------------- */
332 static struct platform_device
*e400_devices
[] __initdata
= {
333 &e400_t7l66xb_device
,
337 static void __init
e400_init(void)
339 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config
));
340 pxa_set_ffuart_info(NULL
);
341 pxa_set_btuart_info(NULL
);
342 pxa_set_stuart_info(NULL
);
343 /* Fixme - e400 may have a switched clock */
344 eseries_register_clks();
345 eseries_get_tmio_gpios();
346 pxa_set_fb_info(NULL
, &e400_pxafb_mach_info
);
347 gpiod_add_lookup_table(&e7xx_gpio_vbus_gpiod_table
);
348 platform_add_devices(ARRAY_AND_SIZE(e400_devices
));
351 MACHINE_START(E400
, "Toshiba e400")
352 /* Maintainer: Ian Molton (spyro@f2s.com) */
353 .atag_offset
= 0x100,
354 .map_io
= pxa25x_map_io
,
355 .nr_irqs
= ESERIES_NR_IRQS
,
356 .init_irq
= pxa25x_init_irq
,
357 .handle_irq
= pxa25x_handle_irq
,
358 .fixup
= eseries_fixup
,
359 .init_machine
= e400_init
,
360 .init_time
= pxa_timer_init
,
361 .restart
= pxa_restart
,
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 static struct platform_device e740_audio_device
= {
519 .name
= "e740-audio",
523 /* ----------------------------------------------------------------------- */
525 static struct platform_device
*e740_devices
[] __initdata
= {
527 &e740_t7l66xb_device
,
532 static void __init
e740_init(void)
534 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config
));
535 pxa_set_ffuart_info(NULL
);
536 pxa_set_btuart_info(NULL
);
537 pxa_set_stuart_info(NULL
);
538 eseries_register_clks();
539 clk_add_alias("CLK_CK48M", e740_t7l66xb_device
.name
,
540 "UDCCLK", &pxa25x_device_udc
.dev
),
541 eseries_get_tmio_gpios();
542 gpiod_add_lookup_table(&e7xx_gpio_vbus_gpiod_table
);
543 platform_add_devices(ARRAY_AND_SIZE(e740_devices
));
544 pxa_set_ac97_info(NULL
);
545 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
548 MACHINE_START(E740
, "Toshiba e740")
549 /* Maintainer: Ian Molton (spyro@f2s.com) */
550 .atag_offset
= 0x100,
551 .map_io
= pxa25x_map_io
,
552 .nr_irqs
= ESERIES_NR_IRQS
,
553 .init_irq
= pxa25x_init_irq
,
554 .handle_irq
= pxa25x_handle_irq
,
555 .fixup
= eseries_fixup
,
556 .init_machine
= e740_init
,
557 .init_time
= pxa_timer_init
,
558 .restart
= pxa_restart
,
562 #ifdef CONFIG_MACH_E750
563 /* ---------------------- E750 LCD definitions -------------------- */
565 static struct w100_gen_regs e750_lcd_regs
= {
566 .lcd_format
= 0x00008003,
567 .lcdd_cntl1
= 0x00000000,
568 .lcdd_cntl2
= 0x0003ffff,
569 .genlcd_cntl1
= 0x00fff003,
570 .genlcd_cntl2
= 0x003c0f03,
571 .genlcd_cntl3
= 0x000143aa,
574 static struct w100_mode e750_lcd_mode
= {
581 .crtc_ss
= 0x80150014,
582 .crtc_ls
= 0x8014000d,
583 .crtc_gs
= 0xc1000005,
584 .crtc_vpos_gs
= 0x00020147,
585 .crtc_rev
= 0x0040010a,
586 .crtc_dclk
= 0xa1700030,
587 .crtc_gclk
= 0x80cc0015,
588 .crtc_goe
= 0x80cc0015,
589 .crtc_ps1_active
= 0x61060017,
592 .pixclk_divider_rotated
= 4,
593 .pixclk_src
= CLK_SRC_XTAL
,
595 .sysclk_src
= CLK_SRC_PLL
,
598 static struct w100_gpio_regs e750_w100_gpio_info
= {
599 .init_data1
= 0x01192f1b,
600 .gpio_dir1
= 0xd5ffdeff,
601 .gpio_oe1
= 0x000020bf,
602 .init_data2
= 0x010f010f,
603 .gpio_dir2
= 0xffffffff,
604 .gpio_oe2
= 0x000001cf,
607 static struct w100fb_mach_info e750_fb_info
= {
608 .modelist
= &e750_lcd_mode
,
610 .regs
= &e750_lcd_regs
,
611 .gpio
= &e750_w100_gpio_info
,
612 .xtal_freq
= 14318000,
616 static struct resource e750_fb_resources
[] = {
620 .flags
= IORESOURCE_MEM
,
624 static struct platform_device e750_fb_device
= {
628 .platform_data
= &e750_fb_info
,
630 .num_resources
= ARRAY_SIZE(e750_fb_resources
),
631 .resource
= e750_fb_resources
,
634 /* -------------------- e750 MFP parameters -------------------- */
636 static unsigned long e750_pin_config
[] __initdata
= {
638 GPIO15_nCS_1
, /* CS1 - Flash */
639 GPIO79_nCS_3
, /* CS3 - IMAGEON */
640 GPIO80_nCS_4
, /* CS4 - TMIO */
650 /* TMIO controller */
651 GPIO19_GPIO
, /* t7l66xb #PCLR */
652 GPIO45_GPIO
, /* t7l66xb #SUSPEND (NOT BTUART!) */
659 GPIO38_GPIO
| MFP_LPM_DRIVE_HIGH
,
663 GPIO29_AC97_SDATA_IN_0
,
664 GPIO30_AC97_SDATA_OUT
,
667 /* Audio power control */
668 GPIO4_GPIO
, /* Headphone amp power */
669 GPIO7_GPIO
, /* Speaker amp power */
670 GPIO37_GPIO
, /* Headphone detect */
673 GPIO8_GPIO
, /* CD0 */
674 GPIO44_GPIO
, /* CD1 */
675 /* GPIO11_GPIO, IRQ0 */
676 GPIO6_GPIO
, /* IRQ1 */
677 GPIO27_GPIO
, /* RST0 */
678 GPIO24_GPIO
, /* RST1 */
679 GPIO20_GPIO
, /* PWR0 */
680 GPIO23_GPIO
, /* PWR1 */
693 GPIO0_GPIO
| WAKEUP_ON_EDGE_RISE
,
696 /* ----------------- e750 tc6393xb parameters ------------------ */
698 static struct tc6393xb_platform_data e750_tc6393xb_info
= {
699 .irq_base
= IRQ_BOARD_START
,
700 .scr_pll2cr
= 0x0cc1,
703 .suspend
= &eseries_tmio_suspend
,
704 .resume
= &eseries_tmio_resume
,
705 .enable
= &eseries_tmio_enable
,
706 .disable
= &eseries_tmio_disable
,
709 static struct platform_device e750_tc6393xb_device
= {
713 .platform_data
= &e750_tc6393xb_info
,
716 .resource
= eseries_tmio_resources
,
719 static struct platform_device e750_audio_device
= {
720 .name
= "e750-audio",
724 /* ------------------------------------------------------------- */
726 static struct platform_device
*e750_devices
[] __initdata
= {
728 &e750_tc6393xb_device
,
733 static void __init
e750_init(void)
735 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config
));
736 pxa_set_ffuart_info(NULL
);
737 pxa_set_btuart_info(NULL
);
738 pxa_set_stuart_info(NULL
);
739 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device
.name
,
741 eseries_get_tmio_gpios();
742 gpiod_add_lookup_table(&e7xx_gpio_vbus_gpiod_table
);
743 platform_add_devices(ARRAY_AND_SIZE(e750_devices
));
744 pxa_set_ac97_info(NULL
);
745 pxa_set_ficp_info(&e7xx_ficp_platform_data
);
748 MACHINE_START(E750
, "Toshiba e750")
749 /* Maintainer: Ian Molton (spyro@f2s.com) */
750 .atag_offset
= 0x100,
751 .map_io
= pxa25x_map_io
,
752 .nr_irqs
= ESERIES_NR_IRQS
,
753 .init_irq
= pxa25x_init_irq
,
754 .handle_irq
= pxa25x_handle_irq
,
755 .fixup
= eseries_fixup
,
756 .init_machine
= e750_init
,
757 .init_time
= pxa_timer_init
,
758 .restart
= pxa_restart
,
762 #ifdef CONFIG_MACH_E800
763 /* ------------------------ e800 LCD definitions ------------------------- */
765 static unsigned long e800_pin_config
[] __initdata
= {
768 GPIO29_AC97_SDATA_IN_0
,
769 GPIO30_AC97_SDATA_OUT
,
776 static struct w100_gen_regs e800_lcd_regs
= {
777 .lcd_format
= 0x00008003,
778 .lcdd_cntl1
= 0x02a00000,
779 .lcdd_cntl2
= 0x0003ffff,
780 .genlcd_cntl1
= 0x000ff2a3,
781 .genlcd_cntl2
= 0x000002a3,
782 .genlcd_cntl3
= 0x000102aa,
785 static struct w100_mode e800_lcd_mode
[2] = {
793 .crtc_ss
= 0x80350034,
794 .crtc_ls
= 0x802b0026,
795 .crtc_gs
= 0x80160016,
796 .crtc_vpos_gs
= 0x00020003,
797 .crtc_rev
= 0x0040001d,
798 .crtc_dclk
= 0xe0000000,
799 .crtc_gclk
= 0x82a50049,
800 .crtc_goe
= 0x80ee001c,
801 .crtc_ps1_active
= 0x00000000,
804 .pixclk_divider_rotated
= 6,
805 .pixclk_src
= CLK_SRC_PLL
,
807 .sysclk_src
= CLK_SRC_PLL
,
816 .crtc_ss
= 0xd010000f,
817 .crtc_ls
= 0x80070003,
818 .crtc_gs
= 0x80000000,
819 .crtc_vpos_gs
= 0x01460147,
820 .crtc_rev
= 0x00400003,
821 .crtc_dclk
= 0xa1700030,
822 .crtc_gclk
= 0x814b0008,
823 .crtc_goe
= 0x80cc0015,
824 .crtc_ps1_active
= 0x00000000,
826 .pixclk_divider
= 6, /* Wince uses 14 which gives a */
827 .pixclk_divider_rotated
= 6, /* 7MHz Pclk. We use a 14MHz one */
828 .pixclk_src
= CLK_SRC_PLL
,
830 .sysclk_src
= CLK_SRC_PLL
,
835 static struct w100_gpio_regs e800_w100_gpio_info
= {
836 .init_data1
= 0xc13fc019,
837 .gpio_dir1
= 0x3e40df7f,
838 .gpio_oe1
= 0x003c3000,
839 .init_data2
= 0x00000000,
840 .gpio_dir2
= 0x00000000,
841 .gpio_oe2
= 0x00000000,
844 static struct w100_mem_info e800_w100_mem_info
= {
845 .ext_cntl
= 0x09640011,
846 .sdram_mode_reg
= 0x00600021,
847 .ext_timing_cntl
= 0x10001545,
848 .io_cntl
= 0x7ddd7333,
852 static void e800_tg_change(struct w100fb_par
*par
)
856 tmp
= w100fb_gpio_read(W100_GPIO_PORT_A
);
857 if (par
->mode
->xres
== 480)
861 w100fb_gpio_write(W100_GPIO_PORT_A
, tmp
);
864 static struct w100_tg_info e800_tg_info
= {
865 .change
= e800_tg_change
,
868 static struct w100fb_mach_info e800_fb_info
= {
869 .modelist
= e800_lcd_mode
,
871 .regs
= &e800_lcd_regs
,
872 .gpio
= &e800_w100_gpio_info
,
873 .mem
= &e800_w100_mem_info
,
875 .xtal_freq
= 16000000,
878 static struct resource e800_fb_resources
[] = {
882 .flags
= IORESOURCE_MEM
,
886 static struct platform_device e800_fb_device
= {
890 .platform_data
= &e800_fb_info
,
892 .num_resources
= ARRAY_SIZE(e800_fb_resources
),
893 .resource
= e800_fb_resources
,
896 /* --------------------------- UDC definitions --------------------------- */
898 static struct gpiod_lookup_table e800_gpio_vbus_gpiod_table
= {
899 .dev_id
= "gpio-vbus",
901 GPIO_LOOKUP("gpio-pxa", GPIO_E800_USB_DISC
,
902 "vbus", GPIO_ACTIVE_HIGH
),
903 GPIO_LOOKUP("gpio-pxa", GPIO_E800_USB_PULLUP
,
904 "pullup", GPIO_ACTIVE_LOW
),
909 static struct platform_device e800_gpio_vbus
= {
915 /* ----------------- e800 tc6393xb parameters ------------------ */
917 static struct tc6393xb_platform_data e800_tc6393xb_info
= {
918 .irq_base
= IRQ_BOARD_START
,
919 .scr_pll2cr
= 0x0cc1,
922 .suspend
= &eseries_tmio_suspend
,
923 .resume
= &eseries_tmio_resume
,
924 .enable
= &eseries_tmio_enable
,
925 .disable
= &eseries_tmio_disable
,
928 static struct platform_device e800_tc6393xb_device
= {
932 .platform_data
= &e800_tc6393xb_info
,
935 .resource
= eseries_tmio_resources
,
938 static struct platform_device e800_audio_device
= {
939 .name
= "e800-audio",
943 /* ----------------------------------------------------------------------- */
945 static struct platform_device
*e800_devices
[] __initdata
= {
947 &e800_tc6393xb_device
,
952 static void __init
e800_init(void)
954 pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config
));
955 pxa_set_ffuart_info(NULL
);
956 pxa_set_btuart_info(NULL
);
957 pxa_set_stuart_info(NULL
);
958 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device
.name
,
960 eseries_get_tmio_gpios();
961 gpiod_add_lookup_table(&e800_gpio_vbus_gpiod_table
);
962 platform_add_devices(ARRAY_AND_SIZE(e800_devices
));
963 pxa_set_ac97_info(NULL
);
966 MACHINE_START(E800
, "Toshiba e800")
967 /* Maintainer: Ian Molton (spyro@f2s.com) */
968 .atag_offset
= 0x100,
969 .map_io
= pxa25x_map_io
,
970 .nr_irqs
= ESERIES_NR_IRQS
,
971 .init_irq
= pxa25x_init_irq
,
972 .handle_irq
= pxa25x_handle_irq
,
973 .fixup
= eseries_fixup
,
974 .init_machine
= e800_init
,
975 .init_time
= pxa_timer_init
,
976 .restart
= pxa_restart
,