board-msm7627a.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #ifndef __ARCH_ARM_MACH_MSM_BOARD_7627A__
  14. #define __ARCH_ARM_MACH_MSM_BOARD_7627A__
  15. #include "pm.h"
  16. void __init msm7627a_init_mmc(void);
  17. void __init msm_msm7627a_allocate_memory_regions(void);
  18. void __init msm_fb_add_devices(void);
  19. enum {
  20. GPIO_EXPANDER_IRQ_BASE = NR_MSM_IRQS + NR_GPIO_IRQS,
  21. GPIO_EXPANDER_GPIO_BASE = NR_MSM_GPIOS,
  22. /* SURF expander */
  23. GPIO_CORE_EXPANDER_BASE = GPIO_EXPANDER_GPIO_BASE,
  24. GPIO_BT_SYS_REST_EN = GPIO_CORE_EXPANDER_BASE,
  25. GPIO_WLAN_EXT_POR_N,
  26. GPIO_DISPLAY_PWR_EN,
  27. GPIO_BACKLIGHT_EN,
  28. GPIO_PRESSURE_XCLR,
  29. GPIO_VREG_S3_EXP,
  30. GPIO_UBM2M_PWRDWN,
  31. GPIO_ETM_MODE_CS_N,
  32. GPIO_HOST_VBUS_EN,
  33. GPIO_SPI_MOSI,
  34. GPIO_SPI_MISO,
  35. GPIO_SPI_CLK,
  36. GPIO_SPI_CS0_N,
  37. GPIO_CORE_EXPANDER_IO13,
  38. GPIO_CORE_EXPANDER_IO14,
  39. GPIO_CORE_EXPANDER_IO15,
  40. /* Camera expander */
  41. GPIO_CAM_EXPANDER_BASE = GPIO_CORE_EXPANDER_BASE + 16,
  42. GPIO_CAM_GP_STROBE_READY = GPIO_CAM_EXPANDER_BASE,
  43. GPIO_CAM_GP_AFBUSY,
  44. GPIO_CAM_GP_CAM_PWDN,
  45. GPIO_CAM_GP_CAM1MP_XCLR,
  46. GPIO_CAM_GP_CAMIF_RESET_N,
  47. GPIO_CAM_GP_STROBE_CE,
  48. GPIO_CAM_GP_LED_EN1,
  49. GPIO_CAM_GP_LED_EN2,
  50. };
  51. enum {
  52. QRD_GPIO_HOST_VBUS_EN = 107,
  53. QRD_GPIO_BT_SYS_REST_EN = 114,
  54. QRD_GPIO_WAKE_ON_WIRELESS,
  55. QRD_GPIO_BACKLIGHT_EN,
  56. QRD_GPIO_NC,
  57. QRD_GPIO_CAM_3MP_PWDN, /* CAM_VGA */
  58. QRD_GPIO_WLAN_EN,
  59. QRD_GPIO_CAM_5MP_SHDN_EN,
  60. QRD_GPIO_CAM_5MP_RESET,
  61. QRD_GPIO_TP,
  62. QRD_GPIO_CAM_GP_CAMIF_RESET,
  63. };
  64. #define ADSP_RPC_PROG 0x3000000a
  65. #if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
  66. #define FPGA_MSM_CNTRL_REG2 0x90008010
  67. #define BAHAMA_SLAVE_ID_FM_REG 0x02
  68. #define BAHAMA_SLAVE_ID_FM_ADDR 0x2A
  69. #define BAHAMA_SLAVE_ID_QMEMBIST_ADDR 0x7B
  70. #define FM_GPIO 83
  71. #define BT_PCM_BCLK_MODE 0x88
  72. #define BT_PCM_DIN_MODE 0x89
  73. #define BT_PCM_DOUT_MODE 0x8A
  74. #define BT_PCM_SYNC_MODE 0x8B
  75. #define FM_I2S_SD_MODE 0x8E
  76. #define FM_I2S_WS_MODE 0x8F
  77. #define FM_I2S_SCK_MODE 0x90
  78. #define I2C_PIN_CTL 0x15
  79. #define I2C_NORMAL 0x40
  80. struct bahama_config_register {
  81. u8 reg;
  82. u8 value;
  83. u8 mask;
  84. };
  85. struct bt_vreg_info {
  86. const char *name;
  87. unsigned int pmapp_id;
  88. unsigned int min_level;
  89. unsigned int max_level;
  90. unsigned int is_pin_controlled;
  91. struct regulator *reg;
  92. };
  93. void __init msm7627a_bt_power_init(void);
  94. #endif
  95. extern struct platform_device msm_device_snd;
  96. extern struct platform_device msm_device_adspdec;
  97. extern struct platform_device msm_device_cad;
  98. void __init msm7627a_camera_init(void);
  99. int lcd_camera_power_onoff(int on);
  100. void __init msm7627a_add_io_devices(void);
  101. void __init qrd7627a_add_io_devices(void);
  102. #endif