leakageCurrentVariance.c 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /* linux/arch/arm/mach-s3c64xx/mach-smdk6410.c
  2. *
  3. * Copyright 2008 Openmoko, Inc.
  4. * Copyright 2008 Simtec Electronics
  5. * Ben Dooks <ben@simtec.co.uk>
  6. * http://armlinux.simtec.co.uk/
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. */
  13. #include <linux/kernel.h>
  14. #include <linux/types.h>
  15. #include <linux/interrupt.h>
  16. #include <linux/list.h>
  17. #include <linux/timer.h>
  18. #include <linux/init.h>
  19. #include <linux/input.h>
  20. #include <linux/serial_core.h>
  21. #include <linux/platform_device.h>
  22. #include <linux/io.h>
  23. #include <linux/i2c.h>
  24. #include <linux/leds.h>
  25. #include <linux/fb.h>
  26. #include <linux/gpio.h>
  27. #include <linux/delay.h>
  28. #include <linux/smsc911x.h>
  29. #include <linux/regulator/fixed.h>
  30. #include <linux/regulator/machine.h>
  31. #include <linux/pwm_backlight.h>
  32. #include <linux/platform_data/s3c-hsotg.h>
  33. #ifdef CONFIG_SMDK6410_WM1190_EV1
  34. #include <linux/mfd/wm8350/core.h>
  35. #include <linux/mfd/wm8350/pmic.h>
  36. #endif
  37. #ifdef CONFIG_SMDK6410_WM1192_EV1
  38. #include <linux/mfd/wm831x/core.h>
  39. #include <linux/mfd/wm831x/pdata.h>
  40. #endif
  41. #include <video/platform_lcd.h>
  42. #include <video/samsung_fimd.h>
  43. #include <asm/hardware/vic.h>
  44. #include <asm/mach/arch.h>
  45. #include <asm/mach/map.h>
  46. #include <asm/mach/irq.h>
  47. #include <mach/hardware.h>
  48. #include <mach/map.h>
  49. #include <asm/irq.h>
  50. #include <asm/mach-types.h>
  51. #include <plat/regs-serial.h>
  52. #include <mach/regs-modem.h>
  53. #include <mach/regs-gpio.h>
  54. #include <mach/regs-sys.h>
  55. #include <mach/regs-srom.h>
  56. #include <linux/platform_data/ata-samsung_cf.h>
  57. #include <linux/platform_data/i2c-s3c2410.h>
  58. #include <plat/fb.h>
  59. #include <plat/gpio-cfg.h>
  60. #include <plat/clock.h>
  61. #include <plat/devs.h>
  62. #include <plat/cpu.h>
  63. #include <plat/adc.h>
  64. #include <linux/platform_data/touchscreen-s3c2410.h>
  65. #include <plat/keypad.h>
  66. #include <plat/backlight.h>
  67. #include "common.h"
  68. #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
  69. #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
  70. #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
  71. static struct s3c2410_uartcfg smdk6410_uartcfgs[] __initdata = {
  72. [0] = {
  73. .hwport = 0,
  74. .flags = 0,
  75. .ucon = UCON,
  76. .ulcon = ULCON,
  77. .ufcon = UFCON,
  78. },
  79. [1] = {
  80. .hwport = 1,
  81. .flags = 0,
  82. .ucon = UCON,
  83. .ulcon = ULCON,
  84. .ufcon = UFCON,
  85. },
  86. [2] = {
  87. .hwport = 2,
  88. .flags = 0,
  89. .ucon = UCON,
  90. .ulcon = ULCON,
  91. .ufcon = UFCON,
  92. },
  93. [3] = {
  94. .hwport = 3,
  95. .flags = 0,
  96. .ucon = UCON,
  97. .ulcon = ULCON,
  98. .ufcon = UFCON,
  99. },
  100. };
  101. /* framebuffer and LCD setup. */
  102. /* GPF15 = LCD backlight control
  103. * GPF13 => Panel power
  104. * GPN5 = LCD nRESET signal
  105. * PWM_TOUT1 => backlight brightness
  106. */
  107. static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
  108. unsigned int power)
  109. {
  110. if (power) {
  111. gpio_direction_output(S3C64XX_GPF(13), 1);
  112. /* fire nRESET on power up */
  113. gpio_direction_output(S3C64XX_GPN(5), 0);
  114. msleep(10);
  115. gpio_direction_output(S3C64XX_GPN(5), 1);
  116. msleep(1);
  117. } else {
  118. gpio_direction_output(S3C64XX_GPF(13), 0);
  119. }
  120. }
  121. static struct plat_lcd_data smdk6410_lcd_power_data = {
  122. .set_power = smdk6410_lcd_power_set,
  123. };
  124. static struct platform_device smdk6410_lcd_powerdev = {
  125. .name = "platform-lcd",
  126. .dev.parent = &s3c_device_fb.dev,
  127. .dev.platform_data = &smdk6410_lcd_power_data,
  128. };
  129. static struct s3c_fb_pd_win smdk6410_fb_win0 = {
  130. .max_bpp = 32,
  131. .default_bpp = 16,
  132. .xres = 800,
  133. .yres = 480,
  134. .virtual_y = 480 * 2,
  135. .virtual_x = 800,
  136. };
  137. static struct fb_videomode smdk6410_lcd_timing = {
  138. .left_margin = 8,
  139. .right_margin = 13,
  140. .upper_margin = 7,
  141. .lower_margin = 5,
  142. .hsync_len = 3,
  143. .vsync_len = 1,