mach-nuc950evb.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * linux/arch/arm/mach-w90x900/mach-nuc950evb.c
  3. *
  4. * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche
  5. *
  6. * Copyright (C) 2008 Nuvoton technology corporation.
  7. *
  8. * Wan ZongShun <mcuos.com@gmail.com>
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation;version 2 of the License.
  13. * history:
  14. * Wang Qiang (rurality.linux@gmail.com) add LCD support
  15. *
  16. */
  17. #include <linux/platform_device.h>
  18. #include <asm/mach/arch.h>
  19. #include <asm/mach/map.h>
  20. #include <asm/mach-types.h>
  21. #include <mach/map.h>
  22. #include <mach/regs-ldm.h>
  23. #include <mach/fb.h>
  24. #include "nuc950.h"
  25. #ifdef CONFIG_FB_NUC900
  26. /* LCD Controller */
  27. static struct nuc900fb_display __initdata nuc950_lcd_info[] = {
  28. /* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */
  29. [0] = {
  30. .type = LCM_DCCS_VA_SRC_RGB565,
  31. .width = 320,
  32. .height = 240,
  33. .xres = 320,
  34. .yres = 240,
  35. .bpp = 16,
  36. .pixclock = 200000,
  37. .left_margin = 34,
  38. .right_margin = 54,
  39. .hsync_len = 10,
  40. .upper_margin = 18,
  41. .lower_margin = 4,
  42. .vsync_len = 1,
  43. .dccs = 0x8e00041a,
  44. .devctl = 0x060800c0,
  45. .fbctrl = 0x00a000a0,
  46. .scale = 0x04000400,
  47. },
  48. };
  49. static struct nuc900fb_mach_info nuc950_fb_info __initdata = {
  50. #if defined(CONFIG_GPM1040A0_320X240)
  51. .displays = &nuc950_lcd_info[0],
  52. #else
  53. .displays = nuc950_lcd_info,
  54. #endif
  55. .num_displays = ARRAY_SIZE(nuc950_lcd_info),
  56. .default_display = 0,
  57. .gpio_dir = 0x00000004,
  58. .gpio_dir_mask = 0xFFFFFFFD,
  59. .gpio_data = 0x00000004,
  60. .gpio_data_mask = 0xFFFFFFFD,
  61. };
  62. #endif
  63. static void __init nuc950evb_map_io(void)
  64. {
  65. nuc950_map_io();
  66. nuc950_init_clocks();
  67. }
  68. static void __init nuc950evb_init(void)
  69. {
  70. nuc950_board_init();
  71. #ifdef CONFIG_FB_NUC900
  72. nuc900_fb_set_platdata(&nuc950_fb_info);
  73. #endif
  74. }
  75. MACHINE_START(W90P950EVB, "W90P950EVB")
  76. /* Maintainer: Wan ZongShun */
  77. .phys_io = W90X900_PA_UART,
  78. .io_pg_offst = (((u32)W90X900_VA_UART) >> 18) & 0xfffc,
  79. .boot_params = 0,
  80. .map_io = nuc950evb_map_io,
  81. .init_irq = nuc900_init_irq,
  82. .init_machine = nuc950evb_init,
  83. .timer = &nuc900_timer,
  84. MACHINE_END