e750.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * Hardware definitions for the Toshiba eseries PDAs
  3. *
  4. * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
  5. *
  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
  9. * or implied.
  10. *
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <linux/device.h>
  15. #include <linux/platform_device.h>
  16. #include <linux/fb.h>
  17. #include <video/w100fb.h>
  18. #include <asm/setup.h>
  19. #include <asm/mach/arch.h>
  20. #include <asm/mach-types.h>
  21. #include <mach/mfp-pxa25x.h>
  22. #include <mach/hardware.h>
  23. #include <mach/udc.h>
  24. #include "generic.h"
  25. #include "eseries.h"
  26. /* ---------------------- E750 LCD definitions -------------------- */
  27. static struct w100_gen_regs e750_lcd_regs = {
  28. .lcd_format = 0x00008003,
  29. .lcdd_cntl1 = 0x00000000,
  30. .lcdd_cntl2 = 0x0003ffff,
  31. .genlcd_cntl1 = 0x00fff003,
  32. .genlcd_cntl2 = 0x003c0f03,
  33. .genlcd_cntl3 = 0x000143aa,
  34. };
  35. static struct w100_mode e750_lcd_mode = {
  36. .xres = 240,
  37. .yres = 320,
  38. .left_margin = 21,
  39. .right_margin = 22,
  40. .upper_margin = 5,
  41. .lower_margin = 4,
  42. .crtc_ss = 0x80150014,
  43. .crtc_ls = 0x8014000d,
  44. .crtc_gs = 0xc1000005,
  45. .crtc_vpos_gs = 0x00020147,
  46. .crtc_rev = 0x0040010a,
  47. .crtc_dclk = 0xa1700030,
  48. .crtc_gclk = 0x80cc0015,
  49. .crtc_goe = 0x80cc0015,
  50. .crtc_ps1_active = 0x61060017,
  51. .pll_freq = 57,
  52. .pixclk_divider = 4,
  53. .pixclk_divider_rotated = 4,
  54. .pixclk_src = CLK_SRC_XTAL,
  55. .sysclk_divider = 1,
  56. .sysclk_src = CLK_SRC_PLL,
  57. };
  58. static struct w100_gpio_regs e750_w100_gpio_info = {
  59. .init_data1 = 0x01192f1b,
  60. .gpio_dir1 = 0xd5ffdeff,
  61. .gpio_oe1 = 0x000020bf,
  62. .init_data2 = 0x010f010f,
  63. .gpio_dir2 = 0xffffffff,
  64. .gpio_oe2 = 0x000001cf,
  65. };
  66. static struct w100fb_mach_info e750_fb_info = {
  67. .modelist = &e750_lcd_mode,
  68. .num_modes = 1,
  69. .regs = &e750_lcd_regs,
  70. .gpio = &e750_w100_gpio_info,
  71. .xtal_freq = 14318000,
  72. .xtal_dbl = 1,
  73. };
  74. static struct resource e750_fb_resources[] = {
  75. [0] = {
  76. .start = 0x0c000000,
  77. .end = 0x0cffffff,
  78. .flags = IORESOURCE_MEM,
  79. },
  80. };
  81. static struct platform_device e750_fb_device = {
  82. .name = "w100fb",
  83. .id = -1,
  84. .dev = {
  85. .platform_data = &e750_fb_info,
  86. },
  87. .num_resources = ARRAY_SIZE(e750_fb_resources),
  88. .resource = e750_fb_resources,
  89. };
  90. /* ----------------------------------------------------------------------- */
  91. static struct platform_device *devices[] __initdata = {
  92. &e750_fb_device,
  93. };
  94. static void __init e750_init(void)
  95. {
  96. platform_add_devices(devices, ARRAY_SIZE(devices));
  97. pxa_set_udc_info(&e7xx_udc_mach_info);
  98. }
  99. MACHINE_START(E750, "Toshiba e750")
  100. /* Maintainer: Ian Molton (spyro@f2s.com) */
  101. .phys_io = 0x40000000,
  102. .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
  103. .boot_params = 0xa0000100,
  104. .map_io = pxa_map_io,
  105. .init_irq = pxa25x_init_irq,
  106. .fixup = eseries_fixup,
  107. .init_machine = e750_init,
  108. .timer = &pxa_timer,
  109. MACHINE_END