mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
i2c: qcom-cci: Switch msm8953 to the CCI v2 timing/rate config
The msm8953 CCI timing table is internally inconsistent. Its Standard and Fast timings match v1/v1.5, which are calibrated for a 19.2 MHz CCI clock, but its Fast+ timings are essentially the 'v2' values, which are calibrated for 37.5 MHz. Since all masters share a single CCI clock, no single rate can satisfy all three modes with the current table, and the DT assigns 19.2 MHz, so Fast+ timings are wrong. The msm8953 CCI is the same hardware version as msm8996/sdm630, which already use the cci_v2_data config (37.5 MHz). 37.5 MHz is supported by the msm8953 CCI RCG, so reuse cci_v2_data for msm8953 as well and drop the redundant, inconsistent standalone table. This makes all three I2C modes self-consistent under a single clock rate. Note this requires the CCI clock to run at 37.5 MHz, the driver selects and enforces the proper rate in following patches. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://patch.msgid.link/20260929-cci-clk-fix-v6-1-62a268cccb0f@oss.qualcomm.com
This commit is contained in:
parent
8027cc6835
commit
d07c7775ca
|
|
@ -753,54 +753,9 @@ static const struct cci_data cci_v2_data = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct cci_data cci_msm8953_data = {
|
||||
.num_masters = 2,
|
||||
.queue_size = { 64, 16 },
|
||||
.quirks = {
|
||||
.max_write_len = 11,
|
||||
.max_read_len = 12,
|
||||
},
|
||||
.params[I2C_MODE_STANDARD] = {
|
||||
.thigh = 78,
|
||||
.tlow = 114,
|
||||
.tsu_sto = 28,
|
||||
.tsu_sta = 28,
|
||||
.thd_dat = 10,
|
||||
.thd_sta = 77,
|
||||
.tbuf = 118,
|
||||
.scl_stretch_en = 0,
|
||||
.trdhld = 6,
|
||||
.tsp = 1
|
||||
},
|
||||
.params[I2C_MODE_FAST] = {
|
||||
.thigh = 20,
|
||||
.tlow = 28,
|
||||
.tsu_sto = 21,
|
||||
.tsu_sta = 21,
|
||||
.thd_dat = 13,
|
||||
.thd_sta = 18,
|
||||
.tbuf = 32,
|
||||
.scl_stretch_en = 0,
|
||||
.trdhld = 6,
|
||||
.tsp = 3
|
||||
},
|
||||
.params[I2C_MODE_FAST_PLUS] = {
|
||||
.thigh = 16,
|
||||
.tlow = 22,
|
||||
.tsu_sto = 17,
|
||||
.tsu_sta = 18,
|
||||
.thd_dat = 16,
|
||||
.thd_sta = 15,
|
||||
.tbuf = 19,
|
||||
.scl_stretch_en = 1,
|
||||
.trdhld = 3,
|
||||
.tsp = 3
|
||||
},
|
||||
};
|
||||
|
||||
static const struct of_device_id cci_dt_match[] = {
|
||||
{ .compatible = "qcom,msm8226-cci", .data = &cci_v1_data},
|
||||
{ .compatible = "qcom,msm8953-cci", .data = &cci_msm8953_data},
|
||||
{ .compatible = "qcom,msm8953-cci", .data = &cci_v2_data},
|
||||
{ .compatible = "qcom,msm8974-cci", .data = &cci_v1_5_data},
|
||||
{ .compatible = "qcom,msm8996-cci", .data = &cci_v2_data},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user