From: Ziggy Date: Thu, 13 Jun 2013 14:48:12 +0000 (-0400) Subject: Just a few power management tweaks. X-Git-Url: https://ziggy471.com/git/gitweb.cgi?p=ziggy471-sgs4-jb.git;a=commitdiff;h=9ed4a91cc55ba7b725f3ae12fdbb52e22b203289 Just a few power management tweaks. Signed-off-by: Ziggy --- --- a/arch/arm/mach-msm/board-jf_att.c +++ b/arch/arm/mach-msm/board-jf_att.c @@ -50,7 +50,6 @@ #ifdef CONFIG_VIBETONZ #include #endif - #include #ifdef CONFIG_SND_SOC_ES325 #include @@ -89,7 +88,6 @@ #include #include #include "clock.h" - #include #ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH_236 @@ -1208,7 +1206,7 @@ static struct i2c_board_info touchkey_i2 static struct i2c_gpio_platform_data cypress_touchkey_i2c_gpio_data = { - .sda_pin = GPIO_TOUCHKEY_SDA, + .sda_pin = GPIO_TOUCHKEY_SDA, .scl_pin = GPIO_TOUCHKEY_SCL, .udelay = 0, .sda_is_open_drain = 0, @@ -1304,6 +1302,12 @@ static void __init apq8064_early_reserve static struct msm_bus_vectors hsic_init_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, .ib = 0, @@ -1314,9 +1318,15 @@ static struct msm_bus_vectors hsic_init_ static struct msm_bus_vectors hsic_max_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 60000000, /* At least 480Mbps on bus. */ + .ib = 960000000, /* MAX bursts rate */ + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, - .ib = 256000000, /*vote for 32Mhz dfab clk rate*/ + .ib = 512000000, /*vote for 64Mhz dfab clk rate*/ }, }; @@ -1447,12 +1457,12 @@ static void msm8960_mhl_gpio_init(void) ice_gpiox_set(FPGA_GPIO_MHL_RST, 0); ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0); } else if (system_rev < 6) { - ret = gpio_request(GPIO_MHL_RST, "mhl_rst"); - if (ret < 0) { - pr_err("mhl_rst gpio_request is failed\n"); - return; + ret = gpio_request(GPIO_MHL_RST, "mhl_rst"); + if (ret < 0) { + pr_err("mhl_rst gpio_request is failed\n"); + return; + } } -} if (system_rev >= 4 && system_rev < 6) { ret = gpio_request(GPIO_MHL_VSIL, "mhl_vsil"); if (ret < 0) { @@ -1502,8 +1512,8 @@ static void sii8240_hw_onoff(bool onoff) { int rc = 0; /*VPH_PWR : mhl_power_source - VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V - just power control with HDMI_EN pin or control Regulator12*/ + VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V + just power control with HDMI_EN pin or control Regulator12*/ pr_info("%s: onoff =%d\n", __func__, onoff); if (mhl_hw_onoff == onoff) { pr_info("mhl_hw_onoff already %d\n", onoff); @@ -1520,7 +1530,7 @@ static void sii8240_hw_onoff(bool onoff) if (IS_ERR(mhl_l12)) return; rc = regulator_set_voltage(mhl_l12, - 1200000, 1200000); + 1200000, 1200000); if (rc) pr_err("error: setting for mhl_l12\n"); } @@ -1554,7 +1564,6 @@ static void sii8240_hw_onoff(bool onoff) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 1); if (system_rev >= 4 && system_rev < 6) gpio_direction_output(PM8921_GPIO_PM_TO_SYS(32), 1); - } else { if (system_rev >= 6) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0); @@ -3293,14 +3302,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -4946,6 +4955,7 @@ static void __init register_i2c_devices( apq8064_camera_board_info.board_info, apq8064_camera_board_info.num_i2c_board_info, }; + struct i2c_registry apq8064_front_camera_i2c_devices = { I2C_SURF | I2C_FFA | I2C_LIQUID | I2C_RUMI, APQ_8064_GSBI7_QUP_I2C_BUS_ID, @@ -5227,7 +5237,7 @@ static void __init apq8064_common_init(v machine_is_mpq8064_dtv())) platform_add_devices(common_not_mpq_devices, ARRAY_SIZE(common_not_mpq_devices)); - + #ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH_236 if (system_rev < 9) platform_device_register(&touchkey_i2c_gpio_device); @@ -5275,7 +5285,7 @@ static void __init apq8064_common_init(v msm_spm_l2_init(msm_spm_l2_data); BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata)); apq8064_epm_adc_init(); - msm_pm_set_tz_retention_flag(1); + msm_pm_set_tz_retention_flag(1); samsung_sys_class_init(); #ifdef CONFIG_MFD_MAX77693 --- a/arch/arm/mach-msm/board-jf_cri.c +++ b/arch/arm/mach-msm/board-jf_cri.c @@ -1249,6 +1249,12 @@ static void __init apq8064_early_reserve static struct msm_bus_vectors hsic_init_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, .ib = 0, @@ -1259,9 +1265,15 @@ static struct msm_bus_vectors hsic_init_ static struct msm_bus_vectors hsic_max_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 60000000, /* At least 480Mbps on bus. */ + .ib = 960000000, /* MAX bursts rate */ + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, - .ib = 256000000, /*vote for 32Mhz dfab clk rate*/ + .ib = 512000000, /*vote for 64Mhz dfab clk rate*/ }, }; @@ -1457,7 +1469,7 @@ static void sii8240_hw_onoff(bool onoff) if (mhl_l12 == NULL) { mhl_l12 = regulator_get(NULL, "8921_l12"); if (IS_ERR(mhl_l12)) - return ; + return; rc = regulator_set_voltage(mhl_l12, 1200000, 1200000); if (rc) @@ -1546,7 +1558,7 @@ static void sii8240_hw_reset(void) if (system_rev < 6) { if (gpio_direction_output(GPIO_MHL_RST, 1)) pr_err("%s error in making GPIO_MHL_RST HIGH\n", - __func__); + __func__); usleep_range(5000, 20000); if (gpio_direction_output(GPIO_MHL_RST, 0)) @@ -3206,14 +3218,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -4284,7 +4296,7 @@ static struct msm_i2c_platform_data apq8 }; static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { - .clk_freq = 100000, + .clk_freq = 400000, .src_clk_rate = 24000000, }; @@ -5178,7 +5190,15 @@ static void __init apq8064_common_init(v apq8064_epm_adc_init(); msm_pm_set_tz_retention_flag(1); samsung_sys_class_init(); - + +#ifdef CONFIG_MFD_MAX77693 + gpio_tlmm_config(GPIO_CFG(GPIO_IF_PMIC_IRQ, 0, GPIO_CFG_INPUT, + GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_DISABLE); +#endif +#if defined(CONFIG_BATTERY_SAMSUNG) + msm8960_init_battery(); +#endif + #if defined(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI) || defined(CONFIG_TOUCHSCREEN_ATMEL_MXTS) printk(KERN_DEBUG"[TSP] System revision, LPM mode : %d %d\n", system_rev, poweroff_charging); @@ -5199,11 +5219,6 @@ static void __init apq8064_common_init(v if (ret) pr_err("%s PMIC_GPIO_TKEY_INT config failed\n", __func__); #endif -#ifdef CONFIG_MFD_MAX77693 - gpio_tlmm_config(GPIO_CFG(GPIO_IF_PMIC_IRQ, 0, GPIO_CFG_INPUT, - GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_DISABLE); -#endif - #ifdef CONFIG_BT_BCM4335 apq8064_bt_init(); #endif @@ -5284,9 +5299,6 @@ static void __init samsung_jf_init(void) #ifdef CONFIG_MSM_CAMERA apq8064_init_cam(); #endif -#if defined(CONFIG_BATTERY_SAMSUNG) - msm8960_init_battery(); -#endif #ifdef CONFIG_SENSORS_SSP clear_ssp_gpio(); sensor_power_on_vdd(SNS_PWR_ON, SNS_PWR_ON); --- a/arch/arm/mach-msm/board-jf_dcm.c +++ b/arch/arm/mach-msm/board-jf_dcm.c @@ -50,7 +50,6 @@ #ifdef CONFIG_VIBETONZ #include #endif - #include #ifdef CONFIG_SND_SOC_ES325 #include @@ -89,7 +88,6 @@ #include #include #include "clock.h" - #include #ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH_236 @@ -400,6 +398,7 @@ static void irda_device_init(void) .output_value = 0, }; printk(KERN_ERR "%s called!\n", __func__); + gpio_request(PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_IRDA_WAKE), "irda_wake"); gpio_direction_output(PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_IRDA_WAKE), 0); pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \ @@ -1259,6 +1258,12 @@ static void __init apq8064_early_reserve static struct msm_bus_vectors hsic_init_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, .ib = 0, @@ -1269,9 +1274,15 @@ static struct msm_bus_vectors hsic_init_ static struct msm_bus_vectors hsic_max_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 60000000, /* At least 480Mbps on bus. */ + .ib = 960000000, /* MAX bursts rate */ + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, - .ib = 256000000, /*vote for 32Mhz dfab clk rate*/ + .ib = 512000000, /*vote for 64Mhz dfab clk rate*/ }, }; @@ -1466,9 +1477,9 @@ static void sii8240_hw_onoff(bool onoff) if (mhl_l12 == NULL) { mhl_l12 = regulator_get(NULL, "8921_l12"); if (IS_ERR(mhl_l12)) - return ; + return; rc = regulator_set_voltage(mhl_l12, - 1200000, 1200000); + 1200000, 1200000); if (rc) pr_err("error: setting for mhl_l12\n"); } @@ -1500,7 +1511,6 @@ static void sii8240_hw_onoff(bool onoff) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 1); if (system_rev >= 4 && system_rev < 6) gpio_direction_output(PM8921_GPIO_PM_TO_SYS(32), 1); - } else { if (system_rev >= 6) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0); @@ -1556,7 +1566,7 @@ static void sii8240_hw_reset(void) if (system_rev < 6) { if (gpio_direction_output(GPIO_MHL_RST, 1)) pr_err("%s error in making GPIO_MHL_RST HIGH\n", - __func__); + __func__); usleep_range(5000, 20000); if (gpio_direction_output(GPIO_MHL_RST, 0)) @@ -2299,6 +2309,7 @@ static int ice4_clock_en(int onoff) } return 0; } + static void barcode_emul_poweron(int onoff) { int ret; @@ -2418,18 +2429,16 @@ static void barcode_gpio_config(void) pr_info("%s\n", __func__); pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \ PMIC_GPIO_FPGA_RST_N), &creset_b); - gpio_request_one(GPIO_FPGA_CDONE, GPIOF_IN, "FPGA_CDONE"); if (system_rev < BOARD_REV06) gpio_request_one(GPIO_FPGA_SPI_EN, GPIOF_OUT_INIT_LOW, "FPGA_SPI_EN"); - if (system_rev > BOARD_REV05) { + if (system_rev > BOARD_REV05) pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \ PMIC_GPIO_FPGA_CRESET_B), &creset_b); - } else { + else gpio_request_one(GPIO_FPGA_CRESET_B, GPIOF_OUT_INIT_LOW, "FPGA_CRESET_B"); - } if (system_rev > BOARD_REV03 && system_rev < BOARD_REV06) barcode_emul_info.fw_type = ICE_19M; else if (system_rev > BOARD_REV05 && system_rev < BOARD_REV09) @@ -3342,9 +3351,9 @@ static struct platform_device msm_tsens_ }; static struct msm_thermal_data msm_thermal_pdata = { - .sensor_id = 7, + .sensor_id = 0, .poll_ms = 250, - .limit_temp_degC = 60, + .limit_temp_degC = 75, .temp_hysteresis_degC = 10, .freq_step = 2, }; @@ -3412,14 +3421,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -5223,6 +5232,7 @@ static void main_mic_bias_init(void) static void __init gpio_rev_init(void) { + #ifdef CONFIG_SEC_FPGA barcode_i2c_gpio_data.sda_pin = PM8921_MPP_PM_TO_SYS(PMIC_MPP_FPGA_SPI_SI); @@ -5370,7 +5380,7 @@ static void __init apq8064_common_init(v machine_is_mpq8064_dtv())) platform_add_devices(common_not_mpq_devices, ARRAY_SIZE(common_not_mpq_devices)); - + #ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH_236 if (system_rev < 9) platform_device_register(&touchkey_i2c_gpio_device); @@ -5420,7 +5430,7 @@ static void __init apq8064_common_init(v apq8064_epm_adc_init(); msm_pm_set_tz_retention_flag(1); samsung_sys_class_init(); - + #ifdef CONFIG_MFD_MAX77693 gpio_tlmm_config(GPIO_CFG(GPIO_IF_PMIC_IRQ, 0, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_DISABLE); --- a/arch/arm/mach-msm/board-jf_eur.c +++ b/arch/arm/mach-msm/board-jf_eur.c @@ -50,7 +50,6 @@ #ifdef CONFIG_VIBETONZ #include #endif - #include #ifdef CONFIG_SND_SOC_ES325 #include @@ -89,7 +88,6 @@ #include #include #include "clock.h" - #include #ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH_236 @@ -390,7 +388,8 @@ static void irda_device_init(void) .output_buffer = PM_GPIO_OUT_BUF_CMOS, .output_value = 0, }; - printk(KERN_ERR "%s called!\n", __func__); + printk(KERN_ERR "%s called!\n", __func__); + gpio_request(PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_IRDA_WAKE), "irda_wake"); gpio_direction_output(PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_IRDA_WAKE), 0); pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \ @@ -1268,6 +1267,12 @@ static void __init apq8064_early_reserve static struct msm_bus_vectors hsic_init_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, .ib = 0, @@ -1278,9 +1283,15 @@ static struct msm_bus_vectors hsic_init_ static struct msm_bus_vectors hsic_max_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 60000000, /* At least 480Mbps on bus. */ + .ib = 960000000, /* MAX bursts rate */ + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, - .ib = 256000000, /*vote for 32Mhz dfab clk rate*/ + .ib = 512000000, /*vote for 64Mhz dfab clk rate*/ }, }; @@ -1466,8 +1477,8 @@ static void sii8240_hw_onoff(bool onoff) { int rc = 0; /*VPH_PWR : mhl_power_source - VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V - just power control with HDMI_EN pin or control Regulator12*/ + VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V + just power control with HDMI_EN pin or control Regulator12*/ pr_info("%s: onoff =%d\n", __func__, onoff); if (mhl_hw_onoff == onoff) { pr_info("mhl_hw_onoff already %d\n", onoff); @@ -1518,7 +1529,6 @@ static void sii8240_hw_onoff(bool onoff) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 1); if (system_rev >= 4 && system_rev < 6) gpio_direction_output(PM8921_GPIO_PM_TO_SYS(32), 1); - } else { if (system_rev >= 6) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0); @@ -2290,6 +2300,7 @@ static int ice4_clock_en(int onoff) } return 0; } + static void barcode_emul_poweron(int onoff) { int ret; @@ -2416,18 +2427,16 @@ static void barcode_gpio_config(void) pr_info("%s\n", __func__); pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \ PMIC_GPIO_FPGA_RST_N), &creset_b); - gpio_request_one(GPIO_FPGA_CDONE, GPIOF_IN, "FPGA_CDONE"); if (system_rev < BOARD_REV06) gpio_request_one(GPIO_FPGA_SPI_EN, GPIOF_OUT_INIT_LOW, "FPGA_SPI_EN"); - if (system_rev > BOARD_REV05) { + if (system_rev > BOARD_REV05) pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \ PMIC_GPIO_FPGA_CRESET_B), &creset_b); - } else { + else gpio_request_one(GPIO_FPGA_CRESET_B, GPIOF_OUT_INIT_LOW, "FPGA_CRESET_B"); - } if (system_rev > BOARD_REV03 && system_rev < BOARD_REV06) barcode_emul_info.fw_type = ICE_19M; else if (system_rev > BOARD_REV05 && system_rev < BOARD_REV09) @@ -3246,14 +3255,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -4324,7 +4333,7 @@ static struct msm_i2c_platform_data apq8 }; static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { - .clk_freq = 100000, + .clk_freq = 400000, .src_clk_rate = 24000000, }; @@ -4888,6 +4897,7 @@ static void __init register_i2c_devices( apq8064_camera_board_info.board_info, apq8064_camera_board_info.num_i2c_board_info, }; + struct i2c_registry apq8064_front_camera_i2c_devices = { I2C_SURF | I2C_FFA | I2C_LIQUID | I2C_RUMI, APQ_8064_GSBI7_QUP_I2C_BUS_ID, @@ -4991,6 +5001,7 @@ static void main_mic_bias_init(void) static void __init gpio_rev_init(void) { + #ifdef CONFIG_SEC_FPGA barcode_i2c_gpio_data.sda_pin = PM8921_MPP_PM_TO_SYS(PMIC_MPP_FPGA_SPI_SI); --- a/arch/arm/mach-msm/board-jf_ktt.c +++ b/arch/arm/mach-msm/board-jf_ktt.c @@ -50,7 +50,6 @@ #ifdef CONFIG_VIBETONZ #include #endif - #include #ifdef CONFIG_SND_SOC_ES325 #include @@ -89,7 +88,6 @@ #include #include #include "clock.h" - #include #ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH_236 @@ -1431,12 +1429,12 @@ static void msm8960_mhl_gpio_init(void) ice_gpiox_set(FPGA_GPIO_MHL_RST, 0); ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0); } else if (system_rev < 6) { - ret = gpio_request(GPIO_MHL_RST, "mhl_rst"); - if (ret < 0) { - pr_err("mhl_rst gpio_request is failed\n"); - return; + ret = gpio_request(GPIO_MHL_RST, "mhl_rst"); + if (ret < 0) { + pr_err("mhl_rst gpio_request is failed\n"); + return; + } } -} if (system_rev >= 4 && system_rev < 6) { ret = gpio_request(GPIO_MHL_VSIL, "mhl_vsil"); if (ret < 0) { @@ -1486,8 +1484,8 @@ static void sii8240_hw_onoff(bool onoff) { int rc = 0; /*VPH_PWR : mhl_power_source - VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V - just power control with HDMI_EN pin or control Regulator12*/ + VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V + just power control with HDMI_EN pin or control Regulator12*/ pr_info("%s: onoff =%d\n", __func__, onoff); if (mhl_hw_onoff == onoff) { pr_info("mhl_hw_onoff already %d\n", onoff); @@ -1504,7 +1502,7 @@ static void sii8240_hw_onoff(bool onoff) if (IS_ERR(mhl_l12)) return; rc = regulator_set_voltage(mhl_l12, - 1200000, 1200000); + 1200000, 1200000); if (rc) pr_err("error: setting for mhl_l12\n"); } @@ -1538,7 +1536,6 @@ static void sii8240_hw_onoff(bool onoff) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 1); if (system_rev >= 4 && system_rev < 6) gpio_direction_output(PM8921_GPIO_PM_TO_SYS(32), 1); - } else { if (system_rev >= 6) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0); @@ -2237,13 +2234,13 @@ static void irda_led_poweron(int onoff) if (IS_ERR(reg_l10)) { printk(KERN_ERR"could not get 8921_l10, rc = %ld\n", PTR_ERR(reg_l10)); - } - } + } + } ret = regulator_enable(reg_l10); - if (ret) + if (ret) printk(KERN_ERR"enable l10 failed, rc=%d\n", ret); } else { - if (regulator_is_enabled(reg_l10) ) { + if (regulator_is_enabled(reg_l10)) { ret = regulator_disable(reg_l10); if (ret) printk(KERN_ERR"disable l10 failed, rc=%d\n", ret); @@ -2258,10 +2255,10 @@ static int ice4_clock_en(int onoff) return 0; if (system_rev <= BOARD_REV09) { - if (onoff) - msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_ON); - else - msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_OFF); + if (onoff) + msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_ON); + else + msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_OFF); } else if (system_rev >= BOARD_REV10) { static struct clk *fpga_main_clk; if (!fpga_main_clk) @@ -2278,6 +2275,7 @@ static int ice4_clock_en(int onoff) } return 0; } + static void barcode_emul_poweron(int onoff) { int ret; @@ -2297,8 +2295,7 @@ static void barcode_emul_poweron(int ono } if (system_rev >= BOARD_REV02) { if (barcode_vreg_l33 == NULL) { - barcode_vreg_l33 = regulator_get(NULL, - "8917_l33"); + barcode_vreg_l33 = regulator_get(NULL, "8917_l33"); if (IS_ERR(barcode_vreg_l33)) return ; ret = regulator_set_voltage(barcode_vreg_l33, @@ -2335,8 +2332,9 @@ static void barcode_emul_poweron(int ono if (system_rev > BOARD_REV03) { fpga_xo = msm_xo_get(MSM_XO_TCXO_A0, "ice4_fpga"); if (IS_ERR(fpga_xo)) { - printk(KERN_ERR "%s: Couldn't get TCXO_A0 vote for ice4_fpga\n", - __func__); + printk(KERN_ERR \ + "%s: Couldn't get TCXO_A0 vote for ice4_fpga\n", + __func__); } } } else { @@ -2411,7 +2409,6 @@ static void barcode_gpio_config(void) pr_info("%s\n", __func__); pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \ PMIC_GPIO_FPGA_RST_N), &creset_b); - gpio_request_one(GPIO_FPGA_CDONE, GPIOF_IN, "FPGA_CDONE"); if (system_rev < BOARD_REV06) gpio_request_one(GPIO_FPGA_SPI_EN, GPIOF_OUT_INIT_LOW, @@ -3327,9 +3324,9 @@ static struct platform_device msm_tsens_ }; static struct msm_thermal_data msm_thermal_pdata = { - .sensor_id = 7, + .sensor_id = 0, .poll_ms = 250, - .limit_temp_degC = 60, + .limit_temp_degC = 75, .temp_hysteresis_degC = 10, .freq_step = 2, }; @@ -3397,14 +3394,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { --- a/arch/arm/mach-msm/board-jf_lgt.c +++ b/arch/arm/mach-msm/board-jf_lgt.c @@ -1494,7 +1494,7 @@ static void sii8240_hw_onoff(bool onoff) if (mhl_l12 == NULL) { mhl_l12 = regulator_get(NULL, "8921_l12"); if (IS_ERR(mhl_l12)) - return ; + return; rc = regulator_set_voltage(mhl_l12, 1200000, 1200000); if (rc) @@ -1583,7 +1583,7 @@ static void sii8240_hw_reset(void) if (system_rev < 6) { if (gpio_direction_output(GPIO_MHL_RST, 1)) pr_err("%s error in making GPIO_MHL_RST HIGH\n", - __func__); + __func__); usleep_range(5000, 20000); if (gpio_direction_output(GPIO_MHL_RST, 0)) @@ -2215,7 +2215,7 @@ static void irda_led_poweron(int onoff) int ret; static struct regulator *reg_l10; if (system_rev >= BOARD_REV08 ) { - if(onoff) { + if(onoff) { if (!reg_l10) { reg_l10 = regulator_get(NULL, "8921_l10"); ret = regulator_set_voltage(reg_l10, 3300000, 3300000); @@ -2223,13 +2223,13 @@ static void irda_led_poweron(int onoff) if (IS_ERR(reg_l10)) { printk(KERN_ERR"could not get 8921_l10, rc = %ld\n", PTR_ERR(reg_l10)); - } - } + } + } ret = regulator_enable(reg_l10); - if (ret) - printk(KERN_ERR"enable l10 failed, rc=%d\n", ret); + if (ret) + printk(KERN_ERR"enable l10 failed, rc=%d\n", ret); } else { - if (regulator_is_enabled(reg_l10) ) { + if (regulator_is_enabled(reg_l10)) { ret = regulator_disable(reg_l10); if (ret) printk(KERN_ERR"disable l10 failed, rc=%d\n", ret); @@ -2244,10 +2244,10 @@ static int ice4_clock_en(int onoff) return 0; if (system_rev <= BOARD_REV09) { - if (onoff) - msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_ON); - else - msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_OFF); + if (onoff) + msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_ON); + else + msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_OFF); } else if (system_rev >= BOARD_REV10) { static struct clk *fpga_main_clk; if (!fpga_main_clk) @@ -2264,6 +2264,7 @@ static int ice4_clock_en(int onoff) } return 0; } + static void barcode_emul_poweron(int onoff) { int ret; @@ -2283,8 +2284,7 @@ static void barcode_emul_poweron(int ono } if (system_rev >= BOARD_REV02) { if (barcode_vreg_l33 == NULL) { - barcode_vreg_l33 = regulator_get(NULL, - "8917_l33"); + barcode_vreg_l33 = regulator_get(NULL, "8917_l33"); if (IS_ERR(barcode_vreg_l33)) return ; ret = regulator_set_voltage(barcode_vreg_l33, @@ -2321,7 +2321,8 @@ static void barcode_emul_poweron(int ono if (system_rev > BOARD_REV03) { fpga_xo = msm_xo_get(MSM_XO_TCXO_A0, "ice4_fpga"); if (IS_ERR(fpga_xo)) { - printk(KERN_ERR "%s: Couldn't get TCXO_A0 vote for ice4_fpga\n", + printk(KERN_ERR \ + "%s: Couldn't get TCXO_A0 vote for ice4_fpga\n", __func__); } } @@ -2345,15 +2346,15 @@ static void barcode_emul_poweron(int ono __func__); } if (system_rev >= BOARD_REV03) { - if (regulator_is_enabled(barcode_vreg_l33)) { - ret = regulator_disable(barcode_vreg_l33); - if (ret) - pr_err("%s: error disabling regulator\n", - __func__); + if (regulator_is_enabled(barcode_vreg_l33)) { + ret = regulator_disable(barcode_vreg_l33); + if (ret) + pr_err("%s: error disabling regulator\n", + __func__); + } } } } -} static void barcode_gpio_config(void); @@ -2397,7 +2398,6 @@ static void barcode_gpio_config(void) pr_info("%s\n", __func__); pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \ PMIC_GPIO_FPGA_RST_N), &creset_b); - gpio_request_one(GPIO_FPGA_CDONE, GPIOF_IN, "FPGA_CDONE"); if (system_rev < BOARD_REV06) gpio_request_one(GPIO_FPGA_SPI_EN, GPIOF_OUT_INIT_LOW, @@ -3313,9 +3313,9 @@ static struct platform_device msm_tsens_ }; static struct msm_thermal_data msm_thermal_pdata = { - .sensor_id = 7, + .sensor_id = 0, .poll_ms = 250, - .limit_temp_degC = 60, + .limit_temp_degC = 75, .temp_hysteresis_degC = 10, .freq_step = 2, }; @@ -3383,14 +3383,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -4484,7 +4484,7 @@ static struct msm_i2c_platform_data apq8 #if !defined(CONFIG_TDMB) static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { - .clk_freq = 100000, + .clk_freq = 400000, .src_clk_rate = 24000000, }; #endif --- a/arch/arm/mach-msm/board-jf_skt.c +++ b/arch/arm/mach-msm/board-jf_skt.c @@ -50,7 +50,6 @@ #ifdef CONFIG_VIBETONZ #include #endif - #include #ifdef CONFIG_SND_SOC_ES325 #include @@ -89,7 +88,6 @@ #include #include #include "clock.h" - #include #ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH_236 @@ -1431,12 +1429,12 @@ static void msm8960_mhl_gpio_init(void) ice_gpiox_set(FPGA_GPIO_MHL_RST, 0); ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0); } else if (system_rev < 6) { - ret = gpio_request(GPIO_MHL_RST, "mhl_rst"); - if (ret < 0) { - pr_err("mhl_rst gpio_request is failed\n"); - return; + ret = gpio_request(GPIO_MHL_RST, "mhl_rst"); + if (ret < 0) { + pr_err("mhl_rst gpio_request is failed\n"); + return; + } } -} if (system_rev >= 4 && system_rev < 6) { ret = gpio_request(GPIO_MHL_VSIL, "mhl_vsil"); if (ret < 0) { @@ -1486,8 +1484,8 @@ static void sii8240_hw_onoff(bool onoff) { int rc = 0; /*VPH_PWR : mhl_power_source - VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V - just power control with HDMI_EN pin or control Regulator12*/ + VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V + just power control with HDMI_EN pin or control Regulator12*/ pr_info("%s: onoff =%d\n", __func__, onoff); if (mhl_hw_onoff == onoff) { pr_info("mhl_hw_onoff already %d\n", onoff); @@ -1504,7 +1502,7 @@ static void sii8240_hw_onoff(bool onoff) if (IS_ERR(mhl_l12)) return; rc = regulator_set_voltage(mhl_l12, - 1200000, 1200000); + 1200000, 1200000); if (rc) pr_err("error: setting for mhl_l12\n"); } @@ -1538,7 +1536,6 @@ static void sii8240_hw_onoff(bool onoff) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 1); if (system_rev >= 4 && system_rev < 6) gpio_direction_output(PM8921_GPIO_PM_TO_SYS(32), 1); - } else { if (system_rev >= 6) ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0); @@ -2278,6 +2275,7 @@ static int ice4_clock_en(int onoff) } return 0; } + static void barcode_emul_poweron(int onoff) { int ret; @@ -2416,17 +2414,15 @@ static void barcode_gpio_config(void) if (system_rev < BOARD_REV06) gpio_request_one(GPIO_FPGA_SPI_EN, GPIOF_OUT_INIT_LOW, "FPGA_SPI_EN"); - if (system_rev > BOARD_REV05) { + if (system_rev > BOARD_REV05) pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \ PMIC_GPIO_FPGA_CRESET_B), &creset_b); - } else { + else gpio_request_one(GPIO_FPGA_CRESET_B, GPIOF_OUT_INIT_LOW, "FPGA_CRESET_B"); - } - if (system_rev == BOARD_REV01 || system_rev == BOARD_REV02) { + if (system_rev == BOARD_REV01 || system_rev == BOARD_REV02) gpio_request_one(gpio_rev(GPIO_FPGA_EN), GPIOF_OUT_INIT_LOW, "FPGA_EN"); - } if (system_rev > BOARD_REV03 && system_rev < BOARD_REV06) barcode_emul_info.fw_type = ICE_19M; else if (system_rev > BOARD_REV05 && system_rev < BOARD_REV10) @@ -3397,14 +3393,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -5185,6 +5181,7 @@ static void main_mic_bias_init(void) static void __init gpio_rev_init(void) { + #ifdef CONFIG_SEC_FPGA if (system_rev < BOARD_REV06) { barcode_i2c_gpio_data.sda_pin = gpio_rev(GPIO_BARCODE_SDA); --- a/arch/arm/mach-msm/board-jf_spr.c +++ b/arch/arm/mach-msm/board-jf_spr.c @@ -369,7 +369,6 @@ static struct i2c_board_info max77693_i2 }; #endif - #if defined(CONFIG_IR_REMOCON_FPGA) static void irda_wake_en(bool onoff) { @@ -1251,6 +1250,12 @@ static void __init apq8064_early_reserve static struct msm_bus_vectors hsic_init_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, .ib = 0, @@ -1261,9 +1266,15 @@ static struct msm_bus_vectors hsic_init_ static struct msm_bus_vectors hsic_max_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 60000000, /* At least 480Mbps on bus. */ + .ib = 960000000, /* MAX bursts rate */ + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, - .ib = 256000000, /*vote for 32Mhz dfab clk rate*/ + .ib = 512000000, /*vote for 64Mhz dfab clk rate*/ }, }; @@ -1431,7 +1442,7 @@ static void mhl_gpio_config(int data) } static int get_mhl_int_irq(void) { - return MSM_GPIO_TO_INT(GPIO_MHL_INT); + return MSM_GPIO_TO_INT(GPIO_MHL_INT); } static struct regulator *mhl_l12; @@ -1459,7 +1470,7 @@ static void sii8240_hw_onoff(bool onoff) if (mhl_l12 == NULL) { mhl_l12 = regulator_get(NULL, "8921_l12"); if (IS_ERR(mhl_l12)) - return ; + return; rc = regulator_set_voltage(mhl_l12, 1200000, 1200000); if (rc) @@ -1517,11 +1528,12 @@ static void sii8240_hw_onoff(bool onoff) } usleep_range(10000, 20000); + if (system_rev >= 6) ice_gpiox_set(FPGA_GPIO_MHL_RST, 0); if (system_rev < 6) gpio_direction_output(GPIO_MHL_RST, 0); - if (system_rev >= 4 && system_rev < 6) + if (system_rev >= 4 && system_rev < 6) pm8xxx_gpio_config(GPIO_MHL_VSIL, &pmic_mhl_en_parm); } @@ -1547,12 +1559,13 @@ static void sii8240_hw_reset(void) if (system_rev < 6) { if (gpio_direction_output(GPIO_MHL_RST, 1)) pr_err("%s error in making GPIO_MHL_RST HIGH\n", - __func__); + __func__); usleep_range(5000, 20000); if (gpio_direction_output(GPIO_MHL_RST, 0)) pr_err("%s error in making GPIO_MHL_RST Low\n", __func__); + usleep_range(10000, 20000); if (gpio_direction_output(GPIO_MHL_RST, 1)) pr_err("%s error in making GPIO_MHL_RST HIGH\n", @@ -2258,6 +2271,7 @@ static int ice4_clock_en(int onoff) } return 0; } + static void barcode_emul_poweron(int onoff) { int ret; @@ -3207,14 +3221,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -4285,7 +4299,7 @@ static struct msm_i2c_platform_data apq8 }; static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { - .clk_freq = 100000, + .clk_freq = 400000, .src_clk_rate = 24000000, }; @@ -4964,6 +4978,7 @@ static void __init gpio_rev_init(void) barcode_emul_info.cresetb = PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_FPGA_CRESET_B); } + #endif } static void sec_jack_init(void) --- a/arch/arm/mach-msm/board-jf_tmo.c +++ b/arch/arm/mach-msm/board-jf_tmo.c @@ -368,7 +368,6 @@ static struct i2c_board_info max77693_i2 }; #endif - #if defined(CONFIG_IR_REMOCON_FPGA) static void irda_wake_en(bool onoff) { @@ -1250,6 +1249,12 @@ static void __init apq8064_early_reserve static struct msm_bus_vectors hsic_init_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, .ib = 0, @@ -1260,9 +1265,15 @@ static struct msm_bus_vectors hsic_init_ static struct msm_bus_vectors hsic_max_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 60000000, /* At least 480Mbps on bus. */ + .ib = 960000000, /* MAX bursts rate */ + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, - .ib = 256000000, /*vote for 32Mhz dfab clk rate*/ + .ib = 512000000, /*vote for 64Mhz dfab clk rate*/ }, }; @@ -1458,7 +1469,7 @@ static void sii8240_hw_onoff(bool onoff) if (mhl_l12 == NULL) { mhl_l12 = regulator_get(NULL, "8921_l12"); if (IS_ERR(mhl_l12)) - return ; + return; rc = regulator_set_voltage(mhl_l12, 1200000, 1200000); if (rc) @@ -1481,8 +1492,7 @@ static void sii8240_hw_onoff(bool onoff) if (IS_ERR(mhl_l32)) return ; rc = regulator_set_voltage(mhl_l32, - 3300000, 3300000); - + 3300000, 3300000); } rc = regulator_enable(mhl_l32); if (rc) @@ -1548,7 +1558,7 @@ static void sii8240_hw_reset(void) if (system_rev < 6) { if (gpio_direction_output(GPIO_MHL_RST, 1)) pr_err("%s error in making GPIO_MHL_RST HIGH\n", - __func__); + __func__); usleep_range(5000, 20000); if (gpio_direction_output(GPIO_MHL_RST, 0)) @@ -2263,6 +2273,7 @@ static int ice4_clock_en(int onoff) } return 0; } + static void barcode_emul_poweron(int onoff) { int ret; @@ -3212,14 +3223,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -4290,7 +4301,7 @@ static struct msm_i2c_platform_data apq8 }; static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { - .clk_freq = 100000, + .clk_freq = 400000, .src_clk_rate = 24000000, }; @@ -4854,6 +4865,7 @@ static void __init register_i2c_devices( apq8064_camera_board_info.board_info, apq8064_camera_board_info.num_i2c_board_info, }; + struct i2c_registry apq8064_front_camera_i2c_devices = { I2C_SURF | I2C_FFA | I2C_LIQUID | I2C_RUMI, APQ_8064_GSBI7_QUP_I2C_BUS_ID, @@ -5019,6 +5031,7 @@ static void sec_jack_init(void) PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_EAR_MICBIAS_EN), &ear_micbiase); + if (system_rev >= BOARD_REV07) { sec_jack_data.send_end_active_high = true; sec_jack_data.zones = jack_zones_rev7; --- a/arch/arm/mach-msm/board-jf_usc.c +++ b/arch/arm/mach-msm/board-jf_usc.c @@ -1249,6 +1249,12 @@ static void __init apq8064_early_reserve static struct msm_bus_vectors hsic_init_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, .ib = 0, @@ -1259,9 +1265,15 @@ static struct msm_bus_vectors hsic_init_ static struct msm_bus_vectors hsic_max_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 60000000, /* At least 480Mbps on bus. */ + .ib = 960000000, /* MAX bursts rate */ + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, - .ib = 256000000, /*vote for 32Mhz dfab clk rate*/ + .ib = 512000000, /*vote for 64Mhz dfab clk rate*/ }, }; @@ -1457,7 +1469,7 @@ static void sii8240_hw_onoff(bool onoff) if (mhl_l12 == NULL) { mhl_l12 = regulator_get(NULL, "8921_l12"); if (IS_ERR(mhl_l12)) - return ; + return; rc = regulator_set_voltage(mhl_l12, 1200000, 1200000); if (rc) @@ -1546,7 +1558,7 @@ static void sii8240_hw_reset(void) if (system_rev < 6) { if (gpio_direction_output(GPIO_MHL_RST, 1)) pr_err("%s error in making GPIO_MHL_RST HIGH\n", - __func__); + __func__); usleep_range(5000, 20000); if (gpio_direction_output(GPIO_MHL_RST, 0)) @@ -3208,14 +3220,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -4286,7 +4298,7 @@ static struct msm_i2c_platform_data apq8 }; static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { - .clk_freq = 100000, + .clk_freq = 400000, .src_clk_rate = 24000000, }; --- a/arch/arm/mach-msm/board-jf_vzw.c +++ b/arch/arm/mach-msm/board-jf_vzw.c @@ -1249,6 +1249,12 @@ static void __init apq8064_early_reserve static struct msm_bus_vectors hsic_init_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, .ib = 0, @@ -1259,9 +1265,15 @@ static struct msm_bus_vectors hsic_init_ static struct msm_bus_vectors hsic_max_vectors[] = { { .src = MSM_BUS_MASTER_SPS, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 60000000, /* At least 480Mbps on bus. */ + .ib = 960000000, /* MAX bursts rate */ + }, + { + .src = MSM_BUS_MASTER_SPS, .dst = MSM_BUS_SLAVE_SPS, .ab = 0, - .ib = 256000000, /*vote for 32Mhz dfab clk rate*/ + .ib = 512000000, /*vote for 64Mhz dfab clk rate*/ }, }; @@ -1457,7 +1469,7 @@ static void sii8240_hw_onoff(bool onoff) if (mhl_l12 == NULL) { mhl_l12 = regulator_get(NULL, "8921_l12"); if (IS_ERR(mhl_l12)) - return ; + return; rc = regulator_set_voltage(mhl_l12, 1200000, 1200000); if (rc) @@ -1546,7 +1558,7 @@ static void sii8240_hw_reset(void) if (system_rev < 6) { if (gpio_direction_output(GPIO_MHL_RST, 1)) pr_err("%s error in making GPIO_MHL_RST HIGH\n", - __func__); + __func__); usleep_range(5000, 20000); if (gpio_direction_output(GPIO_MHL_RST, 0)) @@ -2220,8 +2232,8 @@ static void irda_led_poweron(int onoff) } } ret = regulator_enable(reg_l10); - if (ret) - printk(KERN_ERR"enable l10 failed, rc=%d\n", ret); + if (ret) + printk(KERN_ERR"enable l10 failed, rc=%d\n", ret); } else { if (regulator_is_enabled(reg_l10)) { ret = regulator_disable(reg_l10); @@ -3208,14 +3220,14 @@ static struct msm_rpmrs_level msm_rpmrs_ MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 1, 784, 180000, 100, + 1, 650, 180000, 100, }, { MSM_PM_SLEEP_MODE_RETENTION, MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), true, - 415, 715, 340827, 475, + 415, 650, 340827, 475, }, { @@ -4286,7 +4298,7 @@ static struct msm_i2c_platform_data apq8 }; static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { - .clk_freq = 100000, + .clk_freq = 400000, .src_clk_rate = 24000000, }; --- a/arch/arm/mach-msm/pm-8x60.c +++ b/arch/arm/mach-msm/pm-8x60.c @@ -947,6 +947,7 @@ int msm_pm_idle_enter(enum msm_pm_sleep_ } time = ktime_to_ns(ktime_get()) - time; + msm_pm_add_stat(MSM_PM_STAT_REQUESTED_IDLE, time); msm_pm_add_stat(exit_stat, time); do_div(time, 1000); @@ -1161,9 +1162,9 @@ static int __init msm_pm_init(void) pmd_t *pmd; unsigned long pmdval; enum msm_pm_time_stats_id enable_stats[] = { + MSM_PM_STAT_REQUESTED_IDLE, MSM_PM_STAT_IDLE_WFI, MSM_PM_STAT_RETENTION, - MSM_PM_STAT_IDLE_STANDALONE_POWER_COLLAPSE, MSM_PM_STAT_IDLE_POWER_COLLAPSE, MSM_PM_STAT_SUSPEND, }; --- a/arch/arm/mach-msm/pm-data.c +++ b/arch/arm/mach-msm/pm-data.c @@ -17,21 +17,21 @@ struct msm_pm_platform_data msm_pm_sleep [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { .idle_supported = 1, .suspend_supported = 1, - .idle_enabled = 0, - .suspend_enabled = 0, + .idle_enabled = 1, + .suspend_enabled = 1, }, [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { - .idle_supported = 1, - .suspend_supported = 1, + .idle_supported = 0, + .suspend_supported = 0, .idle_enabled = 0, .suspend_enabled = 0, }, [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_RETENTION)] = { .idle_supported = 1, - .suspend_supported = 1, - .idle_enabled = 0, + .suspend_supported = 0, + .idle_enabled = 1, .suspend_enabled = 0, }, @@ -46,12 +46,12 @@ struct msm_pm_platform_data msm_pm_sleep .idle_supported = 0, .suspend_supported = 1, .idle_enabled = 0, - .suspend_enabled = 0, + .suspend_enabled = 1, }, [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { - .idle_supported = 1, - .suspend_supported = 1, + .idle_supported = 0, + .suspend_supported = 0, .idle_enabled = 0, .suspend_enabled = 0, }, @@ -59,8 +59,8 @@ struct msm_pm_platform_data msm_pm_sleep [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_RETENTION)] = { .idle_supported = 1, .suspend_supported = 1, - .idle_enabled = 0, - .suspend_enabled = 0, + .idle_enabled = 1, + .suspend_enabled = 1, }, [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { @@ -74,12 +74,12 @@ struct msm_pm_platform_data msm_pm_sleep .idle_supported = 0, .suspend_supported = 1, .idle_enabled = 0, - .suspend_enabled = 0, + .suspend_enabled = 1, }, [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { - .idle_supported = 1, - .suspend_supported = 1, + .idle_supported = 0, + .suspend_supported = 0, .idle_enabled = 0, .suspend_enabled = 0, }, @@ -87,8 +87,8 @@ struct msm_pm_platform_data msm_pm_sleep [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_RETENTION)] = { .idle_supported = 1, .suspend_supported = 1, - .idle_enabled = 0, - .suspend_enabled = 0, + .idle_enabled = 1, + .suspend_enabled = 1, }, [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { @@ -102,12 +102,12 @@ struct msm_pm_platform_data msm_pm_sleep .idle_supported = 0, .suspend_supported = 1, .idle_enabled = 0, - .suspend_enabled = 0, + .suspend_enabled = 1, }, [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { - .idle_supported = 1, - .suspend_supported = 1, + .idle_supported = 0, + .suspend_supported = 0, .idle_enabled = 0, .suspend_enabled = 0, }, @@ -115,8 +115,8 @@ struct msm_pm_platform_data msm_pm_sleep [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_RETENTION)] = { .idle_supported = 1, .suspend_supported = 1, - .idle_enabled = 0, - .suspend_enabled = 0, + .idle_enabled = 1, + .suspend_enabled = 1, }, [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {