Skip to content

Commit d202341

Browse files
z3ntuWolfram Sang
authored andcommitted
i2c: qcom-cci: Add msm8953 compatible
Add a config for the v1.2.5 CCI found on msm8953 which has different values in .params compared to others already supported in the driver. Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Luca Weiss <luca@lucaweiss.eu> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
1 parent f60d68e commit d202341

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

drivers/i2c/busses/i2c-qcom-cci.c

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,54 @@ static const struct cci_data cci_v2_data = {
783783
},
784784
};
785785

786+
static const struct cci_data cci_msm8953_data = {
787+
.num_masters = 2,
788+
.queue_size = { 64, 16 },
789+
.quirks = {
790+
.max_write_len = 11,
791+
.max_read_len = 12,
792+
},
793+
.params[I2C_MODE_STANDARD] = {
794+
.thigh = 78,
795+
.tlow = 114,
796+
.tsu_sto = 28,
797+
.tsu_sta = 28,
798+
.thd_dat = 10,
799+
.thd_sta = 77,
800+
.tbuf = 118,
801+
.scl_stretch_en = 0,
802+
.trdhld = 6,
803+
.tsp = 1
804+
},
805+
.params[I2C_MODE_FAST] = {
806+
.thigh = 20,
807+
.tlow = 28,
808+
.tsu_sto = 21,
809+
.tsu_sta = 21,
810+
.thd_dat = 13,
811+
.thd_sta = 18,
812+
.tbuf = 32,
813+
.scl_stretch_en = 0,
814+
.trdhld = 6,
815+
.tsp = 3
816+
},
817+
.params[I2C_MODE_FAST_PLUS] = {
818+
.thigh = 16,
819+
.tlow = 22,
820+
.tsu_sto = 17,
821+
.tsu_sta = 18,
822+
.thd_dat = 16,
823+
.thd_sta = 15,
824+
.tbuf = 19,
825+
.scl_stretch_en = 1,
826+
.trdhld = 3,
827+
.tsp = 3
828+
},
829+
};
830+
786831
static const struct of_device_id cci_dt_match[] = {
787832
{ .compatible = "qcom,msm8226-cci", .data = &cci_v1_data},
833+
{ .compatible = "qcom,msm8953-cci", .data = &cci_msm8953_data},
788834
{ .compatible = "qcom,msm8974-cci", .data = &cci_v1_5_data},
789835
{ .compatible = "qcom,msm8996-cci", .data = &cci_v2_data},
790836

0 commit comments

Comments
 (0)