synchronousMemoryDatabase.c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. /* linux/arch/arm/mach-s5pv210/mach-aquila.c
  2. *
  3. * Copyright (c) 2010 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com/
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/types.h>
  12. #include <linux/init.h>
  13. #include <linux/serial_core.h>
  14. #include <linux/fb.h>
  15. #include <linux/i2c.h>
  16. #include <linux/i2c-gpio.h>
  17. #include <linux/mfd/max8998.h>
  18. #include <linux/mfd/wm8994/pdata.h>
  19. #include <linux/regulator/fixed.h>
  20. #include <linux/gpio_keys.h>
  21. #include <linux/input.h>
  22. #include <linux/gpio.h>
  23. #include <asm/hardware/vic.h>
  24. #include <asm/mach/arch.h>
  25. #include <asm/mach/map.h>
  26. #include <asm/setup.h>
  27. #include <asm/mach-types.h>
  28. #include <video/samsung_fimd.h>
  29. #include <mach/map.h>
  30. #include <mach/regs-clock.h>
  31. #include <plat/gpio-cfg.h>
  32. #include <plat/regs-serial.h>
  33. #include <plat/devs.h>
  34. #include <plat/cpu.h>
  35. #include <plat/fb.h>
  36. #include <plat/fimc-core.h>
  37. #include <plat/sdhci.h>
  38. #include <plat/s5p-time.h>
  39. #include "common.h"
  40. /* Following are default values for UCON, ULCON and UFCON UART registers */
  41. #define AQUILA_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
  42. S3C2410_UCON_RXILEVEL | \
  43. S3C2410_UCON_TXIRQMODE | \
  44. S3C2410_UCON_RXIRQMODE | \
  45. S3C2410_UCON_RXFIFO_TOI | \
  46. S3C2443_UCON_RXERR_IRQEN)
  47. #define AQUILA_ULCON_DEFAULT S3C2410_LCON_CS8
  48. #define AQUILA_UFCON_DEFAULT S3C2410_UFCON_FIFOMODE
  49. static struct s3c2410_uartcfg aquila_uartcfgs[] __initdata = {
  50. [0] = {
  51. .hwport = 0,
  52. .flags = 0,
  53. .ucon = AQUILA_UCON_DEFAULT,
  54. .ulcon = AQUILA_ULCON_DEFAULT,
  55. /*
  56. * Actually UART0 can support 256 bytes fifo, but aquila board
  57. * supports 128 bytes fifo because of initial chip bug
  58. */
  59. .ufcon = AQUILA_UFCON_DEFAULT |
  60. S5PV210_UFCON_TXTRIG128 | S5PV210_UFCON_RXTRIG128,
  61. },
  62. [1] = {
  63. .hwport = 1,
  64. .flags = 0,
  65. .ucon = AQUILA_UCON_DEFAULT,
  66. .ulcon = AQUILA_ULCON_DEFAULT,
  67. .ufcon = AQUILA_UFCON_DEFAULT |
  68. S5PV210_UFCON_TXTRIG64 | S5PV210_UFCON_RXTRIG64,
  69. },
  70. [2] = {
  71. .hwport = 2,
  72. .flags = 0,
  73. .ucon = AQUILA_UCON_DEFAULT,
  74. .ulcon = AQUILA_ULCON_DEFAULT,
  75. .ufcon = AQUILA_UFCON_DEFAULT |
  76. S5PV210_UFCON_TXTRIG16 | S5PV210_UFCON_RXTRIG16,
  77. },
  78. [3] = {
  79. .hwport = 3,
  80. .flags = 0,
  81. .ucon = AQUILA_UCON_DEFAULT,
  82. .ulcon = AQUILA_ULCON_DEFAULT,
  83. .ufcon = AQUILA_UFCON_DEFAULT |
  84. S5PV210_UFCON_TXTRIG16 | S5PV210_UFCON_RXTRIG16,
  85. },
  86. };
  87. /* Frame Buffer */
  88. static struct s3c_fb_pd_win aquila_fb_win0 = {
  89. .max_bpp = 32,
  90. .default_bpp = 16,
  91. .xres = 480,
  92. .yres = 800,
  93. };
  94. static struct s3c_fb_pd_win aquila_fb_win1 = {
  95. .max_bpp = 32,
  96. .default_bpp = 16,
  97. .xres = 480,
  98. .yres = 800,
  99. };
  100. static struct fb_videomode aquila_lcd_timing = {
  101. .left_margin = 16,
  102. .right_margin = 16,
  103. .upper_margin = 3,
  104. .lower_margin = 28,
  105. .hsync_len = 2,
  106. .vsync_len = 2,
  107. .xres = 480,
  108. .yres = 800,
  109. };
  110. static struct s3c_fb_platdata aquila_lcd_pdata __initdata = {
  111. .win[0] = &aquila_fb_win0,
  112. .win[1] = &aquila_fb_win1,
  113. .vtiming = &aquila_lcd_timing,
  114. .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
  115. .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
  116. VIDCON1_INV_VCLK | VIDCON1_INV_VDEN,
  117. .setup_gpio = s5pv210_fb_gpio_setup_24bpp,
  118. };
  119. /* MAX8998 regulators */
  120. #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
  121. static struct regulator_init_data aquila_ldo2_data = {
  122. .constraints = {
  123. .name = "VALIVE_1.1V",
  124. .min_uV = 1100000,
  125. .max_uV = 1100000,
  126. .apply_uV = 1,
  127. .always_on = 1,
  128. .state_mem = {
  129. .enabled = 1,
  130. },
  131. },
  132. };