msm: camera: sensor: Update default CCI settings to 37.5Mhz

Update CCI settings for 100Khz, 400Khz and 1Mhz I2C
frequency with upgraded CCI frequency of 37.5 Mhz.
Disable clock stretching for 1Mhz I2C frequency and enable
for custom frequency.

Change-Id: Ib28eacc09028c0e2f3e36259f04b71fe0b827bf8
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
This commit is contained in:
Rajesh Bondugula 2016-01-07 13:55:37 -08:00 committed by David Keitel
parent 5316a9576e
commit 922b17221e
2 changed files with 37 additions and 34 deletions

View file

@ -738,44 +738,47 @@
};
&i2c_freq_100Khz {
qcom,hw-thigh = <78>;
qcom,hw-tlow = <114>;
qcom,hw-tsu-sto = <28>;
qcom,hw-tsu-sta = <28>;
qcom,hw-thd-dat = <10>;
qcom,hw-thd-sta = <77>;
qcom,hw-tbuf = <118>;
qcom,hw-thigh = <201>;
qcom,hw-tlow = <174>;
qcom,hw-tsu-sto = <204>;
qcom,hw-tsu-sta = <231>;
qcom,hw-thd-dat = <22>;
qcom,hw-thd-sta = <162>;
qcom,hw-tbuf = <227>;
qcom,hw-scl-stretch-en = <0>;
qcom,hw-trdhld = <6>;
qcom,hw-tsp = <1>;
qcom,hw-tsp = <3>;
qcom,cci-clk-src = <37500000>;
status = "ok";
};
&i2c_freq_400Khz {
qcom,hw-thigh = <20>;
qcom,hw-tlow = <28>;
qcom,hw-tsu-sto = <21>;
qcom,hw-tsu-sta = <21>;
qcom,hw-thd-dat = <13>;
qcom,hw-thd-sta = <18>;
qcom,hw-tbuf = <32>;
qcom,hw-thigh = <38>;
qcom,hw-tlow = <56>;
qcom,hw-tsu-sto = <40>;
qcom,hw-tsu-sta = <40>;
qcom,hw-thd-dat = <22>;
qcom,hw-thd-sta = <35>;
qcom,hw-tbuf = <62>;
qcom,hw-scl-stretch-en = <0>;
qcom,hw-trdhld = <6>;
qcom,hw-tsp = <3>;
qcom,cci-clk-src = <37500000>;
status = "ok";
};
&i2c_freq_custom {
qcom,hw-thigh = <15>;
qcom,hw-tlow = <28>;
qcom,hw-tsu-sto = <21>;
qcom,hw-tsu-sta = <21>;
qcom,hw-thd-dat = <13>;
qcom,hw-thd-sta = <18>;
qcom,hw-tbuf = <25>;
qcom,hw-thigh = <38>;
qcom,hw-tlow = <56>;
qcom,hw-tsu-sto = <40>;
qcom,hw-tsu-sta = <40>;
qcom,hw-thd-dat = <22>;
qcom,hw-thd-sta = <35>;
qcom,hw-tbuf = <62>;
qcom,hw-scl-stretch-en = <1>;
qcom,hw-trdhld = <6>;
qcom,hw-tsp = <3>;
qcom,cci-clk-src = <37500000>;
status = "ok";
};
@ -786,8 +789,8 @@
qcom,hw-tsu-sta = <18>;
qcom,hw-thd-dat = <16>;
qcom,hw-thd-sta = <15>;
qcom,hw-tbuf = <19>;
qcom,hw-scl-stretch-en = <1>;
qcom,hw-tbuf = <24>;
qcom,hw-scl-stretch-en = <0>;
qcom,hw-trdhld = <3>;
qcom,hw-tsp = <3>;
qcom,cci-clk-src = <37500000>;

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -1819,17 +1819,17 @@ static void msm_cci_init_default_clk_params(struct cci_device *cci_dev,
uint8_t index)
{
/* default clock params are for 100Khz */
cci_dev->cci_clk_params[index].hw_thigh = 78;
cci_dev->cci_clk_params[index].hw_tlow = 114;
cci_dev->cci_clk_params[index].hw_tsu_sto = 28;
cci_dev->cci_clk_params[index].hw_tsu_sta = 28;
cci_dev->cci_clk_params[index].hw_thd_dat = 10;
cci_dev->cci_clk_params[index].hw_thd_sta = 77;
cci_dev->cci_clk_params[index].hw_tbuf = 118;
cci_dev->cci_clk_params[index].hw_thigh = 201;
cci_dev->cci_clk_params[index].hw_tlow = 174;
cci_dev->cci_clk_params[index].hw_tsu_sto = 204;
cci_dev->cci_clk_params[index].hw_tsu_sta = 231;
cci_dev->cci_clk_params[index].hw_thd_dat = 22;
cci_dev->cci_clk_params[index].hw_thd_sta = 162;
cci_dev->cci_clk_params[index].hw_tbuf = 227;
cci_dev->cci_clk_params[index].hw_scl_stretch_en = 0;
cci_dev->cci_clk_params[index].hw_trdhld = 6;
cci_dev->cci_clk_params[index].hw_tsp = 1;
cci_dev->cci_clk_params[index].cci_clk_src = 19200000;
cci_dev->cci_clk_params[index].hw_tsp = 3;
cci_dev->cci_clk_params[index].cci_clk_src = 37500000;
}
static void msm_cci_init_clk_params(struct cci_device *cci_dev)