blob: 0b53badf90ec6ec6f433e1905cc45bc20a200e3d [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;
Sreesudhan Ramakrish Ramkumar5ad18cd2012-09-07 23:22:34 -070066 uint8_t csiphy_core;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070067};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070068
69#ifdef CONFIG_SENSORS_MT9T013
70struct msm_camera_legacy_device_platform_data {
71 int sensor_reset;
72 int sensor_pwd;
73 int vcm_pwd;
74 void (*config_gpio_on) (void);
75 void (*config_gpio_off)(void);
76};
77#endif
78
79#define MSM_CAMERA_FLASH_NONE 0
80#define MSM_CAMERA_FLASH_LED 1
81
82#define MSM_CAMERA_FLASH_SRC_PMIC (0x00000001<<0)
83#define MSM_CAMERA_FLASH_SRC_PWM (0x00000001<<1)
84#define MSM_CAMERA_FLASH_SRC_CURRENT_DRIVER (0x00000001<<2)
Nishant Pandit474f2252011-07-23 23:17:56 +053085#define MSM_CAMERA_FLASH_SRC_EXT (0x00000001<<3)
Taniya Das7a22cdd2011-09-08 14:57:00 +053086#define MSM_CAMERA_FLASH_SRC_LED (0x00000001<<3)
Raju P.L.S.S.S.Nbf3faff2012-04-05 14:33:36 +053087#define MSM_CAMERA_FLASH_SRC_LED1 (0x00000001<<4)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070088
89struct msm_camera_sensor_flash_pmic {
90 uint8_t num_of_src;
91 uint32_t low_current;
92 uint32_t high_current;
93 enum pmic8058_leds led_src_1;
94 enum pmic8058_leds led_src_2;
95 int (*pmic_set_current)(enum pmic8058_leds id, unsigned mA);
96};
97
98struct msm_camera_sensor_flash_pwm {
99 uint32_t freq;
100 uint32_t max_load;
101 uint32_t low_load;
102 uint32_t high_load;
103 uint32_t channel;
104};
105
106struct pmic8058_leds_platform_data;
107struct msm_camera_sensor_flash_current_driver {
108 uint32_t low_current;
109 uint32_t high_current;
110 const struct pmic8058_leds_platform_data *driver_channel;
Nishant Pandit474f2252011-07-23 23:17:56 +0530111};
112
Jeyaprakash Soundrapandian85099fe2012-05-15 17:09:51 -0700113enum msm_camera_ext_led_flash_id {
114 MAM_CAMERA_EXT_LED_FLASH_SC628A,
115 MAM_CAMERA_EXT_LED_FLASH_TPS61310,
116};
117
Nishant Pandit474f2252011-07-23 23:17:56 +0530118struct msm_camera_sensor_flash_external {
119 uint32_t led_en;
120 uint32_t led_flash_en;
Jeyaprakash Soundrapandian85099fe2012-05-15 17:09:51 -0700121 enum msm_camera_ext_led_flash_id flash_id;
Nishant Pandit474f2252011-07-23 23:17:56 +0530122 struct msm_cam_expander_info *expander_info;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700123};
124
Taniya Das7a22cdd2011-09-08 14:57:00 +0530125struct msm_camera_sensor_flash_led {
126 const char *led_name;
127 const int led_name_len;
128};
129
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700130struct msm_camera_sensor_flash_src {
131 int flash_sr_type;
132
133 union {
134 struct msm_camera_sensor_flash_pmic pmic_src;
135 struct msm_camera_sensor_flash_pwm pwm_src;
136 struct msm_camera_sensor_flash_current_driver
137 current_driver_src;
Nishant Pandit474f2252011-07-23 23:17:56 +0530138 struct msm_camera_sensor_flash_external
139 ext_driver_src;
Taniya Das7a22cdd2011-09-08 14:57:00 +0530140 struct msm_camera_sensor_flash_led led_src;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700141 } _fsrc;
142};
143
144struct msm_camera_sensor_flash_data {
145 int flash_type;
146 struct msm_camera_sensor_flash_src *flash_src;
147};
148
149struct msm_camera_sensor_strobe_flash_data {
150 uint8_t flash_trigger;
151 uint8_t flash_charge; /* pin for charge */
152 uint8_t flash_charge_done;
153 uint32_t flash_recharge_duration;
154 uint32_t irq;
155 spinlock_t spin_lock;
156 spinlock_t timer_lock;
157 int state;
158};
159
Nishant Pandit24153d82011-08-27 16:05:13 +0530160enum msm_camera_type {
161 BACK_CAMERA_2D,
162 FRONT_CAMERA_2D,
163 BACK_CAMERA_3D,
164 BACK_CAMERA_INT_3D,
165};
166
Raju P.L.S.S.S.N3f4b3022012-03-29 10:09:01 +0530167enum msm_sensor_type {
168 BAYER_SENSOR,
169 YUV_SENSOR,
170};
171
Kevin Chaneb6b6072012-01-17 11:54:54 -0800172struct msm_gpio_set_tbl {
173 unsigned gpio;
174 unsigned long flags;
175 uint32_t delay;
Nishant Pandit24153d82011-08-27 16:05:13 +0530176};
177
Hody Hung9ba65cf2012-01-17 17:34:51 -0800178struct msm_camera_csi_lane_params {
Hody Hung31ed0272012-06-11 10:22:20 -0700179 uint16_t csi_lane_assign;
180 uint16_t csi_lane_mask;
Hody Hung9ba65cf2012-01-17 17:34:51 -0800181};
182
Nishant Pandit24153d82011-08-27 16:05:13 +0530183struct msm_camera_gpio_conf {
184 void *cam_gpiomux_conf_tbl;
185 uint8_t cam_gpiomux_conf_tbl_size;
Kevin Chaneb6b6072012-01-17 11:54:54 -0800186 struct gpio *cam_gpio_common_tbl;
187 uint8_t cam_gpio_common_tbl_size;
188 struct gpio *cam_gpio_req_tbl;
189 uint8_t cam_gpio_req_tbl_size;
190 struct msm_gpio_set_tbl *cam_gpio_set_tbl;
191 uint8_t cam_gpio_set_tbl_size;
Sandeep Kodimelac6f78672012-03-07 10:44:04 +0530192 uint32_t gpio_no_mux;
193 uint32_t *camera_off_table;
194 uint8_t camera_off_table_size;
195 uint32_t *camera_on_table;
196 uint8_t camera_on_table_size;
Kevin Chaneb6b6072012-01-17 11:54:54 -0800197};
198
Kevin Chanbb8ef862012-02-14 13:03:04 -0800199enum msm_camera_i2c_mux_mode {
200 MODE_R,
201 MODE_L,
202 MODE_DUAL
203};
204
205struct msm_camera_i2c_conf {
206 uint8_t use_i2c_mux;
207 struct platform_device *mux_dev;
208 enum msm_camera_i2c_mux_mode i2c_mux_mode;
209};
210
Sreesudhan Ramakrish Ramkumar923fbad2012-07-26 17:31:42 -0700211enum msm_camera_vreg_name_t {
212 CAM_VDIG,
213 CAM_VIO,
214 CAM_VANA,
215 CAM_VAF,
216};
217
Kevin Chaneb6b6072012-01-17 11:54:54 -0800218struct msm_camera_sensor_platform_info {
219 int mount_angle;
220 int sensor_reset;
221 struct camera_vreg_t *cam_vreg;
222 int num_vreg;
223 int32_t (*ext_power_ctrl) (int enable);
224 struct msm_camera_gpio_conf *gpio_conf;
Kevin Chanbb8ef862012-02-14 13:03:04 -0800225 struct msm_camera_i2c_conf *i2c_conf;
Hody Hung9ba65cf2012-01-17 17:34:51 -0800226 struct msm_camera_csi_lane_params *csi_lane_params;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700227};
228
Rajakumar Govindaram6627b362012-01-29 19:00:30 -0800229enum msm_camera_actuator_name {
230 MSM_ACTUATOR_MAIN_CAM_0,
231 MSM_ACTUATOR_MAIN_CAM_1,
232 MSM_ACTUATOR_MAIN_CAM_2,
233 MSM_ACTUATOR_MAIN_CAM_3,
234 MSM_ACTUATOR_MAIN_CAM_4,
235 MSM_ACTUATOR_MAIN_CAM_5,
236 MSM_ACTUATOR_WEB_CAM_0,
237 MSM_ACTUATOR_WEB_CAM_1,
238 MSM_ACTUATOR_WEB_CAM_2,
239};
240
Sreesudhan Ramakrish Ramkumara4b5f302011-09-12 16:23:22 -0700241struct msm_actuator_info {
242 struct i2c_board_info const *board_info;
Rajakumar Govindaram6627b362012-01-29 19:00:30 -0800243 enum msm_camera_actuator_name cam_name;
Sreesudhan Ramakrish Ramkumara4b5f302011-09-12 16:23:22 -0700244 int bus_id;
245 int vcm_pwd;
246 int vcm_enable;
247};
248
Jeyaprakash Soundrapandian734476b2012-05-03 20:08:15 -0700249struct msm_eeprom_info {
250 struct i2c_board_info const *board_info;
251 int bus_id;
Jack Wangb88c8c22012-07-26 11:33:36 -0700252 int eeprom_reg_addr;
253 int eeprom_read_length;
254 int eeprom_i2c_slave_addr;
Jeyaprakash Soundrapandian734476b2012-05-03 20:08:15 -0700255};
256
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700257struct msm_camera_sensor_info {
258 const char *sensor_name;
259 int sensor_reset_enable;
260 int sensor_reset;
261 int sensor_pwd;
262 int vcm_pwd;
263 int vcm_enable;
264 int mclk;
265 int flash_type;
266 struct msm_camera_sensor_platform_info *sensor_platform_info;
267 struct msm_camera_device_platform_data *pdata;
268 struct resource *resource;
269 uint8_t num_resources;
270 struct msm_camera_sensor_flash_data *flash_data;
271 int csi_if;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700272 struct msm_camera_sensor_strobe_flash_data *strobe_flash_data;
273 char *eeprom_data;
Nishant Pandit24153d82011-08-27 16:05:13 +0530274 enum msm_camera_type camera_type;
Raju P.L.S.S.S.N3f4b3022012-03-29 10:09:01 +0530275 enum msm_sensor_type sensor_type;
Sreesudhan Ramakrish Ramkumara4b5f302011-09-12 16:23:22 -0700276 struct msm_actuator_info *actuator_info;
Su Liuaca04702012-02-14 02:27:32 +0530277 int pmic_gpio_enable;
Jeyaprakash Soundrapandian734476b2012-05-03 20:08:15 -0700278 struct msm_eeprom_info *eeprom_info;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700279};
280
Kevin Chan09f4e662011-12-16 08:17:02 -0800281struct msm_camera_board_info {
282 struct i2c_board_info *board_info;
283 uint8_t num_i2c_board_info;
284};
285
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700286int msm_get_cam_resources(struct msm_camera_sensor_info *);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700287
Stephen Boydbd323442011-02-23 09:37:42 -0800288struct clk_lookup;
Daniel Walker5e96da52010-05-12 13:43:28 -0700289
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700290struct snd_endpoint {
291 int id;
292 const char *name;
293};
Steve Mucklea55df6e2010-01-07 12:43:24 -0800294
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700295struct msm_snd_endpoints {
296 struct snd_endpoint *endpoints;
297 unsigned num;
298};
299
Manish Dewangan1c0fa492012-08-22 10:33:11 +0530300struct cad_endpoint {
301 int id;
302 const char *name;
303 uint32_t capability;
304};
305
306struct msm_cad_endpoints {
307 struct cad_endpoint *endpoints;
308 unsigned num;
309};
310
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700311#define MSM_MAX_DEC_CNT 14
312/* 7k target ADSP information */
313/* Bit 23:0, for codec identification like mp3, wav etc *
314 * Bit 27:24, for mode identification like tunnel, non tunnel*
315 * bit 31:28, for operation support like DM, DMA */
316enum msm_adspdec_concurrency {
317 MSM_ADSP_CODEC_WAV = 0,
318 MSM_ADSP_CODEC_ADPCM = 1,
319 MSM_ADSP_CODEC_MP3 = 2,
320 MSM_ADSP_CODEC_REALAUDIO = 3,
321 MSM_ADSP_CODEC_WMA = 4,
322 MSM_ADSP_CODEC_AAC = 5,
323 MSM_ADSP_CODEC_RESERVED = 6,
324 MSM_ADSP_CODEC_MIDI = 7,
325 MSM_ADSP_CODEC_YADPCM = 8,
326 MSM_ADSP_CODEC_QCELP = 9,
327 MSM_ADSP_CODEC_AMRNB = 10,
328 MSM_ADSP_CODEC_AMRWB = 11,
329 MSM_ADSP_CODEC_EVRC = 12,
330 MSM_ADSP_CODEC_WMAPRO = 13,
Chaithanya Krishna Bacharaju8e838cc2012-08-16 11:32:46 +0530331 MSM_ADSP_CODEC_AC3 = 23,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700332 MSM_ADSP_MODE_TUNNEL = 24,
333 MSM_ADSP_MODE_NONTUNNEL = 25,
334 MSM_ADSP_MODE_LP = 26,
335 MSM_ADSP_OP_DMA = 28,
336 MSM_ADSP_OP_DM = 29,
337};
338
339struct msm_adspdec_info {
340 const char *module_name;
341 unsigned module_queueid;
342 int module_decid; /* objid */
343 unsigned nr_codec_support;
344};
345
346/* Carries information about number codec
347 * supported if same codec or different codecs
348 */
349struct dec_instance_table {
350 uint8_t max_instances_same_dec;
351 uint8_t max_instances_diff_dec;
352};
353
354struct msm_adspdec_database {
355 unsigned num_dec;
356 unsigned num_concurrency_support;
357 unsigned int *dec_concurrency_table; /* Bit masked entry to *
358 * represents codec, mode etc */
359 struct msm_adspdec_info *dec_info_list;
360 struct dec_instance_table *dec_instance_list;
361};
362
363enum msm_mdp_hw_revision {
364 MDP_REV_20 = 1,
365 MDP_REV_22,
366 MDP_REV_30,
367 MDP_REV_303,
368 MDP_REV_31,
369 MDP_REV_40,
370 MDP_REV_41,
371 MDP_REV_42,
Huaibin Yang4a084e32011-12-15 15:25:52 -0800372 MDP_REV_43,
373 MDP_REV_44,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700374};
375
376struct msm_panel_common_pdata {
377 uintptr_t hw_revision_addr;
378 int gpio;
Padmanabhan Komandurubea9c062012-04-09 10:33:48 +0530379 bool bl_lock;
Padmanabhan Komanduru0f0000a2012-04-12 10:23:02 +0530380 spinlock_t bl_spinlock;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700381 int (*backlight_level)(int level, int max, int min);
382 int (*pmic_backlight)(int level);
Jeevan Shriram8f7c96d2012-05-15 12:42:57 +0530383 int (*rotate_panel)(void);
Padmanabhan Komandurucc913992012-05-09 14:57:28 +0530384 int (*backlight) (int level, int mode);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700385 int (*panel_num)(void);
386 void (*panel_config_gpio)(int);
387 int (*vga_switch)(int select_vga);
388 int *gpio_num;
Siddhartha Agrawal496f9282012-08-15 17:41:34 -0700389 u32 mdp_max_clk;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700390#ifdef CONFIG_MSM_BUS_SCALING
391 struct msm_bus_scale_pdata *mdp_bus_scale_table;
392#endif
393 int mdp_rev;
Nagamalleswararao Ganji937a1192011-12-07 19:00:52 -0800394 u32 ov0_wb_size; /* overlay0 writeback size */
395 u32 ov1_wb_size; /* overlay1 writeback size */
396 u32 mem_hid;
Chandan Uddaraju2679f092012-03-09 15:48:04 -0800397 char cont_splash_enabled;
Pradeep Jilagamd635cad2012-08-03 15:52:06 +0530398 u32 splash_screen_addr;
399 u32 splash_screen_size;
Olav Hauganef95ae32012-05-15 09:50:30 -0700400 char mdp_iommu_split_domain;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700401};
402
Huaibin Yanga5419422011-12-08 23:52:10 -0800403
404
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700405struct lcdc_platform_data {
406 int (*lcdc_gpio_config)(int on);
407 int (*lcdc_power_save)(int);
408 unsigned int (*lcdc_get_clk)(void);
409#ifdef CONFIG_MSM_BUS_SCALING
410 struct msm_bus_scale_pdata *bus_scale_table;
411#endif
Huaibin Yang02f981c2012-02-27 16:58:41 -0800412 int (*lvds_pixel_remap)(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700413};
414
415struct tvenc_platform_data {
416 int poll;
417 int (*pm_vid_en)(int on);
418#ifdef CONFIG_MSM_BUS_SCALING
419 struct msm_bus_scale_pdata *bus_scale_table;
420#endif
421};
422
423struct mddi_platform_data {
424 int (*mddi_power_save)(int on);
425 int (*mddi_sel_clk)(u32 *clk_rate);
426 int (*mddi_client_power)(u32 client_id);
427};
428
429struct mipi_dsi_platform_data {
430 int vsync_gpio;
431 int (*dsi_power_save)(int on);
432 int (*dsi_client_reset)(void);
433 int (*get_lane_config)(void);
Ravishangar Kalyanam87dd72e2012-04-16 19:07:36 -0700434 char (*splash_is_enabled)(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700435 int target_type;
436};
437
Chandan Uddaraju83eac3c2011-09-11 18:32:23 -0700438enum mipi_dsi_3d_ctrl {
439 FPGA_EBI2_INTF,
440 FPGA_SPI_INTF,
441};
442
443/* DSI PHY configuration */
444struct mipi_dsi_phy_ctrl {
445 uint32_t regulator[5];
446 uint32_t timing[12];
447 uint32_t ctrl[4];
448 uint32_t strength[4];
449 uint32_t pll[21];
450};
451
Nagamalleswararao Ganjieac5dfa2011-07-23 17:31:16 -0700452struct mipi_dsi_panel_platform_data {
Chandan Uddaraju83eac3c2011-09-11 18:32:23 -0700453 int fpga_ctrl_mode;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700454 int fpga_3d_config_addr;
Nagamalleswararao Ganjieac5dfa2011-07-23 17:31:16 -0700455 int *gpio;
Chandan Uddaraju83eac3c2011-09-11 18:32:23 -0700456 struct mipi_dsi_phy_ctrl *phy_ctrl_settings;
Ravishangar Kalyanam903f65c2012-01-28 21:36:22 -0800457 char dlane_swap;
Chandan Uddaraju2679f092012-03-09 15:48:04 -0800458 void (*dsi_pwm_cfg)(void);
Chandan Uddaraju194a4b52012-03-21 10:11:18 -0700459 char enable_wled_bl_ctrl;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700460};
461
Ravishangar Kalyanamc2fee312012-02-09 19:11:22 -0800462struct lvds_panel_platform_data {
463 int *gpio;
464};
465
Olav Hauganef95ae32012-05-15 09:50:30 -0700466struct msm_wfd_platform_data {
467 char (*wfd_check_mdp_iommu_split)(void);
468};
469
Ravishangar Kalyanam8c79ead2011-12-02 21:05:01 -0800470#define PANEL_NAME_MAX_LEN 50
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700471struct msm_fb_platform_data {
472 int (*detect_client)(const char *name);
473 int mddi_prescan;
Ajay Singh Parmar6b82d2b2012-07-19 17:23:26 +0530474 unsigned char ext_resolution;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700475 int (*allow_set_offset)(void);
Ravishangar Kalyanam8c79ead2011-12-02 21:05:01 -0800476 char prim_panel_name[PANEL_NAME_MAX_LEN];
477 char ext_panel_name[PANEL_NAME_MAX_LEN];
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700478};
479
480struct msm_hdmi_platform_data {
481 int irq;
482 int (*cable_detect)(int insert);
483 int (*comm_power)(int on, int show);
484 int (*enable_5v)(int on);
485 int (*core_power)(int on, int show);
486 int (*cec_power)(int on);
Ajay Singh Parmar7d11c272012-06-07 12:25:31 +0530487 int (*panel_power)(int on);
488 int (*gpio_config)(int on);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700489 int (*init_irq)(void);
490 bool (*check_hdcp_hw_support)(void);
Manoj Raoc6d904c2012-06-22 00:32:14 -0700491 bool is_mhl_enabled;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700492};
493
Manoj Rao14648742012-03-30 19:42:12 -0700494struct msm_mhl_platform_data {
495 int irq;
Manoj Raoc6d904c2012-06-22 00:32:14 -0700496 /* GPIO no. for mhl intr */
497 uint32_t gpio_mhl_int;
498 /* GPIO no. for mhl block reset */
499 uint32_t gpio_mhl_reset;
500 /*
501 * below gpios are specific to targets
502 * that have the integrated MHL soln.
503 */
504 /* GPIO no. for mhl block power */
505 uint32_t gpio_mhl_power;
506 /* GPIO no. for hdmi-mhl mux */
507 uint32_t gpio_hdmi_mhl_mux;
Abhishek Kharbanda72dc72e2012-06-07 13:41:37 -0700508 bool mhl_enabled;
Manoj Rao14648742012-03-30 19:42:12 -0700509};
510
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700511struct msm_i2c_platform_data {
512 int clk_freq;
513 uint32_t rmutex;
514 const char *rsl_id;
515 uint32_t pm_lat;
516 int pri_clk;
517 int pri_dat;
518 int aux_clk;
519 int aux_dat;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700520 int src_clk_rate;
521 int use_gsbi_shared_mode;
Kiran Gunda9aa5e912012-08-16 18:37:46 +0530522 int keep_ahb_clk_on;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700523 void (*msm_i2c_config_gpio)(int iface, int config_type);
524};
525
526struct msm_i2c_ssbi_platform_data {
527 const char *rsl_id;
528 enum msm_ssbi_controller_type controller_type;
529};
530
531struct msm_vidc_platform_data {
532 int memtype;
Deepak Koturcb4f6722011-10-31 14:06:57 -0700533 u32 enable_ion;
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800534 int disable_dmx;
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +0530535 int disable_fullhd;
Deepak kotur5f10b272012-03-15 22:01:39 -0700536 u32 cp_enabled;
Riaz Rahaman84f8c682012-05-30 13:32:10 +0530537 u32 secure_wb_heap;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700538#ifdef CONFIG_MSM_BUS_SCALING
539 struct msm_bus_scale_pdata *vidc_bus_client_pdata;
540#endif
Mohan Kumar Gubbihalli Lachma Naiked9dc912012-03-01 19:11:14 -0800541 int cont_mode_dpb_count;
Deva Ramasubramanian837ae362012-05-12 23:26:53 -0700542 int disable_turbo;
Riaz Rahaman84f8c682012-05-30 13:32:10 +0530543 unsigned long fw_addr;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700544};
545
Terence Hampsona6914ca2012-04-09 14:06:50 -0400546struct vcap_platform_data {
547 unsigned *gpios;
548 int num_gpios;
549 struct msm_bus_scale_pdata *bus_client_pdata;
550};
551
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700552#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
553struct isp1763_platform_data {
554 unsigned reset_gpio;
555 int (*setup_gpio)(int enable);
556};
557#endif
Russell Kinga09e64f2008-08-05 16:14:15 +0100558/* common init routines for use by arch/arm/mach-msm/board-*.c */
559
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700560#ifdef CONFIG_OF_DEVICE
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700561void msm_8974_init(struct of_dev_auxdata **);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700562#endif
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700563void msm_add_devices(void);
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700564void msm_8974_add_devices(void);
565void msm_8974_add_drivers(void);
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700566void msm_map_common_io(void);
567void msm_map_qsd8x50_io(void);
568void msm_map_msm8x60_io(void);
569void msm_map_msm8960_io(void);
570void msm_map_msm8930_io(void);
571void msm_map_apq8064_io(void);
572void msm_map_msm7x30_io(void);
573void msm_map_fsm9xxx_io(void);
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700574void msm_map_8974_io(void);
Taniya Das43bcdd62011-12-02 17:33:27 +0530575void msm_map_msm8625_io(void);
Rohit Vaswani3fc60342012-04-23 18:55:15 -0700576void msm_map_msm9625_io(void);
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700577void msm_init_irq(void);
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700578void msm_8974_init_irq(void);
Taniya Das86e0e132011-10-19 11:32:00 +0530579void vic_handle_irq(struct pt_regs *regs);
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700580void msm_8974_reserve(void);
581void msm_8974_very_early(void);
582void msm_8974_init_gpiomux(void);
Rohit Vaswani5a06e792012-06-29 16:03:23 -0700583void msm9625_init_gpiomux(void);
Ravi Kumar V8834dad2012-08-31 22:49:55 +0530584void msm_map_mpq8092_io(void);
Ravi Kumar V345872a2012-09-01 00:06:02 +0530585void mpq8092_init_gpiomux(void);
Syed Rameez Mustafa878892c2012-08-23 17:30:32 -0700586void msm_map_msm8226_io(void);
587void msm8226_init_irq(void);
Syed Rameez Mustafa9d16c4f2012-09-10 14:16:55 -0700588void msm8226_init_gpiomux(void);
Syed Rameez Mustafafd0f9b42012-09-21 18:33:36 -0700589void msm_map_msm8910_io(void);
590void msm8910_init_irq(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700591
592struct mmc_platform_data;
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700593int msm_add_sdcc(unsigned int controller,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700594 struct mmc_platform_data *plat);
595
Murali Nalajala2a0bbda2012-03-28 12:12:54 +0530596void msm_pm_register_irqs(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700597struct msm_usb_host_platform_data;
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700598int msm_add_host(unsigned int host,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700599 struct msm_usb_host_platform_data *plat);
600#if defined(CONFIG_USB_FUNCTION_MSM_HSUSB) \
601 || defined(CONFIG_USB_MSM_72K) || defined(CONFIG_USB_MSM_72K_MODULE)
602void msm_hsusb_set_vbus_state(int online);
603#else
604static inline void msm_hsusb_set_vbus_state(int online) {}
605#endif
606
Stepan Moskovchenkob3e63862011-10-20 18:36:55 -0700607void msm_snddev_init(void);
608void msm_snddev_init_timpani(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700609void msm_snddev_poweramp_on(void);
610void msm_snddev_poweramp_off(void);
611void msm_snddev_hsed_voltage_on(void);
612void msm_snddev_hsed_voltage_off(void);
613void msm_snddev_tx_route_config(void);
614void msm_snddev_tx_route_deconfig(void);
615
616extern unsigned int msm_shared_ram_phys; /* defined in arch/arm/mach-msm/io.c */
617
Russell Kinga09e64f2008-08-05 16:14:15 +0100618
619#endif