Sravan Kumar Ambapuram | b22cf4d | 2012-01-02 21:45:04 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/init.h> |
| 15 | #include <linux/gpio_event.h> |
Pankaj Kumar | 6f84174 | 2011-10-10 15:52:14 +0530 | [diff] [blame] | 16 | #include <linux/usb/android.h> |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/io.h> |
| 19 | #include <linux/gpio.h> |
| 20 | #include <linux/mtd/nand.h> |
| 21 | #include <linux/mtd/partitions.h> |
| 22 | #include <linux/i2c.h> |
| 23 | #include <linux/android_pmem.h> |
| 24 | #include <linux/bootmem.h> |
| 25 | #include <linux/mfd/marimba.h> |
| 26 | #include <linux/power_supply.h> |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 27 | #include <linux/input/rmi_platformdata.h> |
| 28 | #include <linux/input/rmi_i2c.h> |
| 29 | #include <linux/i2c/atmel_mxt_ts.h> |
Pankaj Kumar | 3cec058 | 2011-11-18 11:13:29 +0530 | [diff] [blame] | 30 | #include <linux/regulator/consumer.h> |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 31 | #include <linux/memblock.h> |
Mohan Pallaka | 5afe985 | 2012-01-12 23:12:06 +0530 | [diff] [blame] | 32 | #include <linux/input/ft5x06_ts.h> |
Siddartha Mohanadoss | bc2103f | 2012-03-20 11:41:48 -0700 | [diff] [blame] | 33 | #include <linux/msm_adc.h> |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 34 | #include <linux/fmem.h> |
Steve Muckle | 75c34ca | 2012-06-12 14:27:40 -0700 | [diff] [blame] | 35 | #include <linux/regulator/msm-gpio-regulator.h> |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 36 | #include <asm/mach/mmc.h> |
| 37 | #include <asm/mach-types.h> |
| 38 | #include <asm/mach/arch.h> |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 39 | #include <asm/hardware/gic.h> |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 40 | #include <mach/board.h> |
| 41 | #include <mach/msm_iomap.h> |
| 42 | #include <mach/msm_hsusb.h> |
| 43 | #include <mach/rpc_hsusb.h> |
| 44 | #include <mach/rpc_pmapp.h> |
| 45 | #include <mach/usbdiag.h> |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 46 | #include <mach/msm_memtypes.h> |
| 47 | #include <mach/msm_serial_hs.h> |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 48 | #include <mach/pmic.h> |
| 49 | #include <mach/socinfo.h> |
| 50 | #include <mach/vreg.h> |
| 51 | #include <mach/rpc_pmapp.h> |
| 52 | #include <mach/msm_battery.h> |
| 53 | #include <mach/rpc_server_handset.h> |
| 54 | #include <mach/socinfo.h> |
Pankaj Kumar | 27c0264 | 2011-09-22 15:55:55 +0530 | [diff] [blame] | 55 | #include "board-msm7x27a-regulator.h" |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 56 | #include "devices.h" |
| 57 | #include "devices-msm7x2xa.h" |
Matt Wagantall | 7cca464 | 2012-02-01 16:43:24 -0800 | [diff] [blame] | 58 | #include "pm.h" |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 59 | #include "timer.h" |
Murali Nalajala | a182784 | 2011-11-13 14:12:39 +0530 | [diff] [blame] | 60 | #include "pm-boot.h" |
Pankaj Kumar | 3cec058 | 2011-11-18 11:13:29 +0530 | [diff] [blame] | 61 | #include "board-msm7x27a-regulator.h" |
Chintan Pandya | cf467fc | 2011-12-01 17:11:11 +0530 | [diff] [blame] | 62 | #include "board-msm7627a.h" |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 63 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 64 | #define PMEM_KERNEL_EBI1_SIZE 0x3A000 |
Sidipotu Ashok | 4f1ddc9 | 2012-04-11 13:51:34 +0530 | [diff] [blame] | 65 | #define MSM_PMEM_AUDIO_SIZE 0x1F4000 |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 66 | #define BAHAMA_SLAVE_ID_FM_REG 0x02 |
| 67 | #define FM_GPIO 83 |
| 68 | #define BT_PCM_BCLK_MODE 0x88 |
| 69 | #define BT_PCM_DIN_MODE 0x89 |
| 70 | #define BT_PCM_DOUT_MODE 0x8A |
| 71 | #define BT_PCM_SYNC_MODE 0x8B |
| 72 | #define FM_I2S_SD_MODE 0x8E |
| 73 | #define FM_I2S_WS_MODE 0x8F |
| 74 | #define FM_I2S_SCK_MODE 0x90 |
| 75 | #define I2C_PIN_CTL 0x15 |
| 76 | #define I2C_NORMAL 0x40 |
| 77 | |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 78 | static struct platform_device msm_wlan_ar6000_pm_device = { |
| 79 | .name = "wlan_ar6000_pm_dev", |
| 80 | .id = -1, |
| 81 | }; |
| 82 | |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 83 | static struct msm_gpio qup_i2c_gpios_io[] = { |
| 84 | { GPIO_CFG(60, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA), |
| 85 | "qup_scl" }, |
| 86 | { GPIO_CFG(61, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA), |
| 87 | "qup_sda" }, |
| 88 | { GPIO_CFG(131, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA), |
| 89 | "qup_scl" }, |
| 90 | { GPIO_CFG(132, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA), |
| 91 | "qup_sda" }, |
| 92 | }; |
| 93 | |
| 94 | static struct msm_gpio qup_i2c_gpios_hw[] = { |
| 95 | { GPIO_CFG(60, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA), |
| 96 | "qup_scl" }, |
| 97 | { GPIO_CFG(61, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA), |
| 98 | "qup_sda" }, |
| 99 | { GPIO_CFG(131, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA), |
| 100 | "qup_scl" }, |
| 101 | { GPIO_CFG(132, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA), |
| 102 | "qup_sda" }, |
| 103 | }; |
| 104 | |
| 105 | static void gsbi_qup_i2c_gpio_config(int adap_id, int config_type) |
| 106 | { |
| 107 | int rc; |
| 108 | |
| 109 | if (adap_id < 0 || adap_id > 1) |
| 110 | return; |
| 111 | |
| 112 | /* Each adapter gets 2 lines from the table */ |
| 113 | if (config_type) |
| 114 | rc = msm_gpios_request_enable(&qup_i2c_gpios_hw[adap_id*2], 2); |
| 115 | else |
| 116 | rc = msm_gpios_request_enable(&qup_i2c_gpios_io[adap_id*2], 2); |
| 117 | if (rc < 0) |
| 118 | pr_err("QUP GPIO request/enable failed: %d\n", rc); |
| 119 | } |
| 120 | |
| 121 | static struct msm_i2c_platform_data msm_gsbi0_qup_i2c_pdata = { |
| 122 | .clk_freq = 100000, |
| 123 | .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config, |
| 124 | }; |
| 125 | |
| 126 | static struct msm_i2c_platform_data msm_gsbi1_qup_i2c_pdata = { |
| 127 | .clk_freq = 100000, |
| 128 | .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config, |
| 129 | }; |
| 130 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 131 | #ifdef CONFIG_ARCH_MSM7X27A |
Sravan Kumar D.V.N | d0b59d6 | 2012-04-17 15:08:14 +0530 | [diff] [blame] | 132 | #define MSM_PMEM_MDP_SIZE 0x2300000 |
Rajeshwar Kurapaty | 20d7ad1 | 2012-06-22 16:11:06 +0530 | [diff] [blame] | 133 | #define MSM_PMEM_ADSP_SIZE 0x1200000 |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 134 | #endif |
| 135 | |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 136 | static struct android_usb_platform_data android_usb_pdata = { |
Pankaj Kumar | 6f84174 | 2011-10-10 15:52:14 +0530 | [diff] [blame] | 137 | .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num, |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 138 | }; |
| 139 | |
| 140 | static struct platform_device android_usb_device = { |
| 141 | .name = "android_usb", |
| 142 | .id = -1, |
| 143 | .dev = { |
| 144 | .platform_data = &android_usb_pdata, |
| 145 | }, |
| 146 | }; |
| 147 | |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 148 | #ifdef CONFIG_USB_EHCI_MSM_72K |
| 149 | static void msm_hsusb_vbus_power(unsigned phy_info, int on) |
| 150 | { |
| 151 | int rc = 0; |
| 152 | unsigned gpio; |
| 153 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 154 | gpio = QRD_GPIO_HOST_VBUS_EN; |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 155 | |
| 156 | rc = gpio_request(gpio, "i2c_host_vbus_en"); |
| 157 | if (rc < 0) { |
| 158 | pr_err("failed to request %d GPIO\n", gpio); |
| 159 | return; |
| 160 | } |
| 161 | gpio_direction_output(gpio, !!on); |
| 162 | gpio_set_value_cansleep(gpio, !!on); |
| 163 | gpio_free(gpio); |
| 164 | } |
| 165 | |
| 166 | static struct msm_usb_host_platform_data msm_usb_host_pdata = { |
| 167 | .phy_info = (USB_PHY_INTEGRATED | USB_PHY_MODEL_45NM), |
| 168 | }; |
| 169 | |
| 170 | static void __init msm7627a_init_host(void) |
| 171 | { |
| 172 | msm_add_host(0, &msm_usb_host_pdata); |
| 173 | } |
| 174 | #endif |
| 175 | |
| 176 | #ifdef CONFIG_USB_MSM_OTG_72K |
| 177 | static int hsusb_rpc_connect(int connect) |
| 178 | { |
| 179 | if (connect) |
| 180 | return msm_hsusb_rpc_connect(); |
| 181 | else |
| 182 | return msm_hsusb_rpc_close(); |
| 183 | } |
| 184 | |
Pankaj Kumar | 27c0264 | 2011-09-22 15:55:55 +0530 | [diff] [blame] | 185 | static struct regulator *reg_hsusb; |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 186 | static int msm_hsusb_ldo_init(int init) |
| 187 | { |
Pankaj Kumar | 27c0264 | 2011-09-22 15:55:55 +0530 | [diff] [blame] | 188 | int rc = 0; |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 189 | |
Pankaj Kumar | 27c0264 | 2011-09-22 15:55:55 +0530 | [diff] [blame] | 190 | if (init) { |
| 191 | reg_hsusb = regulator_get(NULL, "usb"); |
| 192 | if (IS_ERR(reg_hsusb)) { |
| 193 | rc = PTR_ERR(reg_hsusb); |
| 194 | pr_err("%s: could not get regulator: %d\n", |
| 195 | __func__, rc); |
| 196 | goto out; |
| 197 | } |
| 198 | |
| 199 | rc = regulator_set_voltage(reg_hsusb, 3300000, 3300000); |
| 200 | if (rc) { |
| 201 | pr_err("%s: could not set voltage: %d\n", |
| 202 | __func__, rc); |
| 203 | goto reg_free; |
| 204 | } |
| 205 | |
| 206 | return 0; |
| 207 | } |
| 208 | /* else fall through */ |
| 209 | reg_free: |
| 210 | regulator_put(reg_hsusb); |
| 211 | out: |
| 212 | reg_hsusb = NULL; |
| 213 | return rc; |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | static int msm_hsusb_ldo_enable(int enable) |
| 217 | { |
| 218 | static int ldo_status; |
| 219 | |
Pankaj Kumar | 27c0264 | 2011-09-22 15:55:55 +0530 | [diff] [blame] | 220 | if (IS_ERR_OR_NULL(reg_hsusb)) |
| 221 | return reg_hsusb ? PTR_ERR(reg_hsusb) : -ENODEV; |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 222 | |
| 223 | if (ldo_status == enable) |
| 224 | return 0; |
| 225 | |
| 226 | ldo_status = enable; |
| 227 | |
Pankaj Kumar | 27c0264 | 2011-09-22 15:55:55 +0530 | [diff] [blame] | 228 | return enable ? |
| 229 | regulator_enable(reg_hsusb) : |
| 230 | regulator_disable(reg_hsusb); |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | #ifndef CONFIG_USB_EHCI_MSM_72K |
| 234 | static int msm_hsusb_pmic_notif_init(void (*callback)(int online), int init) |
| 235 | { |
| 236 | int ret = 0; |
| 237 | |
| 238 | if (init) |
| 239 | ret = msm_pm_app_rpc_init(callback); |
| 240 | else |
| 241 | msm_pm_app_rpc_deinit(callback); |
| 242 | |
| 243 | return ret; |
| 244 | } |
| 245 | #endif |
| 246 | |
| 247 | static struct msm_otg_platform_data msm_otg_pdata = { |
| 248 | #ifndef CONFIG_USB_EHCI_MSM_72K |
| 249 | .pmic_vbus_notif_init = msm_hsusb_pmic_notif_init, |
| 250 | #else |
| 251 | .vbus_power = msm_hsusb_vbus_power, |
| 252 | #endif |
| 253 | .rpc_connect = hsusb_rpc_connect, |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 254 | .pemp_level = PRE_EMPHASIS_WITH_20_PERCENT, |
| 255 | .cdr_autoreset = CDR_AUTO_RESET_DISABLE, |
| 256 | .drv_ampl = HS_DRV_AMPLITUDE_DEFAULT, |
| 257 | .se1_gating = SE1_GATING_DISABLE, |
| 258 | .ldo_init = msm_hsusb_ldo_init, |
| 259 | .ldo_enable = msm_hsusb_ldo_enable, |
| 260 | .chg_init = hsusb_chg_init, |
| 261 | .chg_connected = hsusb_chg_connected, |
| 262 | .chg_vbus_draw = hsusb_chg_vbus_draw, |
| 263 | }; |
| 264 | #endif |
| 265 | |
| 266 | static struct msm_hsusb_gadget_platform_data msm_gadget_pdata = { |
| 267 | .is_phy_status_timer_on = 1, |
| 268 | }; |
| 269 | |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 270 | #ifdef CONFIG_SERIAL_MSM_HS |
| 271 | static struct msm_serial_hs_platform_data msm_uart_dm1_pdata = { |
| 272 | .inject_rx_on_wakeup = 1, |
| 273 | .rx_to_inject = 0xFD, |
| 274 | }; |
| 275 | #endif |
| 276 | static struct msm_pm_platform_data msm7627a_pm_data[MSM_PM_SLEEP_MODE_NR] = { |
| 277 | [MSM_PM_SLEEP_MODE_POWER_COLLAPSE] = { |
| 278 | .idle_supported = 1, |
| 279 | .suspend_supported = 1, |
| 280 | .idle_enabled = 1, |
| 281 | .suspend_enabled = 1, |
| 282 | .latency = 16000, |
| 283 | .residency = 20000, |
| 284 | }, |
| 285 | [MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN] = { |
| 286 | .idle_supported = 1, |
| 287 | .suspend_supported = 1, |
| 288 | .idle_enabled = 1, |
| 289 | .suspend_enabled = 1, |
| 290 | .latency = 12000, |
| 291 | .residency = 20000, |
| 292 | }, |
| 293 | [MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT] = { |
| 294 | .idle_supported = 1, |
| 295 | .suspend_supported = 1, |
| 296 | .idle_enabled = 0, |
| 297 | .suspend_enabled = 1, |
| 298 | .latency = 2000, |
| 299 | .residency = 0, |
| 300 | }, |
| 301 | [MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT] = { |
| 302 | .idle_supported = 1, |
| 303 | .suspend_supported = 1, |
| 304 | .idle_enabled = 1, |
| 305 | .suspend_enabled = 1, |
| 306 | .latency = 2, |
| 307 | .residency = 0, |
| 308 | }, |
| 309 | }; |
| 310 | |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 311 | static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = { |
Sravan Kumar Ambapuram | b22cf4d | 2012-01-02 21:45:04 +0530 | [diff] [blame] | 312 | .mode = MSM_PM_BOOT_CONFIG_RESET_VECTOR_PHYS, |
| 313 | .p_addr = 0, |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 314 | }; |
| 315 | |
Murali Nalajala | 4c996be | 2012-03-12 17:05:41 +0530 | [diff] [blame] | 316 | /* 8625 PM platform data */ |
| 317 | static struct msm_pm_platform_data msm8625_pm_data[MSM_PM_SLEEP_MODE_NR * 2] = { |
| 318 | /* CORE0 entries */ |
| 319 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 320 | .idle_supported = 1, |
| 321 | .suspend_supported = 1, |
| 322 | .idle_enabled = 0, |
| 323 | .suspend_enabled = 0, |
| 324 | .latency = 16000, |
| 325 | .residency = 20000, |
| 326 | }, |
| 327 | |
| 328 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = { |
| 329 | .idle_supported = 1, |
| 330 | .suspend_supported = 1, |
| 331 | .idle_enabled = 0, |
| 332 | .suspend_enabled = 0, |
| 333 | .latency = 12000, |
| 334 | .residency = 20000, |
| 335 | }, |
| 336 | |
| 337 | /* picked latency & redisdency values from 7x30 */ |
| 338 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 339 | .idle_supported = 1, |
| 340 | .suspend_supported = 1, |
| 341 | .idle_enabled = 0, |
| 342 | .suspend_enabled = 0, |
| 343 | .latency = 500, |
| 344 | .residency = 6000, |
| 345 | }, |
| 346 | |
| 347 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 348 | .idle_supported = 1, |
| 349 | .suspend_supported = 1, |
| 350 | .idle_enabled = 1, |
| 351 | .suspend_enabled = 1, |
| 352 | .latency = 2, |
| 353 | .residency = 10, |
| 354 | }, |
| 355 | |
| 356 | /* picked latency & redisdency values from 7x30 */ |
| 357 | [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 358 | .idle_supported = 1, |
| 359 | .suspend_supported = 1, |
| 360 | .idle_enabled = 0, |
| 361 | .suspend_enabled = 0, |
| 362 | .latency = 500, |
| 363 | .residency = 6000, |
| 364 | }, |
| 365 | |
| 366 | [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 367 | .idle_supported = 1, |
| 368 | .suspend_supported = 1, |
| 369 | .idle_enabled = 1, |
| 370 | .suspend_enabled = 1, |
| 371 | .latency = 2, |
| 372 | .residency = 10, |
| 373 | }, |
| 374 | |
| 375 | }; |
| 376 | |
| 377 | static struct msm_pm_boot_platform_data msm_pm_8625_boot_pdata __initdata = { |
| 378 | .mode = MSM_PM_BOOT_CONFIG_REMAP_BOOT_ADDR, |
| 379 | .v_addr = MSM_CFG_CTL_BASE, |
| 380 | }; |
| 381 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 382 | static struct android_pmem_platform_data android_pmem_adsp_pdata = { |
| 383 | .name = "pmem_adsp", |
| 384 | .allocator_type = PMEM_ALLOCATORTYPE_BITMAP, |
| 385 | .cached = 1, |
| 386 | .memory_type = MEMTYPE_EBI1, |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 387 | .request_region = request_fmem_c_region, |
| 388 | .release_region = release_fmem_c_region, |
| 389 | .reusable = 1, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 390 | }; |
| 391 | |
| 392 | static struct platform_device android_pmem_adsp_device = { |
| 393 | .name = "android_pmem", |
| 394 | .id = 1, |
| 395 | .dev = { .platform_data = &android_pmem_adsp_pdata }, |
| 396 | }; |
| 397 | |
| 398 | static unsigned pmem_mdp_size = MSM_PMEM_MDP_SIZE; |
| 399 | static int __init pmem_mdp_size_setup(char *p) |
| 400 | { |
| 401 | pmem_mdp_size = memparse(p, NULL); |
| 402 | return 0; |
| 403 | } |
| 404 | |
| 405 | early_param("pmem_mdp_size", pmem_mdp_size_setup); |
| 406 | |
| 407 | static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE; |
| 408 | static int __init pmem_adsp_size_setup(char *p) |
| 409 | { |
| 410 | pmem_adsp_size = memparse(p, NULL); |
| 411 | return 0; |
| 412 | } |
| 413 | |
| 414 | early_param("pmem_adsp_size", pmem_adsp_size_setup); |
| 415 | |
| 416 | #define SND(desc, num) { .name = #desc, .id = num } |
| 417 | static struct snd_endpoint snd_endpoints_list[] = { |
| 418 | SND(HANDSET, 0), |
| 419 | SND(MONO_HEADSET, 2), |
| 420 | SND(HEADSET, 3), |
| 421 | SND(SPEAKER, 6), |
| 422 | SND(TTY_HEADSET, 8), |
| 423 | SND(TTY_VCO, 9), |
| 424 | SND(TTY_HCO, 10), |
| 425 | SND(BT, 12), |
| 426 | SND(IN_S_SADC_OUT_HANDSET, 16), |
| 427 | SND(IN_S_SADC_OUT_SPEAKER_PHONE, 25), |
| 428 | SND(FM_DIGITAL_STEREO_HEADSET, 26), |
| 429 | SND(FM_DIGITAL_SPEAKER_PHONE, 27), |
| 430 | SND(FM_DIGITAL_BT_A2DP_HEADSET, 28), |
| 431 | SND(STEREO_HEADSET_AND_SPEAKER, 31), |
| 432 | SND(CURRENT, 0x7FFFFFFE), |
| 433 | SND(FM_ANALOG_STEREO_HEADSET, 35), |
| 434 | SND(FM_ANALOG_STEREO_HEADSET_CODEC, 36), |
| 435 | }; |
| 436 | #undef SND |
| 437 | |
| 438 | static struct msm_snd_endpoints msm_device_snd_endpoints = { |
| 439 | .endpoints = snd_endpoints_list, |
| 440 | .num = sizeof(snd_endpoints_list) / sizeof(struct snd_endpoint) |
| 441 | }; |
| 442 | |
| 443 | static struct platform_device msm_device_snd = { |
| 444 | .name = "msm_snd", |
| 445 | .id = -1, |
| 446 | .dev = { |
| 447 | .platform_data = &msm_device_snd_endpoints |
| 448 | }, |
| 449 | }; |
| 450 | |
| 451 | #define DEC0_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \ |
| 452 | (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \ |
| 453 | (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \ |
| 454 | (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \ |
| 455 | (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \ |
| 456 | (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP)) |
| 457 | #define DEC1_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \ |
| 458 | (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \ |
| 459 | (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \ |
| 460 | (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \ |
| 461 | (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \ |
| 462 | (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP)) |
| 463 | #define DEC2_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \ |
| 464 | (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \ |
| 465 | (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \ |
| 466 | (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \ |
| 467 | (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \ |
| 468 | (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP)) |
| 469 | #define DEC3_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \ |
| 470 | (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \ |
| 471 | (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \ |
| 472 | (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \ |
| 473 | (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \ |
| 474 | (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP)) |
| 475 | #define DEC4_FORMAT (1<<MSM_ADSP_CODEC_MIDI) |
| 476 | |
| 477 | static unsigned int dec_concurrency_table[] = { |
| 478 | /* Audio LP */ |
| 479 | (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DMA)), 0, |
| 480 | 0, 0, 0, |
| 481 | |
| 482 | /* Concurrency 1 */ |
| 483 | (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 484 | (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 485 | (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 486 | (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 487 | (DEC4_FORMAT), |
| 488 | |
| 489 | /* Concurrency 2 */ |
| 490 | (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 491 | (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 492 | (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 493 | (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 494 | (DEC4_FORMAT), |
| 495 | |
| 496 | /* Concurrency 3 */ |
| 497 | (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 498 | (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 499 | (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 500 | (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 501 | (DEC4_FORMAT), |
| 502 | |
| 503 | /* Concurrency 4 */ |
| 504 | (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 505 | (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 506 | (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 507 | (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 508 | (DEC4_FORMAT), |
| 509 | |
| 510 | /* Concurrency 5 */ |
| 511 | (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 512 | (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 513 | (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 514 | (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 515 | (DEC4_FORMAT), |
| 516 | |
| 517 | /* Concurrency 6 */ |
Chaithanya Krishna Bacharaju | 72ab89b | 2012-05-11 14:24:04 +0530 | [diff] [blame] | 518 | (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)| |
| 519 | (1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 520 | 0, 0, 0, 0, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 521 | |
| 522 | /* Concurrency 7 */ |
| 523 | (DEC0_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 524 | (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 525 | (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 526 | (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 527 | (DEC4_FORMAT), |
| 528 | }; |
| 529 | |
| 530 | #define DEC_INFO(name, queueid, decid, nr_codec) { .module_name = name, \ |
| 531 | .module_queueid = queueid, .module_decid = decid, \ |
| 532 | .nr_codec_support = nr_codec} |
| 533 | |
| 534 | static struct msm_adspdec_info dec_info_list[] = { |
| 535 | DEC_INFO("AUDPLAY0TASK", 13, 0, 11), /* AudPlay0BitStreamCtrlQueue */ |
| 536 | DEC_INFO("AUDPLAY1TASK", 14, 1, 11), /* AudPlay1BitStreamCtrlQueue */ |
| 537 | DEC_INFO("AUDPLAY2TASK", 15, 2, 11), /* AudPlay2BitStreamCtrlQueue */ |
| 538 | DEC_INFO("AUDPLAY3TASK", 16, 3, 11), /* AudPlay3BitStreamCtrlQueue */ |
| 539 | DEC_INFO("AUDPLAY4TASK", 17, 4, 1), /* AudPlay4BitStreamCtrlQueue */ |
| 540 | }; |
| 541 | |
| 542 | static struct msm_adspdec_database msm_device_adspdec_database = { |
| 543 | .num_dec = ARRAY_SIZE(dec_info_list), |
| 544 | .num_concurrency_support = (ARRAY_SIZE(dec_concurrency_table) / \ |
| 545 | ARRAY_SIZE(dec_info_list)), |
| 546 | .dec_concurrency_table = dec_concurrency_table, |
| 547 | .dec_info_list = dec_info_list, |
| 548 | }; |
| 549 | |
| 550 | static struct platform_device msm_device_adspdec = { |
| 551 | .name = "msm_adspdec", |
| 552 | .id = -1, |
| 553 | .dev = { |
| 554 | .platform_data = &msm_device_adspdec_database |
| 555 | }, |
| 556 | }; |
| 557 | |
| 558 | static struct android_pmem_platform_data android_pmem_audio_pdata = { |
| 559 | .name = "pmem_audio", |
| 560 | .allocator_type = PMEM_ALLOCATORTYPE_BITMAP, |
| 561 | .cached = 0, |
| 562 | .memory_type = MEMTYPE_EBI1, |
| 563 | }; |
| 564 | |
| 565 | static struct platform_device android_pmem_audio_device = { |
| 566 | .name = "android_pmem", |
| 567 | .id = 2, |
| 568 | .dev = { .platform_data = &android_pmem_audio_pdata }, |
| 569 | }; |
| 570 | |
| 571 | static struct android_pmem_platform_data android_pmem_pdata = { |
| 572 | .name = "pmem", |
| 573 | .allocator_type = PMEM_ALLOCATORTYPE_BITMAP, |
| 574 | .cached = 1, |
| 575 | .memory_type = MEMTYPE_EBI1, |
| 576 | }; |
| 577 | static struct platform_device android_pmem_device = { |
| 578 | .name = "android_pmem", |
| 579 | .id = 0, |
| 580 | .dev = { .platform_data = &android_pmem_pdata }, |
| 581 | }; |
| 582 | |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 583 | static u32 msm_calculate_batt_capacity(u32 current_voltage); |
| 584 | |
| 585 | static struct msm_psy_batt_pdata msm_psy_batt_data = { |
Krishna Vanka | 9a265e1 | 2012-06-04 23:24:26 +0530 | [diff] [blame] | 586 | .voltage_min_design = 3200, |
| 587 | .voltage_max_design = 4200, |
| 588 | .voltage_fail_safe = 3340, |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 589 | .avail_chg_sources = AC_CHG | USB_CHG , |
| 590 | .batt_technology = POWER_SUPPLY_TECHNOLOGY_LION, |
| 591 | .calculate_capacity = &msm_calculate_batt_capacity, |
| 592 | }; |
| 593 | |
| 594 | static u32 msm_calculate_batt_capacity(u32 current_voltage) |
| 595 | { |
| 596 | u32 low_voltage = msm_psy_batt_data.voltage_min_design; |
| 597 | u32 high_voltage = msm_psy_batt_data.voltage_max_design; |
| 598 | |
Krishna Vanka | b349469 | 2012-06-12 15:06:43 +0530 | [diff] [blame] | 599 | if (current_voltage <= low_voltage) |
| 600 | return 0; |
| 601 | else if (current_voltage >= high_voltage) |
| 602 | return 100; |
| 603 | else |
| 604 | return (current_voltage - low_voltage) * 100 |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 605 | / (high_voltage - low_voltage); |
| 606 | } |
| 607 | |
| 608 | static struct platform_device msm_batt_device = { |
| 609 | .name = "msm-battery", |
| 610 | .id = -1, |
| 611 | .dev.platform_data = &msm_psy_batt_data, |
| 612 | }; |
| 613 | |
Siddartha Mohanadoss | bc2103f | 2012-03-20 11:41:48 -0700 | [diff] [blame] | 614 | static char *msm_adc_surf_device_names[] = { |
| 615 | "XO_ADC", |
| 616 | }; |
| 617 | |
| 618 | static struct msm_adc_platform_data msm_adc_pdata = { |
| 619 | .dev_names = msm_adc_surf_device_names, |
| 620 | .num_adc = ARRAY_SIZE(msm_adc_surf_device_names), |
| 621 | .target_hw = MSM_8x25, |
| 622 | }; |
| 623 | |
| 624 | static struct platform_device msm_adc_device = { |
| 625 | .name = "msm_adc", |
| 626 | .id = -1, |
| 627 | .dev = { |
| 628 | .platform_data = &msm_adc_pdata, |
| 629 | }, |
| 630 | }; |
| 631 | |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 632 | static struct fmem_platform_data fmem_pdata; |
| 633 | |
| 634 | static struct platform_device fmem_device = { |
| 635 | .name = "fmem", |
| 636 | .id = 1, |
| 637 | .dev = { .platform_data = &fmem_pdata }, |
| 638 | }; |
| 639 | |
Trilok Soni | 0ed9c4a | 2012-05-22 17:54:32 +0530 | [diff] [blame] | 640 | #define GPIO_VREG_INIT(_id, _reg_name, _gpio_label, _gpio, _active_low) \ |
| 641 | [GPIO_VREG_ID_##_id] = { \ |
| 642 | .init_data = { \ |
| 643 | .constraints = { \ |
| 644 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ |
| 645 | }, \ |
| 646 | .num_consumer_supplies = \ |
| 647 | ARRAY_SIZE(vreg_consumers_##_id), \ |
| 648 | .consumer_supplies = vreg_consumers_##_id, \ |
| 649 | }, \ |
| 650 | .regulator_name = _reg_name, \ |
| 651 | .active_low = _active_low, \ |
| 652 | .gpio_label = _gpio_label, \ |
| 653 | .gpio = _gpio, \ |
| 654 | } |
| 655 | |
| 656 | #define GPIO_VREG_ID_EXT_2P85V 0 |
| 657 | #define GPIO_VREG_ID_EXT_1P8V 1 |
| 658 | |
| 659 | static struct regulator_consumer_supply vreg_consumers_EXT_2P85V[] = { |
Raju P.L.S.S.S.N | 4d01b2c | 2012-06-13 20:13:27 +0530 | [diff] [blame] | 660 | REGULATOR_SUPPLY("cam_ov5647_avdd", "0-006c"), |
| 661 | REGULATOR_SUPPLY("cam_ov7692_avdd", "0-0078"), |
| 662 | REGULATOR_SUPPLY("cam_ov8825_avdd", "0-000d"), |
Trilok Soni | 0ed9c4a | 2012-05-22 17:54:32 +0530 | [diff] [blame] | 663 | REGULATOR_SUPPLY("lcd_vdd", "mipi_dsi.1"), |
| 664 | }; |
| 665 | |
| 666 | static struct regulator_consumer_supply vreg_consumers_EXT_1P8V[] = { |
Raju P.L.S.S.S.N | 4d01b2c | 2012-06-13 20:13:27 +0530 | [diff] [blame] | 667 | REGULATOR_SUPPLY("cam_ov5647_vdd", "0-006c"), |
| 668 | REGULATOR_SUPPLY("cam_ov7692_vdd", "0-0078"), |
| 669 | REGULATOR_SUPPLY("cam_ov8825_vdd", "0-000d"), |
Trilok Soni | 0ed9c4a | 2012-05-22 17:54:32 +0530 | [diff] [blame] | 670 | REGULATOR_SUPPLY("lcd_vddi", "mipi_dsi.1"), |
| 671 | }; |
| 672 | |
| 673 | /* GPIO regulator constraints */ |
| 674 | static struct gpio_regulator_platform_data msm_gpio_regulator_pdata[] = { |
| 675 | GPIO_VREG_INIT(EXT_2P85V, "ext_2p85v", "ext_2p85v_en", 35, 0), |
| 676 | GPIO_VREG_INIT(EXT_1P8V, "ext_1p8v", "ext_1p8v_en", 40, 0), |
| 677 | }; |
| 678 | |
| 679 | /* GPIO regulator */ |
| 680 | static struct platform_device qrd_msm8625_vreg_gpio_ext_2p85v __devinitdata = { |
| 681 | .name = GPIO_REGULATOR_DEV_NAME, |
| 682 | .id = 35, |
| 683 | .dev = { |
| 684 | .platform_data = |
| 685 | &msm_gpio_regulator_pdata[GPIO_VREG_ID_EXT_2P85V], |
| 686 | }, |
| 687 | }; |
| 688 | |
| 689 | static struct platform_device qrd_msm8625_vreg_gpio_ext_1p8v __devinitdata = { |
| 690 | .name = GPIO_REGULATOR_DEV_NAME, |
| 691 | .id = 40, |
| 692 | .dev = { |
| 693 | .platform_data = |
| 694 | &msm_gpio_regulator_pdata[GPIO_VREG_ID_EXT_1P8V], |
| 695 | }, |
| 696 | }; |
| 697 | |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 698 | static struct platform_device *common_devices[] __initdata = { |
| 699 | &android_usb_device, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 700 | &android_pmem_device, |
| 701 | &android_pmem_adsp_device, |
| 702 | &android_pmem_audio_device, |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 703 | &msm_batt_device, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 704 | &msm_device_adspdec, |
| 705 | &msm_device_snd, |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 706 | &asoc_msm_pcm, |
| 707 | &asoc_msm_dai0, |
| 708 | &asoc_msm_dai1, |
Siddartha Mohanadoss | bc2103f | 2012-03-20 11:41:48 -0700 | [diff] [blame] | 709 | &msm_adc_device, |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 710 | &fmem_device, |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 711 | }; |
| 712 | |
| 713 | static struct platform_device *qrd7627a_devices[] __initdata = { |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 714 | &msm_device_dmov, |
| 715 | &msm_device_smd, |
| 716 | &msm_device_uart1, |
| 717 | &msm_device_uart_dm1, |
| 718 | &msm_gsbi0_qup_i2c_device, |
| 719 | &msm_gsbi1_qup_i2c_device, |
| 720 | &msm_device_otg, |
| 721 | &msm_device_gadget_peripheral, |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 722 | &msm_kgsl_3d0, |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 723 | }; |
| 724 | |
Chintan Pandya | b1bad0e | 2012-02-06 19:04:51 +0530 | [diff] [blame] | 725 | static struct platform_device *qrd3_devices[] __initdata = { |
| 726 | &msm_device_nand, |
| 727 | }; |
| 728 | |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 729 | static struct platform_device *msm8625_evb_devices[] __initdata = { |
| 730 | &msm8625_device_dmov, |
| 731 | &msm8625_device_smd, |
| 732 | &msm8625_gsbi0_qup_i2c_device, |
| 733 | &msm8625_gsbi1_qup_i2c_device, |
| 734 | &msm8625_device_uart1, |
Ram Mohan Korukonda | 5ee9fb8 | 2012-03-09 12:10:01 +0530 | [diff] [blame] | 735 | &msm8625_device_uart_dm1, |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 736 | &msm8625_device_otg, |
| 737 | &msm8625_device_gadget_peripheral, |
Aparna Mallavarapu | d95d8fc | 2012-03-08 12:07:37 +0530 | [diff] [blame] | 738 | &msm8625_kgsl_3d0, |
Trilok Soni | 0ed9c4a | 2012-05-22 17:54:32 +0530 | [diff] [blame] | 739 | &qrd_msm8625_vreg_gpio_ext_2p85v, |
| 740 | &qrd_msm8625_vreg_gpio_ext_1p8v, |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 741 | }; |
| 742 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 743 | static unsigned pmem_kernel_ebi1_size = PMEM_KERNEL_EBI1_SIZE; |
| 744 | static int __init pmem_kernel_ebi1_size_setup(char *p) |
| 745 | { |
| 746 | pmem_kernel_ebi1_size = memparse(p, NULL); |
| 747 | return 0; |
| 748 | } |
| 749 | early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup); |
| 750 | |
| 751 | static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE; |
| 752 | static int __init pmem_audio_size_setup(char *p) |
| 753 | { |
| 754 | pmem_audio_size = memparse(p, NULL); |
| 755 | return 0; |
| 756 | } |
| 757 | early_param("pmem_audio_size", pmem_audio_size_setup); |
| 758 | |
| 759 | static struct memtype_reserve msm7627a_reserve_table[] __initdata = { |
| 760 | [MEMTYPE_SMI] = { |
| 761 | }, |
| 762 | [MEMTYPE_EBI0] = { |
| 763 | .flags = MEMTYPE_FLAGS_1M_ALIGN, |
| 764 | }, |
| 765 | [MEMTYPE_EBI1] = { |
| 766 | .flags = MEMTYPE_FLAGS_1M_ALIGN, |
| 767 | }, |
| 768 | }; |
| 769 | |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 770 | #ifdef CONFIG_ANDROID_PMEM |
| 771 | static struct android_pmem_platform_data *pmem_pdata_array[] __initdata = { |
| 772 | &android_pmem_adsp_pdata, |
| 773 | &android_pmem_audio_pdata, |
| 774 | &android_pmem_pdata, |
| 775 | }; |
| 776 | #endif |
| 777 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 778 | static void __init size_pmem_devices(void) |
| 779 | { |
| 780 | #ifdef CONFIG_ANDROID_PMEM |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 781 | unsigned int i; |
| 782 | unsigned int reusable_count = 0; |
| 783 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 784 | android_pmem_adsp_pdata.size = pmem_adsp_size; |
| 785 | android_pmem_pdata.size = pmem_mdp_size; |
| 786 | android_pmem_audio_pdata.size = pmem_audio_size; |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 787 | |
| 788 | fmem_pdata.size = 0; |
| 789 | fmem_pdata.align = PAGE_SIZE; |
| 790 | |
| 791 | /* Find pmem devices that should use FMEM (reusable) memory. |
| 792 | */ |
| 793 | for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i) { |
| 794 | struct android_pmem_platform_data *pdata = pmem_pdata_array[i]; |
| 795 | |
| 796 | if (!reusable_count && pdata->reusable) |
| 797 | fmem_pdata.size += pdata->size; |
| 798 | |
| 799 | reusable_count += (pdata->reusable) ? 1 : 0; |
| 800 | |
| 801 | if (pdata->reusable && reusable_count > 1) { |
| 802 | pr_err("%s: Too many PMEM devices specified as reusable. PMEM device %s was not configured as reusable.\n", |
| 803 | __func__, pdata->name); |
| 804 | pdata->reusable = 0; |
| 805 | } |
| 806 | } |
| 807 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 808 | #endif |
| 809 | } |
| 810 | |
| 811 | static void __init reserve_memory_for(struct android_pmem_platform_data *p) |
| 812 | { |
| 813 | msm7627a_reserve_table[p->memory_type].size += p->size; |
| 814 | } |
| 815 | |
| 816 | static void __init reserve_pmem_memory(void) |
| 817 | { |
| 818 | #ifdef CONFIG_ANDROID_PMEM |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 819 | unsigned int i; |
| 820 | for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i) |
| 821 | reserve_memory_for(pmem_pdata_array[i]); |
| 822 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 823 | msm7627a_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size; |
| 824 | #endif |
| 825 | } |
| 826 | |
| 827 | static void __init msm7627a_calculate_reserve_sizes(void) |
| 828 | { |
| 829 | size_pmem_devices(); |
| 830 | reserve_pmem_memory(); |
| 831 | } |
| 832 | |
| 833 | static int msm7627a_paddr_to_memtype(unsigned int paddr) |
| 834 | { |
| 835 | return MEMTYPE_EBI1; |
| 836 | } |
| 837 | |
| 838 | static struct reserve_info msm7627a_reserve_info __initdata = { |
| 839 | .memtype_reserve_table = msm7627a_reserve_table, |
| 840 | .calculate_reserve_sizes = msm7627a_calculate_reserve_sizes, |
| 841 | .paddr_to_memtype = msm7627a_paddr_to_memtype, |
| 842 | }; |
| 843 | |
| 844 | static void __init msm7627a_reserve(void) |
| 845 | { |
| 846 | reserve_info = &msm7627a_reserve_info; |
| 847 | msm_reserve(); |
| 848 | memblock_remove(MSM8625_WARM_BOOT_PHYS, SZ_32); |
| 849 | } |
| 850 | |
| 851 | static void __init msm8625_reserve(void) |
| 852 | { |
| 853 | memblock_remove(MSM8625_SECONDARY_PHYS, SZ_8); |
| 854 | msm7627a_reserve(); |
| 855 | } |
| 856 | |
| 857 | static void msmqrd_adsp_add_pdev(void) |
| 858 | { |
| 859 | int rc = 0; |
| 860 | struct rpc_board_dev *rpc_adsp_pdev; |
| 861 | |
| 862 | rpc_adsp_pdev = kzalloc(sizeof(struct rpc_board_dev), GFP_KERNEL); |
| 863 | if (rpc_adsp_pdev == NULL) { |
| 864 | pr_err("%s: Memory Allocation failure\n", __func__); |
| 865 | return; |
| 866 | } |
| 867 | rpc_adsp_pdev->prog = ADSP_RPC_PROG; |
| 868 | |
| 869 | if (cpu_is_msm8625()) |
| 870 | rpc_adsp_pdev->pdev = msm8625_device_adsp; |
| 871 | else |
| 872 | rpc_adsp_pdev->pdev = msm_adsp_device; |
| 873 | rc = msm_rpc_add_board_dev(rpc_adsp_pdev, 1); |
| 874 | if (rc < 0) { |
| 875 | pr_err("%s: return val: %d\n", __func__, rc); |
| 876 | kfree(rpc_adsp_pdev); |
| 877 | } |
| 878 | } |
| 879 | |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 880 | static void __init msm7627a_device_i2c_init(void) |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 881 | { |
| 882 | msm_gsbi0_qup_i2c_device.dev.platform_data = &msm_gsbi0_qup_i2c_pdata; |
| 883 | msm_gsbi1_qup_i2c_device.dev.platform_data = &msm_gsbi1_qup_i2c_pdata; |
| 884 | } |
| 885 | |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 886 | static void __init msm8625_device_i2c_init(void) |
| 887 | { |
| 888 | msm8625_gsbi0_qup_i2c_device.dev.platform_data |
| 889 | = &msm_gsbi0_qup_i2c_pdata; |
| 890 | msm8625_gsbi1_qup_i2c_device.dev.platform_data |
| 891 | = &msm_gsbi1_qup_i2c_pdata; |
| 892 | } |
| 893 | |
Pankaj Kumar | 3cec058 | 2011-11-18 11:13:29 +0530 | [diff] [blame] | 894 | static struct platform_device msm_proccomm_regulator_dev = { |
| 895 | .name = PROCCOMM_REGULATOR_DEV_NAME, |
| 896 | .id = -1, |
| 897 | .dev = { |
| 898 | .platform_data = &msm7x27a_proccomm_regulator_data |
| 899 | } |
| 900 | }; |
| 901 | |
| 902 | static void __init msm7627a_init_regulators(void) |
| 903 | { |
| 904 | int rc = platform_device_register(&msm_proccomm_regulator_dev); |
| 905 | if (rc) |
| 906 | pr_err("%s: could not register regulator device: %d\n", |
| 907 | __func__, rc); |
| 908 | } |
| 909 | |
Santosh Sajjan | 374d659 | 2012-01-19 23:16:46 +0530 | [diff] [blame] | 910 | static int __init msm_qrd_init_ar6000pm(void) |
| 911 | { |
| 912 | msm_wlan_ar6000_pm_device.dev.platform_data = &ar600x_wlan_power; |
| 913 | return platform_device_register(&msm_wlan_ar6000_pm_device); |
| 914 | } |
| 915 | |
Taniya Das | e380a2d | 2012-03-09 13:02:41 +0530 | [diff] [blame] | 916 | static void __init msm_add_footswitch_devices(void) |
| 917 | { |
| 918 | platform_add_devices(msm_footswitch_devices, |
| 919 | msm_num_footswitch_devices); |
| 920 | } |
| 921 | |
Stephen Boyd | 668d765 | 2012-04-25 11:31:01 -0700 | [diff] [blame] | 922 | static void __init add_platform_devices(void) |
Chintan Pandya | b1bad0e | 2012-02-06 19:04:51 +0530 | [diff] [blame] | 923 | { |
Aparna Mallavarapu | 5a32624 | 2012-05-09 19:49:02 +0530 | [diff] [blame] | 924 | if (machine_is_msm8625_evb() || machine_is_msm8625_qrd7() |
| 925 | || machine_is_msm8625_evt()) { |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 926 | platform_add_devices(msm8625_evb_devices, |
| 927 | ARRAY_SIZE(msm8625_evb_devices)); |
Aparna Mallavarapu | beafcbc | 2012-03-13 16:57:39 +0530 | [diff] [blame] | 928 | platform_add_devices(qrd3_devices, |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 929 | ARRAY_SIZE(qrd3_devices)); |
Aparna Mallavarapu | beafcbc | 2012-03-13 16:57:39 +0530 | [diff] [blame] | 930 | } else { |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 931 | platform_add_devices(qrd7627a_devices, |
| 932 | ARRAY_SIZE(qrd7627a_devices)); |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 933 | } |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 934 | |
Aparna Mallavarapu | 0b69ca2 | 2012-03-26 15:58:35 +0530 | [diff] [blame] | 935 | if (machine_is_msm7627a_qrd3() || machine_is_msm7627a_evb()) |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 936 | platform_add_devices(qrd3_devices, |
Aparna Mallavarapu | 0b69ca2 | 2012-03-26 15:58:35 +0530 | [diff] [blame] | 937 | ARRAY_SIZE(qrd3_devices)); |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 938 | |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 939 | platform_add_devices(common_devices, |
| 940 | ARRAY_SIZE(common_devices)); |
Chintan Pandya | b1bad0e | 2012-02-06 19:04:51 +0530 | [diff] [blame] | 941 | } |
| 942 | |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 943 | #define UART1DM_RX_GPIO 45 |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 944 | static void __init qrd7627a_uart1dm_config(void) |
| 945 | { |
| 946 | msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO); |
| 947 | if (cpu_is_msm8625()) |
| 948 | msm8625_device_uart_dm1.dev.platform_data = |
| 949 | &msm_uart_dm1_pdata; |
| 950 | else |
| 951 | msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; |
| 952 | } |
| 953 | |
| 954 | static void __init qrd7627a_otg_gadget(void) |
| 955 | { |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 956 | if (cpu_is_msm8625()) { |
Murali Nalajala | 6ff8fb1 | 2012-05-02 18:50:50 +0530 | [diff] [blame] | 957 | msm_otg_pdata.swfi_latency = msm8625_pm_data |
| 958 | [MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT].latency; |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 959 | msm8625_device_otg.dev.platform_data = &msm_otg_pdata; |
| 960 | msm8625_device_gadget_peripheral.dev.platform_data = |
| 961 | &msm_gadget_pdata; |
| 962 | |
| 963 | } else { |
Murali Nalajala | 6ff8fb1 | 2012-05-02 18:50:50 +0530 | [diff] [blame] | 964 | msm_otg_pdata.swfi_latency = msm7627a_pm_data |
| 965 | [MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency; |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 966 | msm_device_otg.dev.platform_data = &msm_otg_pdata; |
| 967 | msm_device_gadget_peripheral.dev.platform_data = |
| 968 | &msm_gadget_pdata; |
| 969 | } |
| 970 | } |
| 971 | |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 972 | static void __init msm_pm_init(void) |
| 973 | { |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 974 | |
Aparna Mallavarapu | 6d969eb | 2012-04-03 15:10:25 +0530 | [diff] [blame] | 975 | if (!cpu_is_msm8625()) { |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 976 | msm_pm_set_platform_data(msm7627a_pm_data, |
| 977 | ARRAY_SIZE(msm7627a_pm_data)); |
| 978 | BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata)); |
| 979 | } else { |
| 980 | msm_pm_set_platform_data(msm8625_pm_data, |
| 981 | ARRAY_SIZE(msm8625_pm_data)); |
| 982 | BUG_ON(msm_pm_boot_init(&msm_pm_8625_boot_pdata)); |
| 983 | msm8x25_spm_device_init(); |
| 984 | } |
| 985 | } |
| 986 | |
Taniya Das | c868a2e | 2012-01-03 10:18:47 +0530 | [diff] [blame] | 987 | static void __init msm_qrd_init(void) |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 988 | { |
| 989 | msm7x2x_misc_init(); |
Pankaj Kumar | 3cec058 | 2011-11-18 11:13:29 +0530 | [diff] [blame] | 990 | msm7627a_init_regulators(); |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 991 | msmqrd_adsp_add_pdev(); |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 992 | |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 993 | if (cpu_is_msm8625()) |
| 994 | msm8625_device_i2c_init(); |
| 995 | else |
| 996 | msm7627a_device_i2c_init(); |
| 997 | |
| 998 | /* uart1dm*/ |
| 999 | qrd7627a_uart1dm_config(); |
| 1000 | /*OTG gadget*/ |
| 1001 | qrd7627a_otg_gadget(); |
Taniya Das | c868a2e | 2012-01-03 10:18:47 +0530 | [diff] [blame] | 1002 | |
Taniya Das | e380a2d | 2012-03-09 13:02:41 +0530 | [diff] [blame] | 1003 | msm_add_footswitch_devices(); |
Chintan Pandya | b1bad0e | 2012-02-06 19:04:51 +0530 | [diff] [blame] | 1004 | add_platform_devices(); |
Taniya Das | c868a2e | 2012-01-03 10:18:47 +0530 | [diff] [blame] | 1005 | |
Santosh Sajjan | 374d659 | 2012-01-19 23:16:46 +0530 | [diff] [blame] | 1006 | /* Ensure ar6000pm device is registered before MMC/SDC */ |
| 1007 | msm_qrd_init_ar6000pm(); |
Chintan Pandya | cf467fc | 2011-12-01 17:11:11 +0530 | [diff] [blame] | 1008 | msm7627a_init_mmc(); |
| 1009 | |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 1010 | #ifdef CONFIG_USB_EHCI_MSM_72K |
| 1011 | msm7627a_init_host(); |
| 1012 | #endif |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 1013 | msm_pm_init(); |
Murali Nalajala | a182784 | 2011-11-13 14:12:39 +0530 | [diff] [blame] | 1014 | |
Murali Nalajala | 2a0bbda | 2012-03-28 12:12:54 +0530 | [diff] [blame] | 1015 | msm_pm_register_irqs(); |
Taniya Das | 0a5303a | 2011-08-23 18:47:48 +0530 | [diff] [blame] | 1016 | msm_fb_add_devices(); |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 1017 | |
| 1018 | #if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE) |
Chintan Pandya | 13490c0 | 2011-12-20 13:03:36 +0530 | [diff] [blame] | 1019 | msm7627a_bt_power_init(); |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 1020 | #endif |
Taniya Das | da40882 | 2011-09-06 12:54:06 +0530 | [diff] [blame] | 1021 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1022 | msm7627a_camera_init(); |
Chintan Pandya | 0d45319 | 2012-03-09 13:20:33 +0530 | [diff] [blame] | 1023 | qrd7627a_add_io_devices(); |
Aparna Mallavarapu | d95d8fc | 2012-03-08 12:07:37 +0530 | [diff] [blame] | 1024 | msm7x25a_kgsl_3d0_init(); |
Sudhakara Rao Tentu | 38ad6e1 | 2012-03-30 15:25:18 -0700 | [diff] [blame] | 1025 | msm8x25_kgsl_3d0_init(); |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 1026 | } |
| 1027 | |
| 1028 | static void __init qrd7627a_init_early(void) |
| 1029 | { |
| 1030 | msm_msm7627a_allocate_memory_regions(); |
| 1031 | } |
| 1032 | |
| 1033 | MACHINE_START(MSM7627A_QRD1, "QRD MSM7627a QRD1") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1034 | .atag_offset = 0x100, |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 1035 | .map_io = msm_common_io_init, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1036 | .reserve = msm7627a_reserve, |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 1037 | .init_irq = msm_init_irq, |
Taniya Das | c868a2e | 2012-01-03 10:18:47 +0530 | [diff] [blame] | 1038 | .init_machine = msm_qrd_init, |
| 1039 | .timer = &msm_timer, |
| 1040 | .init_early = qrd7627a_init_early, |
| 1041 | .handle_irq = vic_handle_irq, |
| 1042 | MACHINE_END |
Chintan Pandya | b1bad0e | 2012-02-06 19:04:51 +0530 | [diff] [blame] | 1043 | MACHINE_START(MSM7627A_QRD3, "QRD MSM7627a QRD3") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1044 | .atag_offset = 0x100, |
Chintan Pandya | b1bad0e | 2012-02-06 19:04:51 +0530 | [diff] [blame] | 1045 | .map_io = msm_common_io_init, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1046 | .reserve = msm7627a_reserve, |
Chintan Pandya | b1bad0e | 2012-02-06 19:04:51 +0530 | [diff] [blame] | 1047 | .init_irq = msm_init_irq, |
| 1048 | .init_machine = msm_qrd_init, |
| 1049 | .timer = &msm_timer, |
| 1050 | .init_early = qrd7627a_init_early, |
| 1051 | .handle_irq = vic_handle_irq, |
| 1052 | MACHINE_END |
Taniya Das | c868a2e | 2012-01-03 10:18:47 +0530 | [diff] [blame] | 1053 | MACHINE_START(MSM7627A_EVB, "QRD MSM7627a EVB") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1054 | .atag_offset = 0x100, |
Taniya Das | c868a2e | 2012-01-03 10:18:47 +0530 | [diff] [blame] | 1055 | .map_io = msm_common_io_init, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1056 | .reserve = msm7627a_reserve, |
Taniya Das | c868a2e | 2012-01-03 10:18:47 +0530 | [diff] [blame] | 1057 | .init_irq = msm_init_irq, |
| 1058 | .init_machine = msm_qrd_init, |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 1059 | .timer = &msm_timer, |
| 1060 | .init_early = qrd7627a_init_early, |
Pankaj Kumar | bf8a2a3 | 2011-10-21 11:47:21 +0530 | [diff] [blame] | 1061 | .handle_irq = vic_handle_irq, |
Taniya Das | c98bfbc | 2011-08-23 09:58:55 +0530 | [diff] [blame] | 1062 | MACHINE_END |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 1063 | MACHINE_START(MSM8625_EVB, "QRD MSM8625 EVB") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1064 | .atag_offset = 0x100, |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 1065 | .map_io = msm8625_map_io, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1066 | .reserve = msm8625_reserve, |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 1067 | .init_irq = msm8625_init_irq, |
| 1068 | .init_machine = msm_qrd_init, |
| 1069 | .timer = &msm_timer, |
| 1070 | .init_early = qrd7627a_init_early, |
| 1071 | .handle_irq = gic_handle_irq, |
| 1072 | MACHINE_END |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 1073 | MACHINE_START(MSM8625_QRD7, "QRD MSM8625 QRD7") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1074 | .atag_offset = 0x100, |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 1075 | .map_io = msm8625_map_io, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1076 | .reserve = msm8625_reserve, |
Taniya Das | bd09654 | 2012-03-15 17:43:45 +0530 | [diff] [blame] | 1077 | .init_irq = msm8625_init_irq, |
| 1078 | .init_machine = msm_qrd_init, |
| 1079 | .timer = &msm_timer, |
| 1080 | .init_early = qrd7627a_init_early, |
| 1081 | .handle_irq = gic_handle_irq, |
| 1082 | MACHINE_END |
Aparna Mallavarapu | 5a32624 | 2012-05-09 19:49:02 +0530 | [diff] [blame] | 1083 | MACHINE_START(MSM8625_EVT, "QRD MSM8625 EVT") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1084 | .atag_offset = 0x100, |
Aparna Mallavarapu | 5a32624 | 2012-05-09 19:49:02 +0530 | [diff] [blame] | 1085 | .map_io = msm8625_map_io, |
| 1086 | .reserve = msm8625_reserve, |
| 1087 | .init_irq = msm8625_init_irq, |
| 1088 | .init_machine = msm_qrd_init, |
| 1089 | .timer = &msm_timer, |
| 1090 | .init_early = qrd7627a_init_early, |
| 1091 | .handle_irq = gic_handle_irq, |
| 1092 | MACHINE_END |