Skip to content

Commit f82fd18

Browse files
dangowrtwsakernel
authored andcommitted
i2c: mediatek: add support for MT7981 SoC
Add support for the I2C units found in the MediaTek MT7981 and MT7988 SoCs. Just like other recent MediaTek I2C units that also uses v3 register offsets (which differ from v2 only by OFFSET_SLAVE_ADDR being 0x94 instead of 0x4). Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent 4b52565 commit f82fd18

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

drivers/i2c/busses/i2c-mt65xx.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,18 @@ static const struct mtk_i2c_compatible mt8168_compat = {
431431
.max_dma_support = 33,
432432
};
433433

434+
static const struct mtk_i2c_compatible mt7981_compat = {
435+
.regs = mt_i2c_regs_v3,
436+
.pmic_i2c = 0,
437+
.dcm = 0,
438+
.auto_restart = 1,
439+
.aux_len_reg = 1,
440+
.timing_adjust = 1,
441+
.dma_sync = 1,
442+
.ltiming_adjust = 1,
443+
.max_dma_support = 33
444+
};
445+
434446
static const struct mtk_i2c_compatible mt7986_compat = {
435447
.quirks = &mt7622_i2c_quirks,
436448
.regs = mt_i2c_regs_v1,
@@ -516,6 +528,7 @@ static const struct of_device_id mtk_i2c_of_match[] = {
516528
{ .compatible = "mediatek,mt6577-i2c", .data = &mt6577_compat },
517529
{ .compatible = "mediatek,mt6589-i2c", .data = &mt6589_compat },
518530
{ .compatible = "mediatek,mt7622-i2c", .data = &mt7622_compat },
531+
{ .compatible = "mediatek,mt7981-i2c", .data = &mt7981_compat },
519532
{ .compatible = "mediatek,mt7986-i2c", .data = &mt7986_compat },
520533
{ .compatible = "mediatek,mt8168-i2c", .data = &mt8168_compat },
521534
{ .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat },

0 commit comments

Comments
 (0)