mediatek: copy patches-6.1 to patches-6.6
[openwrt/staging/981213.git] / target / linux / mediatek / patches-6.6 / 851-v6.2-i2c-mediatek-add-mt7986-support.patch
1 From 11f9a0f4e51887ad7b4a2898a368fcd0c2984e89 Mon Sep 17 00:00:00 2001
2 From: Frank Wunderlich <frank-w@public-files.de>
3 Date: Sun, 9 Oct 2022 12:16:31 +0200
4 Subject: [PATCH 12/16] i2c: mediatek: add mt7986 support
5
6 Add i2c support for MT7986 SoC.
7
8 Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
9 Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
10 Signed-off-by: Wolfram Sang <wsa@kernel.org>
11 ---
12 drivers/i2c/busses/i2c-mt65xx.c | 14 ++++++++++++++
13 1 file changed, 14 insertions(+)
14
15 --- a/drivers/i2c/busses/i2c-mt65xx.c
16 +++ b/drivers/i2c/busses/i2c-mt65xx.c
17 @@ -431,6 +431,19 @@ static const struct mtk_i2c_compatible m
18 .max_dma_support = 33,
19 };
20
21 +static const struct mtk_i2c_compatible mt7986_compat = {
22 + .quirks = &mt7622_i2c_quirks,
23 + .regs = mt_i2c_regs_v1,
24 + .pmic_i2c = 0,
25 + .dcm = 1,
26 + .auto_restart = 1,
27 + .aux_len_reg = 1,
28 + .timing_adjust = 0,
29 + .dma_sync = 1,
30 + .ltiming_adjust = 0,
31 + .max_dma_support = 32,
32 +};
33 +
34 static const struct mtk_i2c_compatible mt8173_compat = {
35 .regs = mt_i2c_regs_v1,
36 .pmic_i2c = 0,
37 @@ -503,6 +516,7 @@ static const struct of_device_id mtk_i2c
38 { .compatible = "mediatek,mt6577-i2c", .data = &mt6577_compat },
39 { .compatible = "mediatek,mt6589-i2c", .data = &mt6589_compat },
40 { .compatible = "mediatek,mt7622-i2c", .data = &mt7622_compat },
41 + { .compatible = "mediatek,mt7986-i2c", .data = &mt7986_compat },
42 { .compatible = "mediatek,mt8168-i2c", .data = &mt8168_compat },
43 { .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat },
44 { .compatible = "mediatek,mt8183-i2c", .data = &mt8183_compat },