184fe94ff80bde09fae77a22d43c1a8a05d07305
[openwrt/staging/ldir.git] /
1 From 83630e3c6147bf7bb18a18f3d5a99462464f450b Mon Sep 17 00:00:00 2001
2 From: Kewei Xu <kewei.xu@mediatek.com>
3 Date: Tue, 25 Jan 2022 19:04:13 +0800
4 Subject: [PATCH 03/16] i2c: mediatek: Add i2c compatible for Mediatek MT8186
5
6 Add i2c compatible for MT8186. Compare to MT8192 i2c controller,
7 MT8186 doesn't need handshake signal witch apdma.
8
9 Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>
10 Reviewed-by: Qii Wang <qii.wang@mediatek.com>
11 Signed-off-by: Wolfram Sang <wsa@kernel.org>
12 ---
13 drivers/i2c/busses/i2c-mt65xx.c | 14 ++++++++++++++
14 1 file changed, 14 insertions(+)
15
16 --- a/drivers/i2c/busses/i2c-mt65xx.c
17 +++ b/drivers/i2c/busses/i2c-mt65xx.c
18 @@ -397,6 +397,19 @@ static const struct mtk_i2c_compatible m
19 .max_dma_support = 33,
20 };
21
22 +static const struct mtk_i2c_compatible mt8186_compat = {
23 + .regs = mt_i2c_regs_v2,
24 + .pmic_i2c = 0,
25 + .dcm = 0,
26 + .auto_restart = 1,
27 + .aux_len_reg = 1,
28 + .timing_adjust = 1,
29 + .dma_sync = 0,
30 + .ltiming_adjust = 1,
31 + .apdma_sync = 0,
32 + .max_dma_support = 36,
33 +};
34 +
35 static const struct mtk_i2c_compatible mt8192_compat = {
36 .quirks = &mt8183_i2c_quirks,
37 .regs = mt_i2c_regs_v2,
38 @@ -418,6 +431,7 @@ static const struct of_device_id mtk_i2c
39 { .compatible = "mediatek,mt7622-i2c", .data = &mt7622_compat },
40 { .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat },
41 { .compatible = "mediatek,mt8183-i2c", .data = &mt8183_compat },
42 + { .compatible = "mediatek,mt8186-i2c", .data = &mt8186_compat },
43 { .compatible = "mediatek,mt8192-i2c", .data = &mt8192_compat },
44 {}
45 };