blob: 5e2eaf18cac42c8031c86ea30f27c9e78a26ace7 [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/* arch/arm/mach-msm/include/mach/board.h
2 *
3 * Copyright (C) 2007 Google, Inc.
Nagamalleswararao Ganji70fac1e2011-12-29 19:06:37 -08004 * Copyright (c) 2008-2012, Code Aurora Forum. All rights reserved.
Russell Kinga09e64f2008-08-05 16:14:15 +01005 * 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 Huntsman3f2bc4d2011-08-16 17:27:22 -070022#include <linux/input.h>
23#include <linux/usb.h>
24#include <linux/leds-pmic8058.h>
25#include <linux/clkdev.h>
Sathish Ambleyc58afc22011-10-09 21:55:39 -070026#include <linux/of_platform.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070027#include <linux/msm_ssbi.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070028#include <mach/msm_bus.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010029
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070030struct 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
48struct msm_camera_io_clk {
49 uint32_t mclk_clk_rate;
50 uint32_t vfe_clk_rate;
51};
52
Nishant Pandit474f2252011-07-23 23:17:56 +053053struct msm_cam_expander_info {
54 struct i2c_board_info const *board_info;
55 int bus_id;
56};
57
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070058struct 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 Vankadara8df2c752012-01-18 00:18:03 +053064 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 Huntsman3f2bc4d2011-08-16 17:27:22 -070069 struct msm_bus_scale_pdata *cam_bus_scale_table;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070070};
71enum msm_camera_csi_data_format {
72 CSI_8BIT,
73 CSI_10BIT,
74 CSI_12BIT,
75};
76struct 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
85struct 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 Pandit474f2252011-07-23 23:17:56 +0530100#define MSM_CAMERA_FLASH_SRC_EXT (0x00000001<<3)
Taniya Das7a22cdd2011-09-08 14:57:00 +0530101#define MSM_CAMERA_FLASH_SRC_LED (0x00000001<<3)
Raju P.L.S.S.S.Nbf3faff2012-04-05 14:33:36 +0530102#define MSM_CAMERA_FLASH_SRC_LED1 (0x00000001<<4)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700103
104struct msm_camera_sensor_flash_pmic {
105 uint8_t num_of_src;
106 uint32_t low_current;
107 uint32_t high_current;
108 enum pmic8058_leds led_src_1;
109 enum pmic8058_leds led_src_2;
110 int (*pmic_set_current)(enum pmic8058_leds id, unsigned mA);
111};
112
113struct msm_camera_sensor_flash_pwm {
114 uint32_t freq;
115 uint32_t max_load;
116 uint32_t low_load;
117 uint32_t high_load;
118 uint32_t channel;
119};
120
121struct pmic8058_leds_platform_data;
122struct msm_camera_sensor_flash_current_driver {
123 uint32_t low_current;
124 uint32_t high_current;
125 const struct pmic8058_leds_platform_data *driver_channel;
Nishant Pandit474f2252011-07-23 23:17:56 +0530126};
127
Jeyaprakash Soundrapandian85099fe2012-05-15 17:09:51 -0700128enum msm_camera_ext_led_flash_id {
129 MAM_CAMERA_EXT_LED_FLASH_SC628A,
130 MAM_CAMERA_EXT_LED_FLASH_TPS61310,
131};
132
Nishant Pandit474f2252011-07-23 23:17:56 +0530133struct msm_camera_sensor_flash_external {
134 uint32_t led_en;
135 uint32_t led_flash_en;
Jeyaprakash Soundrapandian85099fe2012-05-15 17:09:51 -0700136 enum msm_camera_ext_led_flash_id flash_id;
Nishant Pandit474f2252011-07-23 23:17:56 +0530137 struct msm_cam_expander_info *expander_info;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700138};
139
Taniya Das7a22cdd2011-09-08 14:57:00 +0530140struct msm_camera_sensor_flash_led {
141 const char *led_name;
142 const int led_name_len;
143};
144
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700145struct msm_camera_sensor_flash_src {
146 int flash_sr_type;
147
148 union {
149 struct msm_camera_sensor_flash_pmic pmic_src;
150 struct msm_camera_sensor_flash_pwm pwm_src;
151 struct msm_camera_sensor_flash_current_driver
152 current_driver_src;
Nishant Pandit474f2252011-07-23 23:17:56 +0530153 struct msm_camera_sensor_flash_external
154 ext_driver_src;
Taniya Das7a22cdd2011-09-08 14:57:00 +0530155 struct msm_camera_sensor_flash_led led_src;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700156 } _fsrc;
157};
158
159struct msm_camera_sensor_flash_data {
160 int flash_type;
161 struct msm_camera_sensor_flash_src *flash_src;
162};
163
164struct msm_camera_sensor_strobe_flash_data {
165 uint8_t flash_trigger;
166 uint8_t flash_charge; /* pin for charge */
167 uint8_t flash_charge_done;
168 uint32_t flash_recharge_duration;
169 uint32_t irq;
170 spinlock_t spin_lock;
171 spinlock_t timer_lock;
172 int state;
173};
174
Nishant Pandit24153d82011-08-27 16:05:13 +0530175enum msm_camera_type {
176 BACK_CAMERA_2D,
177 FRONT_CAMERA_2D,
178 BACK_CAMERA_3D,
179 BACK_CAMERA_INT_3D,
180};
181
Raju P.L.S.S.S.N3f4b3022012-03-29 10:09:01 +0530182enum msm_sensor_type {
183 BAYER_SENSOR,
184 YUV_SENSOR,
185};
186
Kevin Chaneb6b6072012-01-17 11:54:54 -0800187enum camera_vreg_type {
188 REG_LDO,
189 REG_VS,
Kevin Chan8b0d2322011-09-10 21:06:31 -0700190};
191
Kevin Chaneb6b6072012-01-17 11:54:54 -0800192struct camera_vreg_t {
193 char *reg_name;
194 enum camera_vreg_type type;
195 int min_voltage;
196 int max_voltage;
197 int op_mode;
198};
199
200struct msm_gpio_set_tbl {
201 unsigned gpio;
202 unsigned long flags;
203 uint32_t delay;
Nishant Pandit24153d82011-08-27 16:05:13 +0530204};
205
Hody Hung9ba65cf2012-01-17 17:34:51 -0800206struct msm_camera_csi_lane_params {
207 uint8_t csi_lane_assign;
208 uint8_t csi_lane_mask;
209};
210
Nishant Pandit24153d82011-08-27 16:05:13 +0530211struct msm_camera_gpio_conf {
212 void *cam_gpiomux_conf_tbl;
213 uint8_t cam_gpiomux_conf_tbl_size;
Kevin Chaneb6b6072012-01-17 11:54:54 -0800214 struct gpio *cam_gpio_common_tbl;
215 uint8_t cam_gpio_common_tbl_size;
216 struct gpio *cam_gpio_req_tbl;
217 uint8_t cam_gpio_req_tbl_size;
218 struct msm_gpio_set_tbl *cam_gpio_set_tbl;
219 uint8_t cam_gpio_set_tbl_size;
Sandeep Kodimelac6f78672012-03-07 10:44:04 +0530220 uint32_t gpio_no_mux;
221 uint32_t *camera_off_table;
222 uint8_t camera_off_table_size;
223 uint32_t *camera_on_table;
224 uint8_t camera_on_table_size;
Kevin Chaneb6b6072012-01-17 11:54:54 -0800225};
226
Kevin Chanbb8ef862012-02-14 13:03:04 -0800227enum msm_camera_i2c_mux_mode {
228 MODE_R,
229 MODE_L,
230 MODE_DUAL
231};
232
233struct msm_camera_i2c_conf {
234 uint8_t use_i2c_mux;
235 struct platform_device *mux_dev;
236 enum msm_camera_i2c_mux_mode i2c_mux_mode;
237};
238
Kevin Chaneb6b6072012-01-17 11:54:54 -0800239struct msm_camera_sensor_platform_info {
240 int mount_angle;
241 int sensor_reset;
242 struct camera_vreg_t *cam_vreg;
243 int num_vreg;
244 int32_t (*ext_power_ctrl) (int enable);
245 struct msm_camera_gpio_conf *gpio_conf;
Kevin Chanbb8ef862012-02-14 13:03:04 -0800246 struct msm_camera_i2c_conf *i2c_conf;
Hody Hung9ba65cf2012-01-17 17:34:51 -0800247 struct msm_camera_csi_lane_params *csi_lane_params;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700248};
249
Rajakumar Govindaram6627b362012-01-29 19:00:30 -0800250enum msm_camera_actuator_name {
251 MSM_ACTUATOR_MAIN_CAM_0,
252 MSM_ACTUATOR_MAIN_CAM_1,
253 MSM_ACTUATOR_MAIN_CAM_2,
254 MSM_ACTUATOR_MAIN_CAM_3,
255 MSM_ACTUATOR_MAIN_CAM_4,
256 MSM_ACTUATOR_MAIN_CAM_5,
257 MSM_ACTUATOR_WEB_CAM_0,
258 MSM_ACTUATOR_WEB_CAM_1,
259 MSM_ACTUATOR_WEB_CAM_2,
260};
261
Sreesudhan Ramakrish Ramkumara4b5f302011-09-12 16:23:22 -0700262struct msm_actuator_info {
263 struct i2c_board_info const *board_info;
Rajakumar Govindaram6627b362012-01-29 19:00:30 -0800264 enum msm_camera_actuator_name cam_name;
Sreesudhan Ramakrish Ramkumara4b5f302011-09-12 16:23:22 -0700265 int bus_id;
266 int vcm_pwd;
267 int vcm_enable;
268};
269
Jeyaprakash Soundrapandian734476b2012-05-03 20:08:15 -0700270struct msm_eeprom_info {
271 struct i2c_board_info const *board_info;
272 int bus_id;
273};
274
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700275struct msm_camera_sensor_info {
276 const char *sensor_name;
277 int sensor_reset_enable;
278 int sensor_reset;
279 int sensor_pwd;
280 int vcm_pwd;
281 int vcm_enable;
282 int mclk;
283 int flash_type;
284 struct msm_camera_sensor_platform_info *sensor_platform_info;
285 struct msm_camera_device_platform_data *pdata;
286 struct resource *resource;
287 uint8_t num_resources;
288 struct msm_camera_sensor_flash_data *flash_data;
289 int csi_if;
290 struct msm_camera_csi_params csi_params;
291 struct msm_camera_sensor_strobe_flash_data *strobe_flash_data;
292 char *eeprom_data;
Nishant Pandit24153d82011-08-27 16:05:13 +0530293 enum msm_camera_type camera_type;
Raju P.L.S.S.S.N3f4b3022012-03-29 10:09:01 +0530294 enum msm_sensor_type sensor_type;
Sreesudhan Ramakrish Ramkumara4b5f302011-09-12 16:23:22 -0700295 struct msm_actuator_info *actuator_info;
Su Liuaca04702012-02-14 02:27:32 +0530296 int pmic_gpio_enable;
Raju P.L.S.S.S.Nce5c5c22012-05-17 23:10:08 +0530297 int (*sensor_lcd_gpio_onoff)(int on);
Jeyaprakash Soundrapandian734476b2012-05-03 20:08:15 -0700298 struct msm_eeprom_info *eeprom_info;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700299};
300
Kevin Chan09f4e662011-12-16 08:17:02 -0800301struct msm_camera_board_info {
302 struct i2c_board_info *board_info;
303 uint8_t num_i2c_board_info;
304};
305
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700306int msm_get_cam_resources(struct msm_camera_sensor_info *);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700307
Stephen Boydbd323442011-02-23 09:37:42 -0800308struct clk_lookup;
Daniel Walker5e96da52010-05-12 13:43:28 -0700309
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700310struct snd_endpoint {
311 int id;
312 const char *name;
313};
Steve Mucklea55df6e2010-01-07 12:43:24 -0800314
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700315struct msm_snd_endpoints {
316 struct snd_endpoint *endpoints;
317 unsigned num;
318};
319
320#define MSM_MAX_DEC_CNT 14
321/* 7k target ADSP information */
322/* Bit 23:0, for codec identification like mp3, wav etc *
323 * Bit 27:24, for mode identification like tunnel, non tunnel*
324 * bit 31:28, for operation support like DM, DMA */
325enum msm_adspdec_concurrency {
326 MSM_ADSP_CODEC_WAV = 0,
327 MSM_ADSP_CODEC_ADPCM = 1,
328 MSM_ADSP_CODEC_MP3 = 2,
329 MSM_ADSP_CODEC_REALAUDIO = 3,
330 MSM_ADSP_CODEC_WMA = 4,
331 MSM_ADSP_CODEC_AAC = 5,
332 MSM_ADSP_CODEC_RESERVED = 6,
333 MSM_ADSP_CODEC_MIDI = 7,
334 MSM_ADSP_CODEC_YADPCM = 8,
335 MSM_ADSP_CODEC_QCELP = 9,
336 MSM_ADSP_CODEC_AMRNB = 10,
337 MSM_ADSP_CODEC_AMRWB = 11,
338 MSM_ADSP_CODEC_EVRC = 12,
339 MSM_ADSP_CODEC_WMAPRO = 13,
340 MSM_ADSP_MODE_TUNNEL = 24,
341 MSM_ADSP_MODE_NONTUNNEL = 25,
342 MSM_ADSP_MODE_LP = 26,
343 MSM_ADSP_OP_DMA = 28,
344 MSM_ADSP_OP_DM = 29,
345};
346
347struct msm_adspdec_info {
348 const char *module_name;
349 unsigned module_queueid;
350 int module_decid; /* objid */
351 unsigned nr_codec_support;
352};
353
354/* Carries information about number codec
355 * supported if same codec or different codecs
356 */
357struct dec_instance_table {
358 uint8_t max_instances_same_dec;
359 uint8_t max_instances_diff_dec;
360};
361
362struct msm_adspdec_database {
363 unsigned num_dec;
364 unsigned num_concurrency_support;
365 unsigned int *dec_concurrency_table; /* Bit masked entry to *
366 * represents codec, mode etc */
367 struct msm_adspdec_info *dec_info_list;
368 struct dec_instance_table *dec_instance_list;
369};
370
371enum msm_mdp_hw_revision {
372 MDP_REV_20 = 1,
373 MDP_REV_22,
374 MDP_REV_30,
375 MDP_REV_303,
376 MDP_REV_31,
377 MDP_REV_40,
378 MDP_REV_41,
379 MDP_REV_42,
Huaibin Yang4a084e32011-12-15 15:25:52 -0800380 MDP_REV_43,
381 MDP_REV_44,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700382};
383
384struct msm_panel_common_pdata {
385 uintptr_t hw_revision_addr;
386 int gpio;
Padmanabhan Komandurubea9c062012-04-09 10:33:48 +0530387 bool bl_lock;
Padmanabhan Komanduru0f0000a2012-04-12 10:23:02 +0530388 spinlock_t bl_spinlock;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700389 int (*backlight_level)(int level, int max, int min);
390 int (*pmic_backlight)(int level);
Jeevan Shriram8f7c96d2012-05-15 12:42:57 +0530391 int (*rotate_panel)(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700392 int (*panel_num)(void);
393 void (*panel_config_gpio)(int);
394 int (*vga_switch)(int select_vga);
395 int *gpio_num;
396 int mdp_core_clk_rate;
397 unsigned num_mdp_clk;
398 int *mdp_core_clk_table;
399#ifdef CONFIG_MSM_BUS_SCALING
400 struct msm_bus_scale_pdata *mdp_bus_scale_table;
401#endif
402 int mdp_rev;
Nagamalleswararao Ganji937a1192011-12-07 19:00:52 -0800403 u32 ov0_wb_size; /* overlay0 writeback size */
404 u32 ov1_wb_size; /* overlay1 writeback size */
405 u32 mem_hid;
Chandan Uddaraju2679f092012-03-09 15:48:04 -0800406 char cont_splash_enabled;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700407};
408
Huaibin Yanga5419422011-12-08 23:52:10 -0800409
410
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700411struct lcdc_platform_data {
412 int (*lcdc_gpio_config)(int on);
413 int (*lcdc_power_save)(int);
414 unsigned int (*lcdc_get_clk)(void);
415#ifdef CONFIG_MSM_BUS_SCALING
416 struct msm_bus_scale_pdata *bus_scale_table;
417#endif
Huaibin Yang02f981c2012-02-27 16:58:41 -0800418 int (*lvds_pixel_remap)(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700419};
420
421struct tvenc_platform_data {
422 int poll;
423 int (*pm_vid_en)(int on);
424#ifdef CONFIG_MSM_BUS_SCALING
425 struct msm_bus_scale_pdata *bus_scale_table;
426#endif
427};
428
429struct mddi_platform_data {
430 int (*mddi_power_save)(int on);
431 int (*mddi_sel_clk)(u32 *clk_rate);
432 int (*mddi_client_power)(u32 client_id);
433};
434
435struct mipi_dsi_platform_data {
436 int vsync_gpio;
437 int (*dsi_power_save)(int on);
438 int (*dsi_client_reset)(void);
439 int (*get_lane_config)(void);
Ravishangar Kalyanam87dd72e2012-04-16 19:07:36 -0700440 char (*splash_is_enabled)(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700441 int target_type;
442};
443
Chandan Uddaraju83eac3c2011-09-11 18:32:23 -0700444enum mipi_dsi_3d_ctrl {
445 FPGA_EBI2_INTF,
446 FPGA_SPI_INTF,
447};
448
449/* DSI PHY configuration */
450struct mipi_dsi_phy_ctrl {
451 uint32_t regulator[5];
452 uint32_t timing[12];
453 uint32_t ctrl[4];
454 uint32_t strength[4];
455 uint32_t pll[21];
456};
457
Nagamalleswararao Ganjieac5dfa2011-07-23 17:31:16 -0700458struct mipi_dsi_panel_platform_data {
Chandan Uddaraju83eac3c2011-09-11 18:32:23 -0700459 int fpga_ctrl_mode;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700460 int fpga_3d_config_addr;
Nagamalleswararao Ganjieac5dfa2011-07-23 17:31:16 -0700461 int *gpio;
Chandan Uddaraju83eac3c2011-09-11 18:32:23 -0700462 struct mipi_dsi_phy_ctrl *phy_ctrl_settings;
Ravishangar Kalyanam903f65c2012-01-28 21:36:22 -0800463 char dlane_swap;
Chandan Uddaraju2679f092012-03-09 15:48:04 -0800464 void (*dsi_pwm_cfg)(void);
Chandan Uddaraju194a4b52012-03-21 10:11:18 -0700465 char enable_wled_bl_ctrl;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700466};
467
Ravishangar Kalyanamc2fee312012-02-09 19:11:22 -0800468struct lvds_panel_platform_data {
469 int *gpio;
470};
471
Ravishangar Kalyanam8c79ead2011-12-02 21:05:01 -0800472#define PANEL_NAME_MAX_LEN 50
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700473struct msm_fb_platform_data {
474 int (*detect_client)(const char *name);
475 int mddi_prescan;
476 int (*allow_set_offset)(void);
Ravishangar Kalyanam8c79ead2011-12-02 21:05:01 -0800477 char prim_panel_name[PANEL_NAME_MAX_LEN];
478 char ext_panel_name[PANEL_NAME_MAX_LEN];
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700479};
480
481struct msm_hdmi_platform_data {
482 int irq;
483 int (*cable_detect)(int insert);
484 int (*comm_power)(int on, int show);
485 int (*enable_5v)(int on);
486 int (*core_power)(int on, int show);
487 int (*cec_power)(int on);
488 int (*init_irq)(void);
489 bool (*check_hdcp_hw_support)(void);
490};
491
Manoj Rao14648742012-03-30 19:42:12 -0700492struct msm_mhl_platform_data {
493 int irq;
494 int (*gpio_setup)(int on);
495 void (*reset_pin)(int on);
496};
497
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700498struct msm_i2c_platform_data {
499 int clk_freq;
500 uint32_t rmutex;
501 const char *rsl_id;
502 uint32_t pm_lat;
503 int pri_clk;
504 int pri_dat;
505 int aux_clk;
506 int aux_dat;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700507 int src_clk_rate;
508 int use_gsbi_shared_mode;
509 void (*msm_i2c_config_gpio)(int iface, int config_type);
510};
511
512struct msm_i2c_ssbi_platform_data {
513 const char *rsl_id;
514 enum msm_ssbi_controller_type controller_type;
515};
516
517struct msm_vidc_platform_data {
518 int memtype;
Deepak Koturcb4f6722011-10-31 14:06:57 -0700519 u32 enable_ion;
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800520 int disable_dmx;
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +0530521 int disable_fullhd;
Deepak kotur5f10b272012-03-15 22:01:39 -0700522 u32 cp_enabled;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700523#ifdef CONFIG_MSM_BUS_SCALING
524 struct msm_bus_scale_pdata *vidc_bus_client_pdata;
525#endif
Mohan Kumar Gubbihalli Lachma Naiked9dc912012-03-01 19:11:14 -0800526 int cont_mode_dpb_count;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700527};
528
Terence Hampsona6914ca2012-04-09 14:06:50 -0400529struct vcap_platform_data {
530 unsigned *gpios;
531 int num_gpios;
532 struct msm_bus_scale_pdata *bus_client_pdata;
533};
534
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700535#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
536struct isp1763_platform_data {
537 unsigned reset_gpio;
538 int (*setup_gpio)(int enable);
539};
540#endif
Russell Kinga09e64f2008-08-05 16:14:15 +0100541/* common init routines for use by arch/arm/mach-msm/board-*.c */
542
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700543#ifdef CONFIG_OF_DEVICE
544void msm_copper_init(struct of_dev_auxdata **);
545#endif
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700546void msm_add_devices(void);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700547void msm_copper_add_devices(void);
Michael Bohane7c2b472012-03-30 14:27:18 -0700548void msm_copper_add_drivers(void);
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700549void msm_map_common_io(void);
550void msm_map_qsd8x50_io(void);
551void msm_map_msm8x60_io(void);
552void msm_map_msm8960_io(void);
553void msm_map_msm8930_io(void);
554void msm_map_apq8064_io(void);
555void msm_map_msm7x30_io(void);
556void msm_map_fsm9xxx_io(void);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700557void msm_map_copper_io(void);
Taniya Das43bcdd62011-12-02 17:33:27 +0530558void msm_map_msm8625_io(void);
Rohit Vaswani3fc60342012-04-23 18:55:15 -0700559void msm_map_msm9625_io(void);
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700560void msm_init_irq(void);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700561void msm_copper_init_irq(void);
Taniya Das86e0e132011-10-19 11:32:00 +0530562void vic_handle_irq(struct pt_regs *regs);
Olav Hauganb800c8c2012-01-30 08:50:45 -0800563void msm_copper_reserve(void);
564void msm_copper_very_early(void);
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700565void msm_copper_init_gpiomux(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700566
567struct mmc_platform_data;
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700568int msm_add_sdcc(unsigned int controller,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700569 struct mmc_platform_data *plat);
570
Murali Nalajala2a0bbda2012-03-28 12:12:54 +0530571void msm_pm_register_irqs(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700572struct msm_usb_host_platform_data;
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700573int msm_add_host(unsigned int host,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700574 struct msm_usb_host_platform_data *plat);
575#if defined(CONFIG_USB_FUNCTION_MSM_HSUSB) \
576 || defined(CONFIG_USB_MSM_72K) || defined(CONFIG_USB_MSM_72K_MODULE)
577void msm_hsusb_set_vbus_state(int online);
578#else
579static inline void msm_hsusb_set_vbus_state(int online) {}
580#endif
581
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700582void msm_snddev_init(void);
583void msm_snddev_init_timpani(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700584void msm_snddev_poweramp_on(void);
585void msm_snddev_poweramp_off(void);
586void msm_snddev_hsed_voltage_on(void);
587void msm_snddev_hsed_voltage_off(void);
588void msm_snddev_tx_route_config(void);
589void msm_snddev_tx_route_deconfig(void);
590
591extern unsigned int msm_shared_ram_phys; /* defined in arch/arm/mach-msm/io.c */
592
Russell Kinga09e64f2008-08-05 16:14:15 +0100593
594#endif