Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 1 | /* arch/arm/mach-msm/include/mach/board.h |
| 2 | * |
| 3 | * Copyright (C) 2007 Google, Inc. |
Nagamalleswararao Ganji | 70fac1e | 2011-12-29 19:06:37 -0800 | [diff] [blame] | 4 | * Copyright (c) 2008-2012, Code Aurora Forum. All rights reserved. |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 5 | * Author: Brian Swetland <swetland@google.com> |
| 6 | * |
| 7 | * This software is licensed under the terms of the GNU General Public |
| 8 | * License version 2, as published by the Free Software Foundation, and |
| 9 | * may be copied, distributed, and modified under those terms. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #ifndef __ASM_ARCH_MSM_BOARD_H |
| 19 | #define __ASM_ARCH_MSM_BOARD_H |
| 20 | |
| 21 | #include <linux/types.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 22 | #include <linux/input.h> |
| 23 | #include <linux/usb.h> |
| 24 | #include <linux/leds-pmic8058.h> |
| 25 | #include <linux/clkdev.h> |
Sathish Ambley | c58afc2 | 2011-10-09 21:55:39 -0700 | [diff] [blame] | 26 | #include <linux/of_platform.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 27 | #include <linux/msm_ssbi.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 28 | #include <mach/msm_bus.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 29 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 30 | struct msm_camera_io_ext { |
| 31 | uint32_t mdcphy; |
| 32 | uint32_t mdcsz; |
| 33 | uint32_t appphy; |
| 34 | uint32_t appsz; |
| 35 | uint32_t camifpadphy; |
| 36 | uint32_t camifpadsz; |
| 37 | uint32_t csiphy; |
| 38 | uint32_t csisz; |
| 39 | uint32_t csiirq; |
| 40 | uint32_t csiphyphy; |
| 41 | uint32_t csiphysz; |
| 42 | uint32_t csiphyirq; |
| 43 | uint32_t ispifphy; |
| 44 | uint32_t ispifsz; |
| 45 | uint32_t ispifirq; |
| 46 | }; |
| 47 | |
| 48 | struct msm_camera_io_clk { |
| 49 | uint32_t mclk_clk_rate; |
| 50 | uint32_t vfe_clk_rate; |
| 51 | }; |
| 52 | |
Nishant Pandit | 474f225 | 2011-07-23 23:17:56 +0530 | [diff] [blame] | 53 | struct msm_cam_expander_info { |
| 54 | struct i2c_board_info const *board_info; |
| 55 | int bus_id; |
| 56 | }; |
| 57 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 58 | struct msm_camera_device_platform_data { |
| 59 | int (*camera_gpio_on) (void); |
| 60 | void (*camera_gpio_off)(void); |
| 61 | struct msm_camera_io_ext ioext; |
| 62 | struct msm_camera_io_clk ioclk; |
| 63 | uint8_t csid_core; |
Suresh Vankadara | 8df2c75 | 2012-01-18 00:18:03 +0530 | [diff] [blame] | 64 | uint8_t is_csiphy; |
| 65 | uint8_t is_csic; |
| 66 | uint8_t is_csid; |
| 67 | uint8_t is_ispif; |
| 68 | uint8_t is_vpe; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 69 | struct msm_bus_scale_pdata *cam_bus_scale_table; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 70 | }; |
| 71 | enum msm_camera_csi_data_format { |
| 72 | CSI_8BIT, |
| 73 | CSI_10BIT, |
| 74 | CSI_12BIT, |
| 75 | }; |
| 76 | struct msm_camera_csi_params { |
| 77 | enum msm_camera_csi_data_format data_format; |
| 78 | uint8_t lane_cnt; |
| 79 | uint8_t lane_assign; |
| 80 | uint8_t settle_cnt; |
| 81 | uint8_t dpcm_scheme; |
| 82 | }; |
| 83 | |
| 84 | #ifdef CONFIG_SENSORS_MT9T013 |
| 85 | struct msm_camera_legacy_device_platform_data { |
| 86 | int sensor_reset; |
| 87 | int sensor_pwd; |
| 88 | int vcm_pwd; |
| 89 | void (*config_gpio_on) (void); |
| 90 | void (*config_gpio_off)(void); |
| 91 | }; |
| 92 | #endif |
| 93 | |
| 94 | #define MSM_CAMERA_FLASH_NONE 0 |
| 95 | #define MSM_CAMERA_FLASH_LED 1 |
| 96 | |
| 97 | #define MSM_CAMERA_FLASH_SRC_PMIC (0x00000001<<0) |
| 98 | #define MSM_CAMERA_FLASH_SRC_PWM (0x00000001<<1) |
| 99 | #define MSM_CAMERA_FLASH_SRC_CURRENT_DRIVER (0x00000001<<2) |
Nishant Pandit | 474f225 | 2011-07-23 23:17:56 +0530 | [diff] [blame] | 100 | #define MSM_CAMERA_FLASH_SRC_EXT (0x00000001<<3) |
Taniya Das | 7a22cdd | 2011-09-08 14:57:00 +0530 | [diff] [blame] | 101 | #define MSM_CAMERA_FLASH_SRC_LED (0x00000001<<3) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 102 | |
| 103 | struct msm_camera_sensor_flash_pmic { |
| 104 | uint8_t num_of_src; |
| 105 | uint32_t low_current; |
| 106 | uint32_t high_current; |
| 107 | enum pmic8058_leds led_src_1; |
| 108 | enum pmic8058_leds led_src_2; |
| 109 | int (*pmic_set_current)(enum pmic8058_leds id, unsigned mA); |
| 110 | }; |
| 111 | |
| 112 | struct msm_camera_sensor_flash_pwm { |
| 113 | uint32_t freq; |
| 114 | uint32_t max_load; |
| 115 | uint32_t low_load; |
| 116 | uint32_t high_load; |
| 117 | uint32_t channel; |
| 118 | }; |
| 119 | |
| 120 | struct pmic8058_leds_platform_data; |
| 121 | struct msm_camera_sensor_flash_current_driver { |
| 122 | uint32_t low_current; |
| 123 | uint32_t high_current; |
| 124 | const struct pmic8058_leds_platform_data *driver_channel; |
Nishant Pandit | 474f225 | 2011-07-23 23:17:56 +0530 | [diff] [blame] | 125 | }; |
| 126 | |
| 127 | struct msm_camera_sensor_flash_external { |
| 128 | uint32_t led_en; |
| 129 | uint32_t led_flash_en; |
| 130 | struct msm_cam_expander_info *expander_info; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 131 | }; |
| 132 | |
Taniya Das | 7a22cdd | 2011-09-08 14:57:00 +0530 | [diff] [blame] | 133 | struct msm_camera_sensor_flash_led { |
| 134 | const char *led_name; |
| 135 | const int led_name_len; |
| 136 | }; |
| 137 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 138 | struct msm_camera_sensor_flash_src { |
| 139 | int flash_sr_type; |
| 140 | |
| 141 | union { |
| 142 | struct msm_camera_sensor_flash_pmic pmic_src; |
| 143 | struct msm_camera_sensor_flash_pwm pwm_src; |
| 144 | struct msm_camera_sensor_flash_current_driver |
| 145 | current_driver_src; |
Nishant Pandit | 474f225 | 2011-07-23 23:17:56 +0530 | [diff] [blame] | 146 | struct msm_camera_sensor_flash_external |
| 147 | ext_driver_src; |
Taniya Das | 7a22cdd | 2011-09-08 14:57:00 +0530 | [diff] [blame] | 148 | struct msm_camera_sensor_flash_led led_src; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 149 | } _fsrc; |
| 150 | }; |
| 151 | |
| 152 | struct msm_camera_sensor_flash_data { |
| 153 | int flash_type; |
| 154 | struct msm_camera_sensor_flash_src *flash_src; |
| 155 | }; |
| 156 | |
| 157 | struct msm_camera_sensor_strobe_flash_data { |
| 158 | uint8_t flash_trigger; |
| 159 | uint8_t flash_charge; /* pin for charge */ |
| 160 | uint8_t flash_charge_done; |
| 161 | uint32_t flash_recharge_duration; |
| 162 | uint32_t irq; |
| 163 | spinlock_t spin_lock; |
| 164 | spinlock_t timer_lock; |
| 165 | int state; |
| 166 | }; |
| 167 | |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 168 | enum msm_camera_type { |
| 169 | BACK_CAMERA_2D, |
| 170 | FRONT_CAMERA_2D, |
| 171 | BACK_CAMERA_3D, |
| 172 | BACK_CAMERA_INT_3D, |
| 173 | }; |
| 174 | |
Kevin Chan | eb6b607 | 2012-01-17 11:54:54 -0800 | [diff] [blame] | 175 | enum camera_vreg_type { |
| 176 | REG_LDO, |
| 177 | REG_VS, |
Kevin Chan | 8b0d232 | 2011-09-10 21:06:31 -0700 | [diff] [blame] | 178 | }; |
| 179 | |
Kevin Chan | eb6b607 | 2012-01-17 11:54:54 -0800 | [diff] [blame] | 180 | struct camera_vreg_t { |
| 181 | char *reg_name; |
| 182 | enum camera_vreg_type type; |
| 183 | int min_voltage; |
| 184 | int max_voltage; |
| 185 | int op_mode; |
| 186 | }; |
| 187 | |
| 188 | struct msm_gpio_set_tbl { |
| 189 | unsigned gpio; |
| 190 | unsigned long flags; |
| 191 | uint32_t delay; |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 192 | }; |
| 193 | |
| 194 | struct msm_camera_gpio_conf { |
| 195 | void *cam_gpiomux_conf_tbl; |
| 196 | uint8_t cam_gpiomux_conf_tbl_size; |
Kevin Chan | eb6b607 | 2012-01-17 11:54:54 -0800 | [diff] [blame] | 197 | struct gpio *cam_gpio_common_tbl; |
| 198 | uint8_t cam_gpio_common_tbl_size; |
| 199 | struct gpio *cam_gpio_req_tbl; |
| 200 | uint8_t cam_gpio_req_tbl_size; |
| 201 | struct msm_gpio_set_tbl *cam_gpio_set_tbl; |
| 202 | uint8_t cam_gpio_set_tbl_size; |
| 203 | }; |
| 204 | |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame^] | 205 | enum msm_camera_i2c_mux_mode { |
| 206 | MODE_R, |
| 207 | MODE_L, |
| 208 | MODE_DUAL |
| 209 | }; |
| 210 | |
| 211 | struct msm_camera_i2c_conf { |
| 212 | uint8_t use_i2c_mux; |
| 213 | struct platform_device *mux_dev; |
| 214 | enum msm_camera_i2c_mux_mode i2c_mux_mode; |
| 215 | }; |
| 216 | |
Kevin Chan | eb6b607 | 2012-01-17 11:54:54 -0800 | [diff] [blame] | 217 | struct msm_camera_sensor_platform_info { |
| 218 | int mount_angle; |
| 219 | int sensor_reset; |
| 220 | struct camera_vreg_t *cam_vreg; |
| 221 | int num_vreg; |
| 222 | int32_t (*ext_power_ctrl) (int enable); |
| 223 | struct msm_camera_gpio_conf *gpio_conf; |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame^] | 224 | struct msm_camera_i2c_conf *i2c_conf; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 225 | }; |
| 226 | |
Sreesudhan Ramakrish Ramkumar | a4b5f30 | 2011-09-12 16:23:22 -0700 | [diff] [blame] | 227 | struct msm_actuator_info { |
| 228 | struct i2c_board_info const *board_info; |
| 229 | int bus_id; |
| 230 | int vcm_pwd; |
| 231 | int vcm_enable; |
| 232 | }; |
| 233 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 234 | struct msm_camera_sensor_info { |
| 235 | const char *sensor_name; |
| 236 | int sensor_reset_enable; |
| 237 | int sensor_reset; |
| 238 | int sensor_pwd; |
| 239 | int vcm_pwd; |
| 240 | int vcm_enable; |
| 241 | int mclk; |
| 242 | int flash_type; |
| 243 | struct msm_camera_sensor_platform_info *sensor_platform_info; |
| 244 | struct msm_camera_device_platform_data *pdata; |
| 245 | struct resource *resource; |
| 246 | uint8_t num_resources; |
| 247 | struct msm_camera_sensor_flash_data *flash_data; |
| 248 | int csi_if; |
| 249 | struct msm_camera_csi_params csi_params; |
| 250 | struct msm_camera_sensor_strobe_flash_data *strobe_flash_data; |
| 251 | char *eeprom_data; |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 252 | enum msm_camera_type camera_type; |
Sreesudhan Ramakrish Ramkumar | a4b5f30 | 2011-09-12 16:23:22 -0700 | [diff] [blame] | 253 | struct msm_actuator_info *actuator_info; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 254 | }; |
| 255 | |
Kevin Chan | 09f4e66 | 2011-12-16 08:17:02 -0800 | [diff] [blame] | 256 | struct msm_camera_board_info { |
| 257 | struct i2c_board_info *board_info; |
| 258 | uint8_t num_i2c_board_info; |
| 259 | }; |
| 260 | |
Stepan Moskovchenko | b3e6386 | 2011-10-20 18:36:55 -0700 | [diff] [blame] | 261 | int msm_get_cam_resources(struct msm_camera_sensor_info *); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 262 | |
Stephen Boyd | bd32344 | 2011-02-23 09:37:42 -0800 | [diff] [blame] | 263 | struct clk_lookup; |
Daniel Walker | 5e96da5 | 2010-05-12 13:43:28 -0700 | [diff] [blame] | 264 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 265 | struct snd_endpoint { |
| 266 | int id; |
| 267 | const char *name; |
| 268 | }; |
Steve Muckle | a55df6e | 2010-01-07 12:43:24 -0800 | [diff] [blame] | 269 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 270 | struct msm_snd_endpoints { |
| 271 | struct snd_endpoint *endpoints; |
| 272 | unsigned num; |
| 273 | }; |
| 274 | |
| 275 | #define MSM_MAX_DEC_CNT 14 |
| 276 | /* 7k target ADSP information */ |
| 277 | /* Bit 23:0, for codec identification like mp3, wav etc * |
| 278 | * Bit 27:24, for mode identification like tunnel, non tunnel* |
| 279 | * bit 31:28, for operation support like DM, DMA */ |
| 280 | enum msm_adspdec_concurrency { |
| 281 | MSM_ADSP_CODEC_WAV = 0, |
| 282 | MSM_ADSP_CODEC_ADPCM = 1, |
| 283 | MSM_ADSP_CODEC_MP3 = 2, |
| 284 | MSM_ADSP_CODEC_REALAUDIO = 3, |
| 285 | MSM_ADSP_CODEC_WMA = 4, |
| 286 | MSM_ADSP_CODEC_AAC = 5, |
| 287 | MSM_ADSP_CODEC_RESERVED = 6, |
| 288 | MSM_ADSP_CODEC_MIDI = 7, |
| 289 | MSM_ADSP_CODEC_YADPCM = 8, |
| 290 | MSM_ADSP_CODEC_QCELP = 9, |
| 291 | MSM_ADSP_CODEC_AMRNB = 10, |
| 292 | MSM_ADSP_CODEC_AMRWB = 11, |
| 293 | MSM_ADSP_CODEC_EVRC = 12, |
| 294 | MSM_ADSP_CODEC_WMAPRO = 13, |
| 295 | MSM_ADSP_MODE_TUNNEL = 24, |
| 296 | MSM_ADSP_MODE_NONTUNNEL = 25, |
| 297 | MSM_ADSP_MODE_LP = 26, |
| 298 | MSM_ADSP_OP_DMA = 28, |
| 299 | MSM_ADSP_OP_DM = 29, |
| 300 | }; |
| 301 | |
| 302 | struct msm_adspdec_info { |
| 303 | const char *module_name; |
| 304 | unsigned module_queueid; |
| 305 | int module_decid; /* objid */ |
| 306 | unsigned nr_codec_support; |
| 307 | }; |
| 308 | |
| 309 | /* Carries information about number codec |
| 310 | * supported if same codec or different codecs |
| 311 | */ |
| 312 | struct dec_instance_table { |
| 313 | uint8_t max_instances_same_dec; |
| 314 | uint8_t max_instances_diff_dec; |
| 315 | }; |
| 316 | |
| 317 | struct msm_adspdec_database { |
| 318 | unsigned num_dec; |
| 319 | unsigned num_concurrency_support; |
| 320 | unsigned int *dec_concurrency_table; /* Bit masked entry to * |
| 321 | * represents codec, mode etc */ |
| 322 | struct msm_adspdec_info *dec_info_list; |
| 323 | struct dec_instance_table *dec_instance_list; |
| 324 | }; |
| 325 | |
| 326 | enum msm_mdp_hw_revision { |
| 327 | MDP_REV_20 = 1, |
| 328 | MDP_REV_22, |
| 329 | MDP_REV_30, |
| 330 | MDP_REV_303, |
| 331 | MDP_REV_31, |
| 332 | MDP_REV_40, |
| 333 | MDP_REV_41, |
| 334 | MDP_REV_42, |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 335 | MDP_REV_43, |
| 336 | MDP_REV_44, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 337 | }; |
| 338 | |
| 339 | struct msm_panel_common_pdata { |
| 340 | uintptr_t hw_revision_addr; |
| 341 | int gpio; |
| 342 | int (*backlight_level)(int level, int max, int min); |
| 343 | int (*pmic_backlight)(int level); |
| 344 | int (*panel_num)(void); |
| 345 | void (*panel_config_gpio)(int); |
| 346 | int (*vga_switch)(int select_vga); |
| 347 | int *gpio_num; |
| 348 | int mdp_core_clk_rate; |
| 349 | unsigned num_mdp_clk; |
| 350 | int *mdp_core_clk_table; |
| 351 | #ifdef CONFIG_MSM_BUS_SCALING |
| 352 | struct msm_bus_scale_pdata *mdp_bus_scale_table; |
| 353 | #endif |
| 354 | int mdp_rev; |
Nagamalleswararao Ganji | 937a119 | 2011-12-07 19:00:52 -0800 | [diff] [blame] | 355 | u32 ov0_wb_size; /* overlay0 writeback size */ |
| 356 | u32 ov1_wb_size; /* overlay1 writeback size */ |
| 357 | u32 mem_hid; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 358 | }; |
| 359 | |
Huaibin Yang | a541942 | 2011-12-08 23:52:10 -0800 | [diff] [blame] | 360 | |
| 361 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 362 | struct lcdc_platform_data { |
| 363 | int (*lcdc_gpio_config)(int on); |
| 364 | int (*lcdc_power_save)(int); |
| 365 | unsigned int (*lcdc_get_clk)(void); |
| 366 | #ifdef CONFIG_MSM_BUS_SCALING |
| 367 | struct msm_bus_scale_pdata *bus_scale_table; |
| 368 | #endif |
| 369 | }; |
| 370 | |
| 371 | struct tvenc_platform_data { |
| 372 | int poll; |
| 373 | int (*pm_vid_en)(int on); |
| 374 | #ifdef CONFIG_MSM_BUS_SCALING |
| 375 | struct msm_bus_scale_pdata *bus_scale_table; |
| 376 | #endif |
| 377 | }; |
| 378 | |
| 379 | struct mddi_platform_data { |
| 380 | int (*mddi_power_save)(int on); |
| 381 | int (*mddi_sel_clk)(u32 *clk_rate); |
| 382 | int (*mddi_client_power)(u32 client_id); |
| 383 | }; |
| 384 | |
| 385 | struct mipi_dsi_platform_data { |
| 386 | int vsync_gpio; |
| 387 | int (*dsi_power_save)(int on); |
| 388 | int (*dsi_client_reset)(void); |
| 389 | int (*get_lane_config)(void); |
| 390 | int target_type; |
| 391 | }; |
| 392 | |
Chandan Uddaraju | 83eac3c | 2011-09-11 18:32:23 -0700 | [diff] [blame] | 393 | enum mipi_dsi_3d_ctrl { |
| 394 | FPGA_EBI2_INTF, |
| 395 | FPGA_SPI_INTF, |
| 396 | }; |
| 397 | |
| 398 | /* DSI PHY configuration */ |
| 399 | struct mipi_dsi_phy_ctrl { |
| 400 | uint32_t regulator[5]; |
| 401 | uint32_t timing[12]; |
| 402 | uint32_t ctrl[4]; |
| 403 | uint32_t strength[4]; |
| 404 | uint32_t pll[21]; |
| 405 | }; |
| 406 | |
Nagamalleswararao Ganji | eac5dfa | 2011-07-23 17:31:16 -0700 | [diff] [blame] | 407 | struct mipi_dsi_panel_platform_data { |
Chandan Uddaraju | 83eac3c | 2011-09-11 18:32:23 -0700 | [diff] [blame] | 408 | int fpga_ctrl_mode; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 409 | int fpga_3d_config_addr; |
Nagamalleswararao Ganji | eac5dfa | 2011-07-23 17:31:16 -0700 | [diff] [blame] | 410 | int *gpio; |
Chandan Uddaraju | 83eac3c | 2011-09-11 18:32:23 -0700 | [diff] [blame] | 411 | struct mipi_dsi_phy_ctrl *phy_ctrl_settings; |
Ravishangar Kalyanam | 903f65c | 2012-01-28 21:36:22 -0800 | [diff] [blame] | 412 | char dlane_swap; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 413 | }; |
| 414 | |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 415 | struct lvds_panel_platform_data { |
| 416 | int *gpio; |
| 417 | }; |
| 418 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 419 | struct msm_fb_platform_data { |
| 420 | int (*detect_client)(const char *name); |
| 421 | int mddi_prescan; |
| 422 | int (*allow_set_offset)(void); |
| 423 | }; |
| 424 | |
| 425 | struct msm_hdmi_platform_data { |
| 426 | int irq; |
| 427 | int (*cable_detect)(int insert); |
| 428 | int (*comm_power)(int on, int show); |
| 429 | int (*enable_5v)(int on); |
| 430 | int (*core_power)(int on, int show); |
| 431 | int (*cec_power)(int on); |
| 432 | int (*init_irq)(void); |
| 433 | bool (*check_hdcp_hw_support)(void); |
| 434 | }; |
| 435 | |
| 436 | struct msm_i2c_platform_data { |
| 437 | int clk_freq; |
| 438 | uint32_t rmutex; |
| 439 | const char *rsl_id; |
| 440 | uint32_t pm_lat; |
| 441 | int pri_clk; |
| 442 | int pri_dat; |
| 443 | int aux_clk; |
| 444 | int aux_dat; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 445 | int src_clk_rate; |
| 446 | int use_gsbi_shared_mode; |
| 447 | void (*msm_i2c_config_gpio)(int iface, int config_type); |
| 448 | }; |
| 449 | |
| 450 | struct msm_i2c_ssbi_platform_data { |
| 451 | const char *rsl_id; |
| 452 | enum msm_ssbi_controller_type controller_type; |
| 453 | }; |
| 454 | |
| 455 | struct msm_vidc_platform_data { |
| 456 | int memtype; |
Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 457 | u32 enable_ion; |
Deepika Pepakayala | bebc762 | 2011-12-01 15:13:43 -0800 | [diff] [blame] | 458 | int disable_dmx; |
Rajeshwar Kurapaty | c155c35 | 2011-12-17 06:35:32 +0530 | [diff] [blame] | 459 | int disable_fullhd; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 460 | #ifdef CONFIG_MSM_BUS_SCALING |
| 461 | struct msm_bus_scale_pdata *vidc_bus_client_pdata; |
| 462 | #endif |
| 463 | }; |
| 464 | |
| 465 | #if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE) |
| 466 | struct isp1763_platform_data { |
| 467 | unsigned reset_gpio; |
| 468 | int (*setup_gpio)(int enable); |
| 469 | }; |
| 470 | #endif |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 471 | /* common init routines for use by arch/arm/mach-msm/board-*.c */ |
| 472 | |
Sathish Ambley | c58afc2 | 2011-10-09 21:55:39 -0700 | [diff] [blame] | 473 | #ifdef CONFIG_OF_DEVICE |
| 474 | void msm_copper_init(struct of_dev_auxdata **); |
| 475 | #endif |
Stepan Moskovchenko | b3e6386 | 2011-10-20 18:36:55 -0700 | [diff] [blame] | 476 | void msm_add_devices(void); |
Sathish Ambley | c58afc2 | 2011-10-09 21:55:39 -0700 | [diff] [blame] | 477 | void msm_copper_add_devices(void); |
Stepan Moskovchenko | b3e6386 | 2011-10-20 18:36:55 -0700 | [diff] [blame] | 478 | void msm_map_common_io(void); |
| 479 | void msm_map_qsd8x50_io(void); |
| 480 | void msm_map_msm8x60_io(void); |
| 481 | void msm_map_msm8960_io(void); |
| 482 | void msm_map_msm8930_io(void); |
| 483 | void msm_map_apq8064_io(void); |
| 484 | void msm_map_msm7x30_io(void); |
| 485 | void msm_map_fsm9xxx_io(void); |
Sathish Ambley | c58afc2 | 2011-10-09 21:55:39 -0700 | [diff] [blame] | 486 | void msm_map_copper_io(void); |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 487 | void msm_map_msm8625_io(void); |
Stepan Moskovchenko | b3e6386 | 2011-10-20 18:36:55 -0700 | [diff] [blame] | 488 | void msm_init_irq(void); |
Sathish Ambley | c58afc2 | 2011-10-09 21:55:39 -0700 | [diff] [blame] | 489 | void msm_copper_init_irq(void); |
Taniya Das | 86e0e13 | 2011-10-19 11:32:00 +0530 | [diff] [blame] | 490 | void vic_handle_irq(struct pt_regs *regs); |
Olav Haugan | b800c8c | 2012-01-30 08:50:45 -0800 | [diff] [blame] | 491 | void msm_copper_reserve(void); |
| 492 | void msm_copper_very_early(void); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 493 | |
| 494 | struct mmc_platform_data; |
Stepan Moskovchenko | b3e6386 | 2011-10-20 18:36:55 -0700 | [diff] [blame] | 495 | int msm_add_sdcc(unsigned int controller, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 496 | struct mmc_platform_data *plat); |
| 497 | |
| 498 | struct msm_usb_host_platform_data; |
Stepan Moskovchenko | b3e6386 | 2011-10-20 18:36:55 -0700 | [diff] [blame] | 499 | int msm_add_host(unsigned int host, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 500 | struct msm_usb_host_platform_data *plat); |
| 501 | #if defined(CONFIG_USB_FUNCTION_MSM_HSUSB) \ |
| 502 | || defined(CONFIG_USB_MSM_72K) || defined(CONFIG_USB_MSM_72K_MODULE) |
| 503 | void msm_hsusb_set_vbus_state(int online); |
| 504 | #else |
| 505 | static inline void msm_hsusb_set_vbus_state(int online) {} |
| 506 | #endif |
| 507 | |
Stepan Moskovchenko | b3e6386 | 2011-10-20 18:36:55 -0700 | [diff] [blame] | 508 | void msm_snddev_init(void); |
| 509 | void msm_snddev_init_timpani(void); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 510 | void msm_snddev_poweramp_on(void); |
| 511 | void msm_snddev_poweramp_off(void); |
| 512 | void msm_snddev_hsed_voltage_on(void); |
| 513 | void msm_snddev_hsed_voltage_off(void); |
| 514 | void msm_snddev_tx_route_config(void); |
| 515 | void msm_snddev_tx_route_deconfig(void); |
| 516 | |
| 517 | extern unsigned int msm_shared_ram_phys; /* defined in arch/arm/mach-msm/io.c */ |
| 518 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 519 | |
| 520 | #endif |