Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 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/platform_device.h> |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 15 | #include <linux/i2c.h> |
Kenneth Heitke | af3d3cf | 2011-09-08 11:45:31 -0700 | [diff] [blame] | 16 | #include <linux/msm_ssbi.h> |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 17 | #include <linux/memblock.h> |
Rohit Vaswani | a681589 | 2011-12-15 20:20:39 -0800 | [diff] [blame^] | 18 | #include <linux/usb/android.h> |
| 19 | #include <linux/usb/msm_hsusb.h> |
| 20 | #include <linux/mfd/pm8xxx/pm8xxx-adc.h> |
| 21 | #include <linux/leds.h> |
| 22 | #include <linux/leds-pm8xxx.h> |
| 23 | #include <linux/power/ltc4088-charger.h> |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 24 | #include <asm/mach-types.h> |
| 25 | #include <asm/mach/arch.h> |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 26 | #include <asm/mach/mmc.h> |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 27 | #include <mach/board.h> |
| 28 | #include <mach/msm_iomap.h> |
| 29 | #include <mach/gpio.h> |
Harini Jayaraman | 738c931 | 2011-09-08 15:22:38 -0600 | [diff] [blame] | 30 | #include <mach/msm_spi.h> |
Gagan Mac | 7a82764 | 2011-09-22 19:42:21 -0600 | [diff] [blame] | 31 | #include <mach/msm_bus_board.h> |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 32 | #include "timer.h" |
| 33 | #include "devices.h" |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 34 | #include "board-9615.h" |
Maheshkumar Sivasubramanian | 4923db2 | 2011-09-15 09:28:15 -0600 | [diff] [blame] | 35 | #include "cpuidle.h" |
| 36 | #include "pm.h" |
Vikram Mulukutla | b5e1cda | 2011-10-04 16:17:22 -0700 | [diff] [blame] | 37 | #include "acpuclock.h" |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 38 | #include "pm-boot.h" |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 39 | |
Siddartha Mohanadoss | 5f60b45 | 2011-10-05 11:49:00 -0700 | [diff] [blame] | 40 | static struct pm8xxx_adc_amux pm8018_adc_channels_data[] = { |
| 41 | {"vcoin", CHANNEL_VCOIN, CHAN_PATH_SCALING2, AMUX_RSV1, |
| 42 | ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT}, |
| 43 | {"vbat", CHANNEL_VBAT, CHAN_PATH_SCALING2, AMUX_RSV1, |
| 44 | ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT}, |
| 45 | {"vph_pwr", CHANNEL_VPH_PWR, CHAN_PATH_SCALING2, AMUX_RSV1, |
| 46 | ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT}, |
| 47 | {"batt_therm", CHANNEL_BATT_THERM, CHAN_PATH_SCALING1, AMUX_RSV2, |
| 48 | ADC_DECIMATION_TYPE2, ADC_SCALE_BATT_THERM}, |
| 49 | {"batt_id", CHANNEL_BATT_ID, CHAN_PATH_SCALING1, AMUX_RSV2, |
| 50 | ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT}, |
| 51 | {"pmic_therm", CHANNEL_DIE_TEMP, CHAN_PATH_SCALING1, AMUX_RSV1, |
| 52 | ADC_DECIMATION_TYPE2, ADC_SCALE_PMIC_THERM}, |
| 53 | {"625mv", CHANNEL_625MV, CHAN_PATH_SCALING1, AMUX_RSV1, |
| 54 | ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT}, |
| 55 | {"125v", CHANNEL_125V, CHAN_PATH_SCALING1, AMUX_RSV1, |
| 56 | ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT}, |
| 57 | {"pa_therm0", ADC_MPP_1_AMUX3, CHAN_PATH_SCALING1, AMUX_RSV1, |
| 58 | ADC_DECIMATION_TYPE2, ADC_SCALE_PA_THERM}, |
| 59 | }; |
| 60 | |
| 61 | static struct pm8xxx_adc_properties pm8018_adc_data = { |
| 62 | .adc_vdd_reference = 1800, /* milli-voltage for this adc */ |
| 63 | .bitresolution = 15, |
| 64 | .bipolar = 0, |
| 65 | }; |
| 66 | |
| 67 | static struct pm8xxx_adc_platform_data pm8018_adc_pdata = { |
| 68 | .adc_channel = pm8018_adc_channels_data, |
| 69 | .adc_num_board_channel = ARRAY_SIZE(pm8018_adc_channels_data), |
| 70 | .adc_prop = &pm8018_adc_data, |
| 71 | }; |
| 72 | |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 73 | static struct pm8xxx_irq_platform_data pm8xxx_irq_pdata __devinitdata = { |
| 74 | .irq_base = PM8018_IRQ_BASE, |
| 75 | .devirq = MSM_GPIO_TO_INT(87), |
| 76 | .irq_trigger_flag = IRQF_TRIGGER_LOW, |
| 77 | }; |
| 78 | |
| 79 | static struct pm8xxx_gpio_platform_data pm8xxx_gpio_pdata __devinitdata = { |
| 80 | .gpio_base = PM8018_GPIO_PM_TO_SYS(1), |
| 81 | }; |
| 82 | |
| 83 | static struct pm8xxx_mpp_platform_data pm8xxx_mpp_pdata __devinitdata = { |
| 84 | .mpp_base = PM8018_MPP_PM_TO_SYS(1), |
| 85 | }; |
| 86 | |
| 87 | static struct pm8xxx_rtc_platform_data pm8xxx_rtc_pdata __devinitdata = { |
| 88 | .rtc_write_enable = false, |
Ashay Jaiswal | db5e6dc | 2011-10-12 11:02:47 +0530 | [diff] [blame] | 89 | .rtc_alarm_powerup = false, |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 90 | }; |
| 91 | |
| 92 | static struct pm8xxx_pwrkey_platform_data pm8xxx_pwrkey_pdata = { |
| 93 | .pull_up = 1, |
Jing Lin | eecdc06 | 2011-11-17 09:47:09 -0800 | [diff] [blame] | 94 | .kpd_trigger_delay_us = 15625, |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 95 | .wakeup = 1, |
| 96 | }; |
| 97 | |
| 98 | static struct pm8xxx_misc_platform_data pm8xxx_misc_pdata = { |
| 99 | .priority = 0, |
| 100 | }; |
| 101 | |
Jay Chokshi | eb5d0d5 | 2011-09-28 17:16:20 -0700 | [diff] [blame] | 102 | #define PM8018_LED_KB_MAX_CURRENT 20 /* I = 20mA */ |
| 103 | #define PM8XXX_LED_PWM_PERIOD_US 1000 |
| 104 | |
| 105 | /** |
| 106 | * PM8XXX_PWM_CHANNEL_NONE shall be used when LED shall not be |
| 107 | * driven using PWM feature. |
| 108 | */ |
| 109 | #define PM8XXX_PWM_CHANNEL_NONE -1 |
| 110 | |
| 111 | static struct led_info pm8018_led_info[] = { |
| 112 | [0] = { |
| 113 | .name = "led:kb", |
| 114 | }, |
| 115 | }; |
| 116 | |
| 117 | static struct led_platform_data pm8018_led_core_pdata = { |
| 118 | .num_leds = ARRAY_SIZE(pm8018_led_info), |
| 119 | .leds = pm8018_led_info, |
| 120 | }; |
| 121 | |
| 122 | static struct pm8xxx_led_config pm8018_led_configs[] = { |
| 123 | [0] = { |
| 124 | .id = PM8XXX_ID_LED_KB_LIGHT, |
| 125 | .mode = PM8XXX_LED_MODE_PWM3, |
| 126 | .max_current = PM8018_LED_KB_MAX_CURRENT, |
| 127 | .pwm_channel = 2, |
| 128 | .pwm_period_us = PM8XXX_LED_PWM_PERIOD_US, |
| 129 | }, |
| 130 | }; |
| 131 | |
| 132 | static struct pm8xxx_led_platform_data pm8xxx_leds_pdata = { |
| 133 | .led_core = &pm8018_led_core_pdata, |
| 134 | .configs = pm8018_led_configs, |
| 135 | .num_configs = ARRAY_SIZE(pm8018_led_configs), |
| 136 | }; |
| 137 | |
Jay Chokshi | dc8028b | 2011-12-01 16:17:34 -0800 | [diff] [blame] | 138 | #ifdef CONFIG_LTC4088_CHARGER |
| 139 | static struct ltc4088_charger_platform_data ltc4088_chg_pdata = { |
| 140 | .gpio_mode_select_d0 = 7, |
| 141 | .gpio_mode_select_d1 = 6, |
| 142 | .gpio_mode_select_d2 = 4, |
| 143 | }; |
| 144 | #endif |
| 145 | |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 146 | static struct pm8018_platform_data pm8018_platform_data __devinitdata = { |
| 147 | .irq_pdata = &pm8xxx_irq_pdata, |
| 148 | .gpio_pdata = &pm8xxx_gpio_pdata, |
| 149 | .mpp_pdata = &pm8xxx_mpp_pdata, |
| 150 | .rtc_pdata = &pm8xxx_rtc_pdata, |
| 151 | .pwrkey_pdata = &pm8xxx_pwrkey_pdata, |
| 152 | .misc_pdata = &pm8xxx_misc_pdata, |
David Collins | 00b31e6 | 2011-08-31 20:00:10 -0700 | [diff] [blame] | 153 | .regulator_pdatas = msm_pm8018_regulator_pdata, |
Siddartha Mohanadoss | 5f60b45 | 2011-10-05 11:49:00 -0700 | [diff] [blame] | 154 | .adc_pdata = &pm8018_adc_pdata, |
Jay Chokshi | eb5d0d5 | 2011-09-28 17:16:20 -0700 | [diff] [blame] | 155 | .leds_pdata = &pm8xxx_leds_pdata, |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 156 | }; |
| 157 | |
Kenneth Heitke | af3d3cf | 2011-09-08 11:45:31 -0700 | [diff] [blame] | 158 | static struct msm_ssbi_platform_data msm9615_ssbi_pm8018_pdata __devinitdata = { |
| 159 | .controller_type = MSM_SBI_CTRL_PMIC_ARBITER, |
| 160 | .slave = { |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 161 | .name = PM8018_CORE_DEV_NAME, |
| 162 | .platform_data = &pm8018_platform_data, |
Kenneth Heitke | af3d3cf | 2011-09-08 11:45:31 -0700 | [diff] [blame] | 163 | }, |
| 164 | }; |
| 165 | |
David Collins | bea297a | 2011-09-28 13:11:14 -0700 | [diff] [blame] | 166 | static struct platform_device msm9615_device_rpm_regulator __devinitdata = { |
| 167 | .name = "rpm-regulator", |
| 168 | .id = -1, |
| 169 | .dev = { |
| 170 | .platform_data = &msm_rpm_regulator_9615_pdata, |
| 171 | }, |
| 172 | }; |
| 173 | |
David Collins | 0f9942a | 2011-10-31 09:47:34 -0700 | [diff] [blame] | 174 | static struct platform_device msm9615_device_ext_2p95v_vreg = { |
| 175 | .name = GPIO_REGULATOR_DEV_NAME, |
| 176 | .id = 18, |
| 177 | .dev = { |
| 178 | .platform_data = |
| 179 | &msm_gpio_regulator_pdata[GPIO_VREG_ID_EXT_2P95V], |
| 180 | }, |
| 181 | }; |
| 182 | |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 183 | #if (defined(CONFIG_MMC_MSM_SDC1_SUPPORT)\ |
| 184 | || defined(CONFIG_MMC_MSM_SDC2_SUPPORT)) |
| 185 | |
Krishna Konda | 7186bfe | 2011-10-17 15:36:54 -0700 | [diff] [blame] | 186 | #define GPIO_SDC1_HW_DET 80 |
Krishna Konda | 3b78ea7 | 2011-10-18 16:09:19 -0700 | [diff] [blame] | 187 | #define GPIO_SDC2_DAT1_WAKEUP 26 |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 188 | |
Stepan Moskovchenko | 73b943b | 2011-10-31 22:43:00 -0700 | [diff] [blame] | 189 | /* MDM9x15 has 2 SDCC controllers */ |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 190 | enum sdcc_controllers { |
| 191 | SDCC1, |
| 192 | SDCC2, |
| 193 | MAX_SDCC_CONTROLLER |
| 194 | }; |
| 195 | |
| 196 | #ifdef CONFIG_MMC_MSM_SDC1_SUPPORT |
Krishna Konda | fea6018 | 2011-11-01 16:01:34 -0700 | [diff] [blame] | 197 | /* All SDCC controllers requires VDD/VCC voltage */ |
| 198 | static struct msm_mmc_reg_data mmc_vdd_reg_data[MAX_SDCC_CONTROLLER] = { |
| 199 | /* SDCC1 : External card slot connected */ |
| 200 | [SDCC1] = { |
| 201 | .name = "sdc_vdd", |
| 202 | /* |
| 203 | * This is a gpio-regulator and does not support |
| 204 | * regulator_set_voltage and regulator_set_optimum_mode |
| 205 | */ |
Krishna Konda | fea6018 | 2011-11-01 16:01:34 -0700 | [diff] [blame] | 206 | .high_vol_level = 2950000, |
| 207 | .low_vol_level = 2950000, |
| 208 | .hpm_uA = 600000, /* 600mA */ |
| 209 | } |
| 210 | }; |
| 211 | |
| 212 | /* All SDCC controllers may require voting for VDD PAD voltage */ |
| 213 | static struct msm_mmc_reg_data mmc_vddp_reg_data[MAX_SDCC_CONTROLLER] = { |
| 214 | /* SDCC1 : External card slot connected */ |
| 215 | [SDCC1] = { |
| 216 | .name = "sdc_vddp", |
Krishna Konda | fea6018 | 2011-11-01 16:01:34 -0700 | [diff] [blame] | 217 | .high_vol_level = 2950000, |
| 218 | .low_vol_level = 1850000, |
| 219 | .always_on = true, |
| 220 | .lpm_sup = true, |
| 221 | /* Max. Active current required is 16 mA */ |
| 222 | .hpm_uA = 16000, |
| 223 | /* |
| 224 | * Sleep current required is ~300 uA. But min. vote can be |
| 225 | * in terms of mA (min. 1 mA). So let's vote for 2 mA |
| 226 | * during sleep. |
| 227 | */ |
| 228 | .lpm_uA = 2000, |
| 229 | } |
| 230 | }; |
| 231 | |
| 232 | static struct msm_mmc_slot_reg_data mmc_slot_vreg_data[MAX_SDCC_CONTROLLER] = { |
| 233 | /* SDCC1 : External card slot connected */ |
| 234 | [SDCC1] = { |
| 235 | .vdd_data = &mmc_vdd_reg_data[SDCC1], |
| 236 | .vddp_data = &mmc_vddp_reg_data[SDCC1], |
| 237 | } |
| 238 | }; |
| 239 | |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 240 | /* SDC1 pad data */ |
| 241 | static struct msm_mmc_pad_drv sdc1_pad_drv_on_cfg[] = { |
| 242 | {TLMM_HDRV_SDC1_CLK, GPIO_CFG_16MA}, |
| 243 | {TLMM_HDRV_SDC1_CMD, GPIO_CFG_10MA}, |
| 244 | {TLMM_HDRV_SDC1_DATA, GPIO_CFG_10MA} |
| 245 | }; |
| 246 | |
| 247 | static struct msm_mmc_pad_drv sdc1_pad_drv_off_cfg[] = { |
| 248 | {TLMM_HDRV_SDC1_CLK, GPIO_CFG_2MA}, |
| 249 | {TLMM_HDRV_SDC1_CMD, GPIO_CFG_2MA}, |
| 250 | {TLMM_HDRV_SDC1_DATA, GPIO_CFG_2MA} |
| 251 | }; |
| 252 | |
| 253 | static struct msm_mmc_pad_pull sdc1_pad_pull_on_cfg[] = { |
| 254 | {TLMM_PULL_SDC1_CLK, GPIO_CFG_NO_PULL}, |
| 255 | {TLMM_PULL_SDC1_CMD, GPIO_CFG_PULL_UP}, |
| 256 | {TLMM_PULL_SDC1_DATA, GPIO_CFG_PULL_UP} |
| 257 | }; |
| 258 | |
| 259 | static struct msm_mmc_pad_pull sdc1_pad_pull_off_cfg[] = { |
| 260 | {TLMM_PULL_SDC1_CLK, GPIO_CFG_NO_PULL}, |
| 261 | {TLMM_PULL_SDC1_CMD, GPIO_CFG_PULL_DOWN}, |
| 262 | {TLMM_PULL_SDC1_DATA, GPIO_CFG_PULL_DOWN} |
| 263 | }; |
| 264 | |
| 265 | static struct msm_mmc_pad_pull_data mmc_pad_pull_data[MAX_SDCC_CONTROLLER] = { |
| 266 | [SDCC1] = { |
| 267 | .on = sdc1_pad_pull_on_cfg, |
| 268 | .off = sdc1_pad_pull_off_cfg, |
| 269 | .size = ARRAY_SIZE(sdc1_pad_pull_on_cfg) |
| 270 | }, |
| 271 | }; |
| 272 | |
| 273 | static struct msm_mmc_pad_drv_data mmc_pad_drv_data[MAX_SDCC_CONTROLLER] = { |
| 274 | [SDCC1] = { |
| 275 | .on = sdc1_pad_drv_on_cfg, |
| 276 | .off = sdc1_pad_drv_off_cfg, |
| 277 | .size = ARRAY_SIZE(sdc1_pad_drv_on_cfg) |
| 278 | }, |
| 279 | }; |
| 280 | |
| 281 | static struct msm_mmc_pad_data mmc_pad_data[MAX_SDCC_CONTROLLER] = { |
| 282 | [SDCC1] = { |
| 283 | .pull = &mmc_pad_pull_data[SDCC1], |
| 284 | .drv = &mmc_pad_drv_data[SDCC1] |
| 285 | }, |
| 286 | }; |
| 287 | #endif |
| 288 | |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 289 | #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 290 | static struct msm_mmc_gpio sdc2_gpio_cfg[] = { |
| 291 | {25, "sdc2_dat_0"}, |
| 292 | {26, "sdc2_dat_1"}, |
| 293 | {27, "sdc2_dat_2"}, |
| 294 | {28, "sdc2_dat_3"}, |
| 295 | {29, "sdc2_cmd"}, |
| 296 | {30, "sdc2_clk"}, |
| 297 | }; |
| 298 | |
| 299 | static struct msm_mmc_gpio_data mmc_gpio_data[MAX_SDCC_CONTROLLER] = { |
| 300 | [SDCC2] = { |
| 301 | .gpio = sdc2_gpio_cfg, |
| 302 | .size = ARRAY_SIZE(sdc2_gpio_cfg), |
| 303 | }, |
| 304 | }; |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 305 | #endif |
| 306 | |
| 307 | static struct msm_mmc_pin_data mmc_slot_pin_data[MAX_SDCC_CONTROLLER] = { |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 308 | #ifdef CONFIG_MMC_MSM_SDC1_SUPPORT |
| 309 | [SDCC1] = { |
| 310 | .is_gpio = 0, |
| 311 | .pad_data = &mmc_pad_data[SDCC1], |
| 312 | }, |
| 313 | #endif |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 314 | #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT |
| 315 | [SDCC2] = { |
| 316 | .is_gpio = 1, |
| 317 | .gpio_data = &mmc_gpio_data[SDCC2], |
| 318 | }, |
| 319 | #endif |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 320 | }; |
| 321 | |
| 322 | #ifdef CONFIG_MMC_MSM_SDC1_SUPPORT |
| 323 | static unsigned int sdc1_sup_clk_rates[] = { |
Krishna Konda | 360aa42 | 2011-12-06 18:27:41 -0800 | [diff] [blame] | 324 | 400000, 24000000, 48000000, |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 325 | }; |
| 326 | |
| 327 | static struct mmc_platform_data sdc1_data = { |
Krishna Konda | 360aa42 | 2011-12-06 18:27:41 -0800 | [diff] [blame] | 328 | .ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, |
| 329 | .mmc_bus_width = MMC_CAP_4_BIT_DATA, |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 330 | .sup_clk_table = sdc1_sup_clk_rates, |
| 331 | .sup_clk_cnt = ARRAY_SIZE(sdc1_sup_clk_rates), |
Krishna Konda | fea6018 | 2011-11-01 16:01:34 -0700 | [diff] [blame] | 332 | .pclk_src_dfab = true, |
Krishna Konda | fea6018 | 2011-11-01 16:01:34 -0700 | [diff] [blame] | 333 | .vreg_data = &mmc_slot_vreg_data[SDCC1], |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 334 | .pin_data = &mmc_slot_pin_data[SDCC1], |
Krishna Konda | 7186bfe | 2011-10-17 15:36:54 -0700 | [diff] [blame] | 335 | #ifdef CONFIG_MMC_MSM_CARD_HW_DETECTION |
| 336 | .status_gpio = GPIO_SDC1_HW_DET, |
| 337 | .status_irq = MSM_GPIO_TO_INT(GPIO_SDC1_HW_DET), |
| 338 | .irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
| 339 | #endif |
Krishna Konda | dbcf970 | 2011-11-07 18:45:48 -0800 | [diff] [blame] | 340 | .xpc_cap = 1, |
| 341 | .uhs_caps = (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | |
Krishna Konda | 360aa42 | 2011-12-06 18:27:41 -0800 | [diff] [blame] | 342 | MMC_CAP_MAX_CURRENT_400), |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 343 | }; |
| 344 | static struct mmc_platform_data *msm9615_sdc1_pdata = &sdc1_data; |
| 345 | #else |
| 346 | static struct mmc_platform_data *msm9615_sdc1_pdata; |
| 347 | #endif |
| 348 | |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 349 | #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT |
| 350 | static unsigned int sdc2_sup_clk_rates[] = { |
Krishna Konda | 360aa42 | 2011-12-06 18:27:41 -0800 | [diff] [blame] | 351 | 400000, 24000000, 48000000, |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 352 | }; |
| 353 | |
| 354 | static struct mmc_platform_data sdc2_data = { |
| 355 | .ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, |
| 356 | .mmc_bus_width = MMC_CAP_4_BIT_DATA, |
| 357 | .sup_clk_table = sdc2_sup_clk_rates, |
| 358 | .sup_clk_cnt = ARRAY_SIZE(sdc2_sup_clk_rates), |
Krishna Konda | 890b1d1 | 2011-10-18 16:05:37 -0700 | [diff] [blame] | 359 | .pclk_src_dfab = 1, |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 360 | .pin_data = &mmc_slot_pin_data[SDCC2], |
Krishna Konda | 3b78ea7 | 2011-10-18 16:09:19 -0700 | [diff] [blame] | 361 | #ifdef CONFIG_MMC_MSM_SDIO_SUPPORT |
| 362 | .sdiowakeup_irq = MSM_GPIO_TO_INT(GPIO_SDC2_DAT1_WAKEUP), |
| 363 | #endif |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 364 | }; |
| 365 | static struct mmc_platform_data *msm9615_sdc2_pdata = &sdc2_data; |
| 366 | #else |
| 367 | static struct mmc_platform_data *msm9615_sdc2_pdata; |
| 368 | #endif |
| 369 | |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 370 | static void __init msm9615_init_mmc(void) |
| 371 | { |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 372 | if (msm9615_sdc1_pdata) { |
Krishna Konda | fea6018 | 2011-11-01 16:01:34 -0700 | [diff] [blame] | 373 | /* SDC1: External card slot for SD/MMC cards */ |
| 374 | msm_add_sdcc(1, msm9615_sdc1_pdata); |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 375 | } |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 376 | |
| 377 | if (msm9615_sdc2_pdata) { |
Krishna Konda | fea6018 | 2011-11-01 16:01:34 -0700 | [diff] [blame] | 378 | /* SDC2: External card slot used for WLAN */ |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 379 | msm_add_sdcc(2, msm9615_sdc2_pdata); |
| 380 | } |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 381 | } |
| 382 | #else |
| 383 | static void __init msm9615_init_mmc(void) { } |
| 384 | #endif |
Maheshkumar Sivasubramanian | 4923db2 | 2011-09-15 09:28:15 -0600 | [diff] [blame] | 385 | static struct msm_cpuidle_state msm_cstates[] __initdata = { |
| 386 | {0, 0, "C0", "WFI", |
| 387 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT}, |
| 388 | |
| 389 | {0, 1, "C1", "STANDALONE_POWER_COLLAPSE", |
| 390 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE}, |
| 391 | |
| 392 | {0, 2, "C2", "POWER_COLLAPSE", |
| 393 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE}, |
| 394 | }; |
| 395 | static struct msm_pm_platform_data msm_pm_data[MSM_PM_SLEEP_MODE_NR] = { |
| 396 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 397 | .idle_supported = 1, |
| 398 | .suspend_supported = 1, |
| 399 | .idle_enabled = 0, |
| 400 | .suspend_enabled = 0, |
| 401 | }, |
| 402 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 403 | .idle_supported = 1, |
| 404 | .suspend_supported = 1, |
| 405 | .idle_enabled = 0, |
| 406 | .suspend_enabled = 0, |
| 407 | }, |
| 408 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 409 | .idle_supported = 1, |
| 410 | .suspend_supported = 1, |
| 411 | .idle_enabled = 1, |
| 412 | .suspend_enabled = 1, |
| 413 | }, |
| 414 | }; |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 415 | |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 416 | static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = { |
| 417 | .mode = MSM_PM_BOOT_CONFIG_REMAP_BOOT_ADDR, |
| 418 | .v_addr = MSM_APCS_GLB_BASE + 0x24, |
| 419 | }; |
| 420 | |
Gagan Mac | 7a82764 | 2011-09-22 19:42:21 -0600 | [diff] [blame] | 421 | static void __init msm9615_init_buses(void) |
| 422 | { |
| 423 | #ifdef CONFIG_MSM_BUS_SCALING |
| 424 | msm_bus_rpm_set_mt_mask(); |
| 425 | msm_bus_9615_sys_fabric_pdata.rpm_enabled = 1; |
| 426 | msm_bus_9615_sys_fabric.dev.platform_data = |
| 427 | &msm_bus_9615_sys_fabric_pdata; |
| 428 | msm_bus_def_fab.dev.platform_data = &msm_bus_9615_def_fab_pdata; |
| 429 | #endif |
| 430 | } |
| 431 | |
Harini Jayaraman | 738c931 | 2011-09-08 15:22:38 -0600 | [diff] [blame] | 432 | static struct msm_spi_platform_data msm9615_qup_spi_gsbi3_pdata = { |
| 433 | .max_clock_speed = 24000000, |
| 434 | }; |
| 435 | |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 436 | static struct msm_i2c_platform_data msm9615_i2c_qup_gsbi5_pdata = { |
| 437 | .clk_freq = 100000, |
| 438 | .src_clk_rate = 24000000, |
| 439 | }; |
| 440 | |
Amit Blay | 6a8d4f3 | 2011-11-21 10:36:25 +0200 | [diff] [blame] | 441 | #define USB_5V_EN 3 |
| 442 | #define PM_USB_5V_EN PM8018_GPIO_PM_TO_SYS(USB_5V_EN) |
| 443 | |
| 444 | static void msm_hsusb_vbus_power(bool on) |
| 445 | { |
| 446 | int rc; |
| 447 | static bool vbus_is_on; |
| 448 | struct pm_gpio usb_vbus = { |
| 449 | .direction = PM_GPIO_DIR_OUT, |
| 450 | .pull = PM_GPIO_PULL_NO, |
| 451 | .output_buffer = PM_GPIO_OUT_BUF_CMOS, |
| 452 | .output_value = 0, |
| 453 | .vin_sel = 2, |
| 454 | .out_strength = PM_GPIO_STRENGTH_HIGH, |
| 455 | .function = PM_GPIO_FUNC_NORMAL, |
| 456 | .inv_int_pol = 0, |
| 457 | }; |
| 458 | |
| 459 | if (vbus_is_on == on) |
| 460 | return; |
| 461 | |
| 462 | if (on) { |
| 463 | rc = pm8xxx_gpio_config(PM_USB_5V_EN, &usb_vbus); |
| 464 | if (rc) { |
| 465 | pr_err("failed to config usb_5v_en gpio\n"); |
| 466 | return; |
| 467 | } |
| 468 | |
| 469 | rc = gpio_request(PM_USB_5V_EN, |
| 470 | "usb_5v_en"); |
| 471 | if (rc < 0) { |
| 472 | pr_err("failed to request usb_5v_en gpio\n"); |
| 473 | return; |
| 474 | } |
| 475 | |
| 476 | rc = gpio_direction_output(PM_USB_5V_EN, 1); |
| 477 | if (rc) { |
| 478 | pr_err("%s: unable to set_direction for gpio [%d]\n", |
| 479 | __func__, PM_USB_5V_EN); |
| 480 | goto free_usb_5v_en; |
| 481 | } |
| 482 | |
| 483 | vbus_is_on = true; |
| 484 | return; |
| 485 | } |
| 486 | gpio_set_value(PM_USB_5V_EN, 0); |
| 487 | free_usb_5v_en: |
| 488 | gpio_free(PM_USB_5V_EN); |
| 489 | vbus_is_on = false; |
| 490 | } |
| 491 | |
Anji jonnala | a8b8d73 | 2011-12-06 10:03:24 +0530 | [diff] [blame] | 492 | static int shelby_phy_init_seq[] = { |
| 493 | 0x44, 0x80,/* set VBUS valid threshold and |
| 494 | disconnect valid threshold */ |
| 495 | 0x38, 0x81, /* update DC voltage level */ |
| 496 | 0x14, 0x82,/* set preemphasis and rise/fall time */ |
| 497 | 0x13, 0x83,/* set source impedance adjustment */ |
| 498 | -1}; |
| 499 | |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 500 | #define USB_BAM_PHY_BASE 0x12502000 |
| 501 | #define USB_BAM_PHY_SIZE 0x10000 |
| 502 | #define A2_BAM_PHY_BASE 0x124C2000 |
| 503 | static struct usb_bam_pipe_connect msm_usb_bam_connections[4][2] = { |
| 504 | [0][USB_TO_PEER_PERIPHERAL] = { |
| 505 | .src_phy_addr = USB_BAM_PHY_BASE, |
| 506 | .src_pipe_index = 11, |
| 507 | .dst_phy_addr = A2_BAM_PHY_BASE, |
| 508 | .dst_pipe_index = 0, |
Ofir Cohen | 29cd575 | 2011-12-14 17:20:30 +0200 | [diff] [blame] | 509 | .data_fifo_base_offset = 0x1100, |
| 510 | .data_fifo_size = 0x600, |
| 511 | .desc_fifo_base_offset = 0x1700, |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 512 | .desc_fifo_size = 0x300, |
| 513 | }, |
| 514 | [0][PEER_PERIPHERAL_TO_USB] = { |
| 515 | .src_phy_addr = A2_BAM_PHY_BASE, |
| 516 | .src_pipe_index = 1, |
| 517 | .dst_phy_addr = USB_BAM_PHY_BASE, |
| 518 | .dst_pipe_index = 10, |
| 519 | .data_fifo_base_offset = 0xa00, |
Ofir Cohen | 29cd575 | 2011-12-14 17:20:30 +0200 | [diff] [blame] | 520 | .data_fifo_size = 0x600, |
| 521 | .desc_fifo_base_offset = 0x1000, |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 522 | .desc_fifo_size = 0x100, |
| 523 | }, |
| 524 | }; |
| 525 | |
| 526 | static struct msm_usb_bam_platform_data msm_usb_bam_pdata = { |
| 527 | .connections = &msm_usb_bam_connections[0][0], |
| 528 | .usb_bam_phy_base = USB_BAM_PHY_BASE, |
| 529 | .usb_bam_phy_size = USB_BAM_PHY_SIZE, |
| 530 | .usb_bam_num_pipes = 32, |
| 531 | }; |
| 532 | |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 533 | static struct msm_otg_platform_data msm_otg_pdata = { |
Amit Blay | 6a8d4f3 | 2011-11-21 10:36:25 +0200 | [diff] [blame] | 534 | .mode = USB_OTG, |
| 535 | .otg_control = OTG_PHY_CONTROL, |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 536 | .phy_type = SNPS_28NM_INTEGRATED_PHY, |
Amit Blay | 6a8d4f3 | 2011-11-21 10:36:25 +0200 | [diff] [blame] | 537 | .pclk_src_name = "dfab_usb_hs_clk", |
| 538 | .vbus_power = msm_hsusb_vbus_power, |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 539 | }; |
| 540 | |
| 541 | static int usb_diag_update_pid_and_serial_num(uint32_t pid, const char *snum) |
| 542 | { |
| 543 | return 0; |
| 544 | } |
| 545 | |
| 546 | static struct android_usb_platform_data android_usb_pdata = { |
| 547 | .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num, |
| 548 | }; |
| 549 | |
| 550 | static struct platform_device android_usb_device = { |
| 551 | .name = "android_usb", |
| 552 | .id = -1, |
| 553 | .dev = { |
| 554 | .platform_data = &android_usb_pdata, |
| 555 | }, |
| 556 | }; |
| 557 | |
Rohit Vaswani | 149f0a7 | 2011-11-09 15:21:28 -0800 | [diff] [blame] | 558 | static struct platform_device msm_wlan_ar6000_pm_device = { |
| 559 | .name = "wlan_ar6000_pm_dev", |
| 560 | .id = -1, |
| 561 | }; |
| 562 | |
| 563 | static int __init msm9615_init_ar6000pm(void) |
| 564 | { |
| 565 | return platform_device_register(&msm_wlan_ar6000_pm_device); |
| 566 | } |
| 567 | |
Jay Chokshi | dc8028b | 2011-12-01 16:17:34 -0800 | [diff] [blame] | 568 | #ifdef CONFIG_LTC4088_CHARGER |
| 569 | static struct platform_device msm_device_charger = { |
| 570 | .name = LTC4088_CHARGER_DEV_NAME, |
| 571 | .id = -1, |
| 572 | .dev = { |
| 573 | .platform_data = <c4088_chg_pdata, |
| 574 | }, |
| 575 | }; |
| 576 | #endif |
| 577 | |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 578 | static struct platform_device *common_devices[] = { |
| 579 | &msm9615_device_dmov, |
| 580 | &msm_device_smd, |
Jay Chokshi | dc8028b | 2011-12-01 16:17:34 -0800 | [diff] [blame] | 581 | #ifdef CONFIG_LTC4088_CHARGER |
| 582 | &msm_device_charger, |
| 583 | #endif |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 584 | &msm_device_otg, |
| 585 | &msm_device_gadget_peripheral, |
Amit Blay | 6a8d4f3 | 2011-11-21 10:36:25 +0200 | [diff] [blame] | 586 | &msm_device_hsusb_host, |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 587 | &msm_device_usb_bam, |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 588 | &android_usb_device, |
| 589 | &msm9615_device_uart_gsbi4, |
David Collins | 0f9942a | 2011-10-31 09:47:34 -0700 | [diff] [blame] | 590 | &msm9615_device_ext_2p95v_vreg, |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 591 | &msm9615_device_ssbi_pmic1, |
| 592 | &msm9615_device_qup_i2c_gsbi5, |
| 593 | &msm9615_device_qup_spi_gsbi3, |
| 594 | &msm_device_sps, |
| 595 | &msm9615_device_tsens, |
| 596 | &msm_device_nand, |
Eric Holmberg | 0c96e70 | 2011-11-08 18:04:31 -0700 | [diff] [blame] | 597 | &msm_device_bam_dmux, |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 598 | &msm_rpm_device, |
| 599 | #ifdef CONFIG_HW_RANDOM_MSM |
| 600 | &msm_device_rng, |
| 601 | #endif |
| 602 | |
| 603 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 604 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) |
Ramesh Masavarapu | aa28b5b | 2011-10-21 10:26:03 -0700 | [diff] [blame] | 605 | &msm9615_qcrypto_device, |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 606 | #endif |
| 607 | |
| 608 | #if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 609 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
Ramesh Masavarapu | aa28b5b | 2011-10-21 10:26:03 -0700 | [diff] [blame] | 610 | &msm9615_qcedev_device, |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 611 | #endif |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 612 | &msm9615_device_watchdog, |
Gagan Mac | 7a82764 | 2011-09-22 19:42:21 -0600 | [diff] [blame] | 613 | &msm_bus_9615_sys_fabric, |
| 614 | &msm_bus_def_fab, |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 615 | }; |
| 616 | |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 617 | static void __init msm9615_i2c_init(void) |
| 618 | { |
| 619 | msm9615_device_qup_i2c_gsbi5.dev.platform_data = |
| 620 | &msm9615_i2c_qup_gsbi5_pdata; |
| 621 | } |
| 622 | |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 623 | static void __init msm9615_reserve(void) |
| 624 | { |
| 625 | msm_pm_boot_pdata.p_addr = memblock_alloc(SZ_8, SZ_64K); |
| 626 | } |
| 627 | |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 628 | static void __init msm9615_common_init(void) |
| 629 | { |
| 630 | msm9615_device_init(); |
Rohit Vaswani | a681589 | 2011-12-15 20:20:39 -0800 | [diff] [blame^] | 631 | msm9615_init_gpiomux(); |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 632 | msm9615_i2c_init(); |
David Collins | 00b31e6 | 2011-08-31 20:00:10 -0700 | [diff] [blame] | 633 | regulator_suppress_info_printing(); |
David Collins | bea297a | 2011-09-28 13:11:14 -0700 | [diff] [blame] | 634 | platform_device_register(&msm9615_device_rpm_regulator); |
Gagan Mac | 7a82764 | 2011-09-22 19:42:21 -0600 | [diff] [blame] | 635 | msm_clock_init(&msm9615_clock_init_data); |
| 636 | msm9615_init_buses(); |
Harini Jayaraman | 738c931 | 2011-09-08 15:22:38 -0600 | [diff] [blame] | 637 | msm9615_device_qup_spi_gsbi3.dev.platform_data = |
| 638 | &msm9615_qup_spi_gsbi3_pdata; |
Kenneth Heitke | af3d3cf | 2011-09-08 11:45:31 -0700 | [diff] [blame] | 639 | msm9615_device_ssbi_pmic1.dev.platform_data = |
| 640 | &msm9615_ssbi_pm8018_pdata; |
David Collins | 00b31e6 | 2011-08-31 20:00:10 -0700 | [diff] [blame] | 641 | pm8018_platform_data.num_regulators = msm_pm8018_regulator_pdata_len; |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 642 | |
| 643 | msm_device_otg.dev.platform_data = &msm_otg_pdata; |
Anji jonnala | a8b8d73 | 2011-12-06 10:03:24 +0530 | [diff] [blame] | 644 | msm_otg_pdata.phy_init_seq = shelby_phy_init_seq; |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 645 | msm_device_usb_bam.dev.platform_data = &msm_usb_bam_pdata; |
Rohit Vaswani | 0966687 | 2011-08-23 17:41:54 -0700 | [diff] [blame] | 646 | platform_add_devices(common_devices, ARRAY_SIZE(common_devices)); |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 647 | |
Vikram Mulukutla | b5e1cda | 2011-10-04 16:17:22 -0700 | [diff] [blame] | 648 | acpuclk_init(&acpuclk_9615_soc_data); |
| 649 | |
Rohit Vaswani | 149f0a7 | 2011-11-09 15:21:28 -0800 | [diff] [blame] | 650 | /* Ensure ar6000pm device is registered before MMC/SDC */ |
| 651 | msm9615_init_ar6000pm(); |
| 652 | |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 653 | msm9615_init_mmc(); |
Maheshkumar Sivasubramanian | 4923db2 | 2011-09-15 09:28:15 -0600 | [diff] [blame] | 654 | msm_pm_set_platform_data(msm_pm_data, ARRAY_SIZE(msm_pm_data)); |
| 655 | msm_pm_set_rpm_wakeup_irq(RPM_APCC_CPU0_WAKE_UP_IRQ); |
| 656 | msm_cpuidle_set_states(msm_cstates, ARRAY_SIZE(msm_cstates), |
| 657 | msm_pm_data); |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 658 | BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata)); |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 659 | } |
| 660 | |
| 661 | static void __init msm9615_cdp_init(void) |
| 662 | { |
| 663 | msm9615_common_init(); |
| 664 | } |
| 665 | |
| 666 | static void __init msm9615_mtp_init(void) |
| 667 | { |
| 668 | msm9615_common_init(); |
| 669 | } |
| 670 | |
| 671 | MACHINE_START(MSM9615_CDP, "QCT MSM9615 CDP") |
| 672 | .map_io = msm9615_map_io, |
| 673 | .init_irq = msm9615_init_irq, |
| 674 | .timer = &msm_timer, |
| 675 | .init_machine = msm9615_cdp_init, |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 676 | .reserve = msm9615_reserve, |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 677 | MACHINE_END |
| 678 | |
| 679 | MACHINE_START(MSM9615_MTP, "QCT MSM9615 MTP") |
| 680 | .map_io = msm9615_map_io, |
| 681 | .init_irq = msm9615_init_irq, |
| 682 | .timer = &msm_timer, |
| 683 | .init_machine = msm9615_mtp_init, |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 684 | .reserve = msm9615_reserve, |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 685 | MACHINE_END |