memoryCall.c 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /*
  2. * linux/arch/arm/mach-omap2/board-omap3evm.c
  3. *
  4. * Copyright (C) 2008 Guangzhou EMA-Tech
  5. *
  6. * Modified from mach-omap2/board-omap3evm.c
  7. *
  8. * Initial code: Syed Mohammed Khasim
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/init.h>
  16. #include <linux/platform_device.h>
  17. #include <linux/delay.h>
  18. #include <linux/err.h>
  19. #include <linux/clk.h>
  20. #include <linux/io.h>
  21. #include <linux/leds.h>
  22. #include <linux/gpio.h>
  23. #include <linux/input.h>
  24. #include <linux/gpio_keys.h>
  25. #include <linux/regulator/fixed.h>
  26. #include <linux/regulator/machine.h>
  27. #include <linux/i2c/twl.h>
  28. #include <linux/mmc/host.h>
  29. #include <linux/input/matrix_keypad.h>
  30. #include <linux/spi/spi.h>
  31. #include <linux/interrupt.h>
  32. #include <linux/smsc911x.h>
  33. #include <linux/i2c/at24.h>
  34. #include <asm/mach-types.h>
  35. #include <asm/mach/arch.h>
  36. #include <asm/mach/map.h>
  37. #include <asm/mach/flash.h>
  38. #include "common.h"
  39. #include "gpmc.h"
  40. #include <linux/platform_data/mtd-nand-omap2.h>
  41. #include <video/omapdss.h>
  42. #include <video/omap-panel-generic-dpi.h>
  43. #include <video/omap-panel-tfp410.h>
  44. #include <linux/platform_data/spi-omap2-mcspi.h>
  45. #include "sdram-micron-mt46h32m32lf-6.h"
  46. #include "mux.h"
  47. #include "hsmmc.h"
  48. #include "common-board-devices.h"
  49. #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
  50. #include "gpmc-smsc911x.h"
  51. #define OMAP3STALKER_ETHR_START 0x2c000000
  52. #define OMAP3STALKER_ETHR_SIZE 1024
  53. #define OMAP3STALKER_ETHR_GPIO_IRQ 19
  54. #define OMAP3STALKER_SMC911X_CS 5
  55. static struct omap_smsc911x_platform_data smsc911x_cfg = {
  56. .cs = OMAP3STALKER_SMC911X_CS,
  57. .gpio_irq = OMAP3STALKER_ETHR_GPIO_IRQ,
  58. .gpio_reset = -EINVAL,
  59. .flags = (SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS),
  60. };
  61. static inline void __init omap3stalker_init_eth(void)
  62. {
  63. omap_mux_init_gpio(19, OMAP_PIN_INPUT_PULLUP);
  64. gpmc_smsc911x_init(&smsc911x_cfg);
  65. }
  66. #else
  67. static inline void __init omap3stalker_init_eth(void)
  68. {
  69. return;
  70. }
  71. #endif
  72. /*
  73. * OMAP3 DSS control signals
  74. */
  75. #define DSS_ENABLE_GPIO 199
  76. #define LCD_PANEL_BKLIGHT_GPIO 210
  77. #define ENABLE_VPLL2_DEV_GRP 0xE0
  78. static void __init omap3_stalker_display_init(void)
  79. {
  80. return;
  81. }
  82. static int omap3_stalker_enable_tv(struct omap_dss_device *dssdev)
  83. {
  84. return 0;
  85. }
  86. static void omap3_stalker_disable_tv(struct omap_dss_device *dssdev)
  87. {
  88. }
  89. static struct omap_dss_device omap3_stalker_tv_device = {
  90. .name = "tv",
  91. .driver_name = "venc",
  92. .type = OMAP_DISPLAY_TYPE_VENC,
  93. #if defined(CONFIG_OMAP2_VENC_OUT_TYPE_SVIDEO)
  94. .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
  95. #elif defined(CONFIG_OMAP2_VENC_OUT_TYPE_COMPOSITE)
  96. .u.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE,
  97. #endif
  98. .platform_enable = omap3_stalker_enable_tv,
  99. .platform_disable = omap3_stalker_disable_tv,
  100. };
  101. static struct tfp410_platform_data dvi_panel = {
  102. .power_down_gpio = DSS_ENABLE_GPIO,
  103. .i2c_bus_num = -1,
  104. };
  105. static struct omap_dss_device omap3_stalker_dvi_device = {
  106. .name = "dvi",
  107. .type = OMAP_DISPLAY_TYPE_DPI,
  108. .driver_name = "tfp410",
  109. .data = &dvi_panel,
  110. .phy.dpi.data_lines = 24,
  111. };
  112. static struct omap_dss_device *omap3_stalker_dss_devices[] = {
  113. &omap3_stalker_tv_device,
  114. &omap3_stalker_dvi_device,
  115. };
  116. static struct omap_dss_board_info omap3_stalker_dss_data = {
  117. .num_devices = ARRAY_SIZE(omap3_stalker_dss_devices),
  118. .devices = omap3_stalker_dss_devices,
  119. .default_device = &omap3_stalker_dvi_device,
  120. };
  121. static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = {
  122. REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
  123. };
  124. static struct regulator_consumer_supply omap3stalker_vsim_supply[] = {
  125. REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
  126. };
  127. /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
  128. static struct regulator_init_data omap3stalker_vmmc1 = {
  129. .constraints = {
  130. .min_uV = 1850000,
  131. .max_uV = 3150000,
  132. .valid_modes_mask = REGULATOR_MODE_NORMAL
  133. | REGULATOR_MODE_STANDBY,
  134. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
  135. | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
  136. },
  137. .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vmmc1_supply),
  138. .consumer_supplies = omap3stalker_vmmc1_supply,
  139. };