blob: 84f9204402f843522bd8c49e2e8916076fb867a3 [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_vpe;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070065 struct msm_bus_scale_pdata *cam_bus_scale_table;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070066};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070067
68#ifdef CONFIG_SENSORS_MT9T013
69struct msm_camera_legacy_device_platform_data {
70 int sensor_reset;
71 int sensor_pwd;
72 int vcm_pwd;
73 void (*config_gpio_on) (void);
74 void (*config_gpio_off)(void);
75};
76#endif
77
78#define MSM_CAMERA_FLASH_NONE 0
79#define MSM_CAMERA_FLASH_LED 1
80
81#define MSM_CAMERA_FLASH_SRC_PMIC (0x00000001<<0)
82#define MSM_CAMERA_FLASH_SRC_PWM (0x00000001<<1)
83#define MSM_CAMERA_FLASH_SRC_CURRENT_DRIVER (0x00000001<<2)
Nishant Pandit474f2252011-07-23 23:17:56 +053084#define MSM_CAMERA_FLASH_SRC_EXT (0x00000001<<3)
Taniya Das7a22cdd2011-09-08 14:57:00 +053085#define MSM_CAMERA_FLASH_SRC_LED (0x00000001<<3)
Raju P.L.S.S.S.Nbf3faff2012-04-05 14:33:36 +053086#define MSM_CAMERA_FLASH_SRC_LED1 (0x00000001<<4)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070087
88struct msm_camera_sensor_flash_pmic {
89 uint8_t num_of_src;
90 uint32_t low_current;
91 uint32_t high_current;
92 enum pmic8058_leds led_src_1;
93 enum pmic8058_leds led_src_2;
94 int (*pmic_set_current)(enum pmic8058_leds id, unsigned mA);
95};
96
97struct msm_camera_sensor_flash_pwm {
98 uint32_t freq;
99 uint32_t max_load;
100 uint32_t low_load;
101 uint32_t high_load;
102 uint32_t channel;
103};
104
105struct pmic8058_leds_platform_data;
106struct msm_camera_sensor_flash_current_driver {
107 uint32_t low_current;
108 uint32_t high_current;
109 const struct pmic8058_leds_platform_data *driver_channel;
Nishant Pandit474f2252011-07-23 23:17:56 +0530110};
111
Jeyaprakash Soundrapandian85099fe2012-05-15 17:09:51 -0700112enum msm_camera_ext_led_flash_id {
113 MAM_CAMERA_EXT_LED_FLASH_SC628A,
114 MAM_CAMERA_EXT_LED_FLASH_TPS61310,
115};
116
Nishant Pandit474f2252011-07-23 23:17:56 +0530117struct msm_camera_sensor_flash_external {
118 uint32_t led_en;
119 uint32_t led_flash_en;
Jeyaprakash Soundrapandian85099fe2012-05-15 17:09:51 -0700120 enum msm_camera_ext_led_flash_id flash_id;
Nishant Pandit474f2252011-07-23 23:17:56 +0530121 struct msm_cam_expander_info *expander_info;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700122};
123
Taniya Das7a22cdd2011-09-08 14:57:00 +0530124struct msm_camera_sensor_flash_led {
125 const char *led_name;
126 const int led_name_len;
127};
128
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700129struct msm_camera_sensor_flash_src {
130 int flash_sr_type;
131
132 union {
133 struct msm_camera_sensor_flash_pmic pmic_src;
134 struct msm_camera_sensor_flash_pwm pwm_src;
135 struct msm_camera_sensor_flash_current_driver
136 current_driver_src;
Nishant Pandit474f2252011-07-23 23:17:56 +0530137 struct msm_camera_sensor_flash_external
138 ext_driver_src;
Taniya Das7a22cdd2011-09-08 14:57:00 +0530139 struct msm_camera_sensor_flash_led led_src;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700140 } _fsrc;
141};
142
143struct msm_camera_sensor_flash_data {
144 int flash_type;
145 struct msm_camera_sensor_flash_src *flash_src;
146};
147
148struct msm_camera_sensor_strobe_flash_data {
149 uint8_t flash_trigger;
150 uint8_t flash_charge; /* pin for charge */
151 uint8_t flash_charge_done;
152 uint32_t flash_recharge_duration;
153 uint32_t irq;
154 spinlock_t spin_lock;
155 spinlock_t timer_lock;
156 int state;
157};
158
Nishant Pandit24153d82011-08-27 16:05:13 +0530159enum msm_camera_type {
160 BACK_CAMERA_2D,
161 FRONT_CAMERA_2D,
162 BACK_CAMERA_3D,
163 BACK_CAMERA_INT_3D,
164};
165
Raju P.L.S.S.S.N3f4b3022012-03-29 10:09:01 +0530166enum msm_sensor_type {
167 BAYER_SENSOR,
168 YUV_SENSOR,
169};
170
Kevin Chaneb6b6072012-01-17 11:54:54 -0800171enum camera_vreg_type {
172 REG_LDO,
173 REG_VS,
Raju P.L.S.S.S.Naf7e5142012-06-17 20:30:16 +0530174 REG_GPIO,
Sreesudhan Ramakrish Ramkumarc842b612012-05-21 17:23:24 -0700175 REG_MAX
Kevin Chan8b0d2322011-09-10 21:06:31 -0700176};
177
Kevin Chaneb6b6072012-01-17 11:54:54 -0800178struct camera_vreg_t {
Sreesudhan Ramakrish Ramkumarc842b612012-05-21 17:23:24 -0700179 const char *reg_name;
Kevin Chaneb6b6072012-01-17 11:54:54 -0800180 enum camera_vreg_type type;
181 int min_voltage;
182 int max_voltage;
183 int op_mode;
184};
185
186struct msm_gpio_set_tbl {
187 unsigned gpio;
188 unsigned long flags;
189 uint32_t delay;
Nishant Pandit24153d82011-08-27 16:05:13 +0530190};
191
Hody Hung9ba65cf2012-01-17 17:34:51 -0800192struct msm_camera_csi_lane_params {
Hody Hung31ed0272012-06-11 10:22:20 -0700193 uint16_t csi_lane_assign;
194 uint16_t csi_lane_mask;
Hody Hung9ba65cf2012-01-17 17:34:51 -0800195};
196
Nishant Pandit24153d82011-08-27 16:05:13 +0530197struct msm_camera_gpio_conf {
198 void *cam_gpiomux_conf_tbl;
199 uint8_t cam_gpiomux_conf_tbl_size;
Kevin Chaneb6b6072012-01-17 11:54:54 -0800200 struct gpio *cam_gpio_common_tbl;
201 uint8_t cam_gpio_common_tbl_size;
202 struct gpio *cam_gpio_req_tbl;
203 uint8_t cam_gpio_req_tbl_size;
204 struct msm_gpio_set_tbl *cam_gpio_set_tbl;
205 uint8_t cam_gpio_set_tbl_size;
Sandeep Kodimelac6f78672012-03-07 10:44:04 +0530206 uint32_t gpio_no_mux;
207 uint32_t *camera_off_table;
208 uint8_t camera_off_table_size;
209 uint32_t *camera_on_table;
210 uint8_t camera_on_table_size;
Kevin Chaneb6b6072012-01-17 11:54:54 -0800211};
212
Kevin Chanbb8ef862012-02-14 13:03:04 -0800213enum msm_camera_i2c_mux_mode {
214 MODE_R,
215 MODE_L,
216 MODE_DUAL
217};
218
219struct msm_camera_i2c_conf {
220 uint8_t use_i2c_mux;
221 struct platform_device *mux_dev;
222 enum msm_camera_i2c_mux_mode i2c_mux_mode;
223};
224
Kevin Chaneb6b6072012-01-17 11:54:54 -0800225struct msm_camera_sensor_platform_info {
226 int mount_angle;
227 int sensor_reset;
228 struct camera_vreg_t *cam_vreg;
229 int num_vreg;
230 int32_t (*ext_power_ctrl) (int enable);
231 struct msm_camera_gpio_conf *gpio_conf;
Kevin Chanbb8ef862012-02-14 13:03:04 -0800232 struct msm_camera_i2c_conf *i2c_conf;
Hody Hung9ba65cf2012-01-17 17:34:51 -0800233 struct msm_camera_csi_lane_params *csi_lane_params;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700234};
235
Rajakumar Govindaram6627b362012-01-29 19:00:30 -0800236enum msm_camera_actuator_name {
237 MSM_ACTUATOR_MAIN_CAM_0,
238 MSM_ACTUATOR_MAIN_CAM_1,
239 MSM_ACTUATOR_MAIN_CAM_2,
240 MSM_ACTUATOR_MAIN_CAM_3,
241 MSM_ACTUATOR_MAIN_CAM_4,
242 MSM_ACTUATOR_MAIN_CAM_5,
243 MSM_ACTUATOR_WEB_CAM_0,
244 MSM_ACTUATOR_WEB_CAM_1,
245 MSM_ACTUATOR_WEB_CAM_2,
246};
247
Sreesudhan Ramakrish Ramkumara4b5f302011-09-12 16:23:22 -0700248struct msm_actuator_info {
249 struct i2c_board_info const *board_info;
Rajakumar Govindaram6627b362012-01-29 19:00:30 -0800250 enum msm_camera_actuator_name cam_name;
Sreesudhan Ramakrish Ramkumara4b5f302011-09-12 16:23:22 -0700251 int bus_id;
252 int vcm_pwd;
253 int vcm_enable;
254};
255
Jeyaprakash Soundrapandian734476b2012-05-03 20:08:15 -0700256struct msm_eeprom_info {
257 struct i2c_board_info const *board_info;
258 int bus_id;
259};
260
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700261struct msm_camera_sensor_info {
262 const char *sensor_name;
263 int sensor_reset_enable;
264 int sensor_reset;
265 int sensor_pwd;
266 int vcm_pwd;
267 int vcm_enable;
268 int mclk;
269 int flash_type;
270 struct msm_camera_sensor_platform_info *sensor_platform_info;
271 struct msm_camera_device_platform_data *pdata;
272 struct resource *resource;
273 uint8_t num_resources;
274 struct msm_camera_sensor_flash_data *flash_data;
275 int csi_if;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700276 struct msm_camera_sensor_strobe_flash_data *strobe_flash_data;
277 char *eeprom_data;
Nishant Pandit24153d82011-08-27 16:05:13 +0530278 enum msm_camera_type camera_type;
Raju P.L.S.S.S.N3f4b3022012-03-29 10:09:01 +0530279 enum msm_sensor_type sensor_type;
Sreesudhan Ramakrish Ramkumara4b5f302011-09-12 16:23:22 -0700280 struct msm_actuator_info *actuator_info;
Su Liuaca04702012-02-14 02:27:32 +0530281 int pmic_gpio_enable;
Jeyaprakash Soundrapandian734476b2012-05-03 20:08:15 -0700282 struct msm_eeprom_info *eeprom_info;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700283};
284
Kevin Chan09f4e662011-12-16 08:17:02 -0800285struct msm_camera_board_info {
286 struct i2c_board_info *board_info;
287 uint8_t num_i2c_board_info;
288};
289
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700290int msm_get_cam_resources(struct msm_camera_sensor_info *);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700291
Stephen Boydbd323442011-02-23 09:37:42 -0800292struct clk_lookup;
Daniel Walker5e96da52010-05-12 13:43:28 -0700293
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700294struct snd_endpoint {
295 int id;
296 const char *name;
297};
Steve Mucklea55df6e2010-01-07 12:43:24 -0800298
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700299struct msm_snd_endpoints {
300 struct snd_endpoint *endpoints;
301 unsigned num;
302};
303
304#define MSM_MAX_DEC_CNT 14
305/* 7k target ADSP information */
306/* Bit 23:0, for codec identification like mp3, wav etc *
307 * Bit 27:24, for mode identification like tunnel, non tunnel*
308 * bit 31:28, for operation support like DM, DMA */
309enum msm_adspdec_concurrency {
310 MSM_ADSP_CODEC_WAV = 0,
311 MSM_ADSP_CODEC_ADPCM = 1,
312 MSM_ADSP_CODEC_MP3 = 2,
313 MSM_ADSP_CODEC_REALAUDIO = 3,
314 MSM_ADSP_CODEC_WMA = 4,
315 MSM_ADSP_CODEC_AAC = 5,
316 MSM_ADSP_CODEC_RESERVED = 6,
317 MSM_ADSP_CODEC_MIDI = 7,
318 MSM_ADSP_CODEC_YADPCM = 8,
319 MSM_ADSP_CODEC_QCELP = 9,
320 MSM_ADSP_CODEC_AMRNB = 10,
321 MSM_ADSP_CODEC_AMRWB = 11,
322 MSM_ADSP_CODEC_EVRC = 12,
323 MSM_ADSP_CODEC_WMAPRO = 13,
Chaithanya Krishna Bacharaju8e838cc2012-08-16 11:32:46 +0530324 MSM_ADSP_CODEC_AC3 = 23,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700325 MSM_ADSP_MODE_TUNNEL = 24,
326 MSM_ADSP_MODE_NONTUNNEL = 25,
327 MSM_ADSP_MODE_LP = 26,
328 MSM_ADSP_OP_DMA = 28,
329 MSM_ADSP_OP_DM = 29,
330};
331
332struct msm_adspdec_info {
333 const char *module_name;
334 unsigned module_queueid;
335 int module_decid; /* objid */
336 unsigned nr_codec_support;
337};
338
339/* Carries information about number codec
340 * supported if same codec or different codecs
341 */
342struct dec_instance_table {
343 uint8_t max_instances_same_dec;
344 uint8_t max_instances_diff_dec;
345};
346
347struct msm_adspdec_database {
348 unsigned num_dec;
349 unsigned num_concurrency_support;
350 unsigned int *dec_concurrency_table; /* Bit masked entry to *
351 * represents codec, mode etc */
352 struct msm_adspdec_info *dec_info_list;
353 struct dec_instance_table *dec_instance_list;
354};
355
356enum msm_mdp_hw_revision {
357 MDP_REV_20 = 1,
358 MDP_REV_22,
359 MDP_REV_30,
360 MDP_REV_303,
361 MDP_REV_31,
362 MDP_REV_40,
363 MDP_REV_41,
364 MDP_REV_42,
Huaibin Yang4a084e32011-12-15 15:25:52 -0800365 MDP_REV_43,
366 MDP_REV_44,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700367};
368
369struct msm_panel_common_pdata {
370 uintptr_t hw_revision_addr;
371 int gpio;
Padmanabhan Komandurubea9c062012-04-09 10:33:48 +0530372 bool bl_lock;
Padmanabhan Komanduru0f0000a2012-04-12 10:23:02 +0530373 spinlock_t bl_spinlock;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700374 int (*backlight_level)(int level, int max, int min);
375 int (*pmic_backlight)(int level);
Jeevan Shriram8f7c96d2012-05-15 12:42:57 +0530376 int (*rotate_panel)(void);
Padmanabhan Komandurucc913992012-05-09 14:57:28 +0530377 int (*backlight) (int level, int mode);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700378 int (*panel_num)(void);
379 void (*panel_config_gpio)(int);
380 int (*vga_switch)(int select_vga);
381 int *gpio_num;
Siddhartha Agrawal496f9282012-08-15 17:41:34 -0700382 u32 mdp_max_clk;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700383#ifdef CONFIG_MSM_BUS_SCALING
384 struct msm_bus_scale_pdata *mdp_bus_scale_table;
385#endif
386 int mdp_rev;
Nagamalleswararao Ganji937a1192011-12-07 19:00:52 -0800387 u32 ov0_wb_size; /* overlay0 writeback size */
388 u32 ov1_wb_size; /* overlay1 writeback size */
389 u32 mem_hid;
Chandan Uddaraju2679f092012-03-09 15:48:04 -0800390 char cont_splash_enabled;
Olav Hauganef95ae32012-05-15 09:50:30 -0700391 char mdp_iommu_split_domain;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700392};
393
Huaibin Yanga5419422011-12-08 23:52:10 -0800394
395
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700396struct lcdc_platform_data {
397 int (*lcdc_gpio_config)(int on);
398 int (*lcdc_power_save)(int);
399 unsigned int (*lcdc_get_clk)(void);
400#ifdef CONFIG_MSM_BUS_SCALING
401 struct msm_bus_scale_pdata *bus_scale_table;
402#endif
Huaibin Yang02f981c2012-02-27 16:58:41 -0800403 int (*lvds_pixel_remap)(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700404};
405
406struct tvenc_platform_data {
407 int poll;
408 int (*pm_vid_en)(int on);
409#ifdef CONFIG_MSM_BUS_SCALING
410 struct msm_bus_scale_pdata *bus_scale_table;
411#endif
412};
413
414struct mddi_platform_data {
415 int (*mddi_power_save)(int on);
416 int (*mddi_sel_clk)(u32 *clk_rate);
417 int (*mddi_client_power)(u32 client_id);
418};
419
420struct mipi_dsi_platform_data {
421 int vsync_gpio;
422 int (*dsi_power_save)(int on);
423 int (*dsi_client_reset)(void);
424 int (*get_lane_config)(void);
Ravishangar Kalyanam87dd72e2012-04-16 19:07:36 -0700425 char (*splash_is_enabled)(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700426 int target_type;
427};
428
Chandan Uddaraju83eac3c2011-09-11 18:32:23 -0700429enum mipi_dsi_3d_ctrl {
430 FPGA_EBI2_INTF,
431 FPGA_SPI_INTF,
432};
433
434/* DSI PHY configuration */
435struct mipi_dsi_phy_ctrl {
436 uint32_t regulator[5];
437 uint32_t timing[12];
438 uint32_t ctrl[4];
439 uint32_t strength[4];
440 uint32_t pll[21];
441};
442
Nagamalleswararao Ganjieac5dfa2011-07-23 17:31:16 -0700443struct mipi_dsi_panel_platform_data {
Chandan Uddaraju83eac3c2011-09-11 18:32:23 -0700444 int fpga_ctrl_mode;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700445 int fpga_3d_config_addr;
Nagamalleswararao Ganjieac5dfa2011-07-23 17:31:16 -0700446 int *gpio;
Chandan Uddaraju83eac3c2011-09-11 18:32:23 -0700447 struct mipi_dsi_phy_ctrl *phy_ctrl_settings;
Ravishangar Kalyanam903f65c2012-01-28 21:36:22 -0800448 char dlane_swap;
Chandan Uddaraju2679f092012-03-09 15:48:04 -0800449 void (*dsi_pwm_cfg)(void);
Chandan Uddaraju194a4b52012-03-21 10:11:18 -0700450 char enable_wled_bl_ctrl;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700451};
452
Ravishangar Kalyanamc2fee312012-02-09 19:11:22 -0800453struct lvds_panel_platform_data {
454 int *gpio;
455};
456
Olav Hauganef95ae32012-05-15 09:50:30 -0700457struct msm_wfd_platform_data {
458 char (*wfd_check_mdp_iommu_split)(void);
459};
460
Ravishangar Kalyanam8c79ead2011-12-02 21:05:01 -0800461#define PANEL_NAME_MAX_LEN 50
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700462struct msm_fb_platform_data {
463 int (*detect_client)(const char *name);
464 int mddi_prescan;
Ajay Singh Parmar6b82d2b2012-07-19 17:23:26 +0530465 unsigned char ext_resolution;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700466 int (*allow_set_offset)(void);
Ravishangar Kalyanam8c79ead2011-12-02 21:05:01 -0800467 char prim_panel_name[PANEL_NAME_MAX_LEN];
468 char ext_panel_name[PANEL_NAME_MAX_LEN];
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700469};
470
471struct msm_hdmi_platform_data {
472 int irq;
473 int (*cable_detect)(int insert);
474 int (*comm_power)(int on, int show);
475 int (*enable_5v)(int on);
476 int (*core_power)(int on, int show);
477 int (*cec_power)(int on);
Ajay Singh Parmar7d11c272012-06-07 12:25:31 +0530478 int (*panel_power)(int on);
479 int (*gpio_config)(int on);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700480 int (*init_irq)(void);
481 bool (*check_hdcp_hw_support)(void);
Manoj Raoc6d904c2012-06-22 00:32:14 -0700482 bool is_mhl_enabled;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700483};
484
Manoj Rao14648742012-03-30 19:42:12 -0700485struct msm_mhl_platform_data {
486 int irq;
Manoj Raoc6d904c2012-06-22 00:32:14 -0700487 /* GPIO no. for mhl intr */
488 uint32_t gpio_mhl_int;
489 /* GPIO no. for mhl block reset */
490 uint32_t gpio_mhl_reset;
491 /*
492 * below gpios are specific to targets
493 * that have the integrated MHL soln.
494 */
495 /* GPIO no. for mhl block power */
496 uint32_t gpio_mhl_power;
497 /* GPIO no. for hdmi-mhl mux */
498 uint32_t gpio_hdmi_mhl_mux;
Manoj Rao14648742012-03-30 19:42:12 -0700499};
500
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700501struct msm_i2c_platform_data {
502 int clk_freq;
503 uint32_t rmutex;
504 const char *rsl_id;
505 uint32_t pm_lat;
506 int pri_clk;
507 int pri_dat;
508 int aux_clk;
509 int aux_dat;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700510 int src_clk_rate;
511 int use_gsbi_shared_mode;
512 void (*msm_i2c_config_gpio)(int iface, int config_type);
513};
514
515struct msm_i2c_ssbi_platform_data {
516 const char *rsl_id;
517 enum msm_ssbi_controller_type controller_type;
518};
519
520struct msm_vidc_platform_data {
521 int memtype;
Deepak Koturcb4f6722011-10-31 14:06:57 -0700522 u32 enable_ion;
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800523 int disable_dmx;
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +0530524 int disable_fullhd;
Deepak kotur5f10b272012-03-15 22:01:39 -0700525 u32 cp_enabled;
Riaz Rahaman84f8c682012-05-30 13:32:10 +0530526 u32 secure_wb_heap;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700527#ifdef CONFIG_MSM_BUS_SCALING
528 struct msm_bus_scale_pdata *vidc_bus_client_pdata;
529#endif
Mohan Kumar Gubbihalli Lachma Naiked9dc912012-03-01 19:11:14 -0800530 int cont_mode_dpb_count;
Deva Ramasubramanian837ae362012-05-12 23:26:53 -0700531 int disable_turbo;
Riaz Rahaman84f8c682012-05-30 13:32:10 +0530532 unsigned long fw_addr;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700533};
534
Terence Hampsona6914ca2012-04-09 14:06:50 -0400535struct vcap_platform_data {
536 unsigned *gpios;
537 int num_gpios;
538 struct msm_bus_scale_pdata *bus_client_pdata;
539};
540
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700541#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
542struct isp1763_platform_data {
543 unsigned reset_gpio;
544 int (*setup_gpio)(int enable);
545};
546#endif
Russell Kinga09e64f2008-08-05 16:14:15 +0100547/* common init routines for use by arch/arm/mach-msm/board-*.c */
548
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700549#ifdef CONFIG_OF_DEVICE
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700550void msm_8974_init(struct of_dev_auxdata **);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700551#endif
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700552void msm_add_devices(void);
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700553void msm_8974_add_devices(void);
554void msm_8974_add_drivers(void);
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700555void msm_map_common_io(void);
556void msm_map_qsd8x50_io(void);
557void msm_map_msm8x60_io(void);
558void msm_map_msm8960_io(void);
559void msm_map_msm8930_io(void);
560void msm_map_apq8064_io(void);
561void msm_map_msm7x30_io(void);
562void msm_map_fsm9xxx_io(void);
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700563void msm_map_8974_io(void);
Taniya Das43bcdd62011-12-02 17:33:27 +0530564void msm_map_msm8625_io(void);
Rohit Vaswani3fc60342012-04-23 18:55:15 -0700565void msm_map_msm9625_io(void);
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700566void msm_init_irq(void);
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700567void msm_8974_init_irq(void);
Taniya Das86e0e132011-10-19 11:32:00 +0530568void vic_handle_irq(struct pt_regs *regs);
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700569void msm_8974_reserve(void);
570void msm_8974_very_early(void);
571void msm_8974_init_gpiomux(void);
Rohit Vaswani5a06e792012-06-29 16:03:23 -0700572void msm9625_init_gpiomux(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700573
574struct mmc_platform_data;
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700575int msm_add_sdcc(unsigned int controller,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700576 struct mmc_platform_data *plat);
577
Murali Nalajala2a0bbda2012-03-28 12:12:54 +0530578void msm_pm_register_irqs(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700579struct msm_usb_host_platform_data;
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700580int msm_add_host(unsigned int host,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700581 struct msm_usb_host_platform_data *plat);
582#if defined(CONFIG_USB_FUNCTION_MSM_HSUSB) \
583 || defined(CONFIG_USB_MSM_72K) || defined(CONFIG_USB_MSM_72K_MODULE)
584void msm_hsusb_set_vbus_state(int online);
585#else
586static inline void msm_hsusb_set_vbus_state(int online) {}
587#endif
588
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700589void msm_snddev_init(void);
590void msm_snddev_init_timpani(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700591void msm_snddev_poweramp_on(void);
592void msm_snddev_poweramp_off(void);
593void msm_snddev_hsed_voltage_on(void);
594void msm_snddev_hsed_voltage_off(void);
595void msm_snddev_tx_route_config(void);
596void msm_snddev_tx_route_deconfig(void);
597
598extern unsigned int msm_shared_ram_phys; /* defined in arch/arm/mach-msm/io.c */
599
Russell Kinga09e64f2008-08-05 16:14:15 +0100600
601#endif