/arch/arm/mach-msm/board-8960.h

https://github.com/AICP/kernel_google_msm · C Header · 96 lines · 66 code · 16 blank · 14 comment · 0 complexity · 04c095610e6b2025d56b3eb3e7edbe6e MD5 · raw file

  1. /* Copyright (c) 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. #ifndef __ARCH_ARM_MACH_MSM_BOARD_MSM8960_H
  13. #define __ARCH_ARM_MACH_MSM_BOARD_MSM8960_H
  14. #include <linux/regulator/msm-gpio-regulator.h>
  15. #include <linux/mfd/pm8xxx/pm8921.h>
  16. #include <linux/i2c.h>
  17. #include <linux/i2c/sx150x.h>
  18. #include <mach/irqs.h>
  19. #include <mach/rpm-regulator.h>
  20. #include <mach/msm_memtypes.h>
  21. #include <mach/msm_rtb.h>
  22. #include <mach/msm_cache_dump.h>
  23. /* Macros assume PMIC GPIOs and MPPs start at 1 */
  24. #define PM8921_GPIO_BASE NR_GPIO_IRQS
  25. #define PM8921_GPIO_PM_TO_SYS(pm_gpio) (pm_gpio - 1 + PM8921_GPIO_BASE)
  26. #define PM8921_MPP_BASE (PM8921_GPIO_BASE + PM8921_NR_GPIOS)
  27. #define PM8921_MPP_PM_TO_SYS(pm_gpio) (pm_gpio - 1 + PM8921_MPP_BASE)
  28. #define PM8921_IRQ_BASE (NR_MSM_IRQS + NR_GPIO_IRQS)
  29. extern struct pm8xxx_regulator_platform_data
  30. msm_pm8921_regulator_pdata[] __devinitdata;
  31. extern int msm_pm8921_regulator_pdata_len __devinitdata;
  32. #define GPIO_VREG_ID_EXT_5V 0
  33. #define GPIO_VREG_ID_EXT_L2 1
  34. #define GPIO_VREG_ID_EXT_3P3V 2
  35. #define GPIO_VREG_ID_EXT_OTG_SW 3
  36. extern struct gpio_regulator_platform_data
  37. msm_gpio_regulator_pdata[] __devinitdata;
  38. extern struct regulator_init_data msm_saw_regulator_pdata_s5;
  39. extern struct regulator_init_data msm_saw_regulator_pdata_s6;
  40. extern struct rpm_regulator_platform_data msm_rpm_regulator_pdata __devinitdata;
  41. /* GPIO SX150X */
  42. enum {
  43. GPIO_EXPANDER_IRQ_BASE = (PM8921_IRQ_BASE + PM8921_NR_IRQS),
  44. GPIO_EXPANDER_GPIO_BASE = (PM8921_MPP_BASE + PM8921_NR_MPPS),
  45. /* CAM Expander */
  46. GPIO_CAM_EXPANDER_BASE = GPIO_EXPANDER_GPIO_BASE,
  47. GPIO_CAM_GP_STROBE_READY = GPIO_CAM_EXPANDER_BASE,
  48. GPIO_CAM_GP_AFBUSY,
  49. GPIO_CAM_GP_STROBE_CE,
  50. GPIO_CAM_GP_CAM1MP_XCLR,
  51. GPIO_CAM_GP_CAMIF_RESET_N,
  52. GPIO_CAM_GP_XMT_FLASH_INT,
  53. GPIO_CAM_GP_LED_EN1,
  54. GPIO_CAM_GP_LED_EN2,
  55. GPIO_LIQUID_EXPANDER_BASE = GPIO_CAM_EXPANDER_BASE + 8,
  56. };
  57. enum {
  58. SX150X_CAM,
  59. SX150X_LIQUID,
  60. };
  61. extern struct sx150x_platform_data msm8960_sx150x_data[];
  62. extern struct msm_camera_board_info msm8960_camera_board_info;
  63. void msm8960_init_cam(void);
  64. void msm8960_init_fb(void);
  65. void msm8960_init_pmic(void);
  66. void msm8960_init_mmc(void);
  67. int msm8960_init_gpiomux(void);
  68. void __init configure_msm8960_power_grid(void);
  69. unsigned char msm8960_hdmi_as_primary_selected(void);
  70. void msm8960_allocate_fb_region(void);
  71. void msm8960_set_display_params(char *prim_panel, char *ext_panel);
  72. void msm8960_pm8921_gpio_mpp_init(void);
  73. void msm8960_mdp_writeback(struct memtype_reserve *reserve_table);
  74. #define MSM_8960_GSBI4_QUP_I2C_BUS_ID 4
  75. #define MSM_8960_GSBI3_QUP_I2C_BUS_ID 3
  76. #define MSM_8960_GSBI10_QUP_I2C_BUS_ID 10
  77. extern struct msm_rtb_platform_data msm8960_rtb_pdata;
  78. extern struct msm_cache_dump_platform_data msm8960_cache_dump_pdata;
  79. extern void msm8960_add_vidc_device(void);
  80. #endif