board-u5500-sdi.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2010
  3. *
  4. * Author: Hanumath Prasad <ulf.hansson@stericsson.com>
  5. * License terms: GNU General Public License (GPL) version 2
  6. */
  7. #include <linux/amba/mmci.h>
  8. #include <linux/mmc/host.h>
  9. #include <linux/gpio.h>
  10. #include <plat/pincfg.h>
  11. #include <mach/db5500-regs.h>
  12. #include <plat/ste_dma40.h>
  13. #include "pins-db5500.h"
  14. #include "devices-db5500.h"
  15. #include "ste-dma40-db5500.h"
  16. static pin_cfg_t u5500_sdi_pins[] = {
  17. /* SDI0 (POP eMMC) */
  18. GPIO5_MC0_DAT0 | PIN_DIR_INPUT | PIN_PULL_UP,
  19. GPIO6_MC0_DAT1 | PIN_DIR_INPUT | PIN_PULL_UP,
  20. GPIO7_MC0_DAT2 | PIN_DIR_INPUT | PIN_PULL_UP,
  21. GPIO8_MC0_DAT3 | PIN_DIR_INPUT | PIN_PULL_UP,
  22. GPIO9_MC0_DAT4 | PIN_DIR_INPUT | PIN_PULL_UP,
  23. GPIO10_MC0_DAT5 | PIN_DIR_INPUT | PIN_PULL_UP,
  24. GPIO11_MC0_DAT6 | PIN_DIR_INPUT | PIN_PULL_UP,
  25. GPIO12_MC0_DAT7 | PIN_DIR_INPUT | PIN_PULL_UP,
  26. GPIO13_MC0_CMD | PIN_DIR_INPUT | PIN_PULL_UP,
  27. GPIO14_MC0_CLK | PIN_DIR_OUTPUT | PIN_VAL_LOW,
  28. };
  29. static struct mmci_platform_data u5500_sdi0_data = {
  30. .ocr_mask = MMC_VDD_165_195,
  31. .f_max = 50000000,
  32. .capabilities = MMC_CAP_4_BIT_DATA |
  33. MMC_CAP_8_BIT_DATA |
  34. MMC_CAP_MMC_HIGHSPEED,
  35. .gpio_cd = -1,
  36. .gpio_wp = -1,
  37. };
  38. void __init u5500_sdi_init(void)
  39. {
  40. nmk_config_pins(u5500_sdi_pins, ARRAY_SIZE(u5500_sdi_pins));
  41. db5500_add_sdi0(&u5500_sdi0_data);
  42. }