developer | 5d148cb | 2023-06-02 13:08:11 +0800 | [diff] [blame] | 1 | From c4ad4b0aa7fb10beb510b99caba9cd027a88a723 Mon Sep 17 00:00:00 2001 |
| 2 | From: Sam Shih <sam.shih@mediatek.com> |
| 3 | Date: Fri, 2 Jun 2023 13:06:06 +0800 |
| 4 | Subject: [PATCH] [slow-speed-io][999-2111-i2c-busses-add-mt7981-support.patch] |
| 5 | |
| 6 | --- |
| 7 | drivers/i2c/busses/i2c-mt65xx.c | 15 ++++++++++++++- |
| 8 | 1 file changed, 14 insertions(+), 1 deletion(-) |
| 9 | |
developer | 472dc5c | 2021-12-16 10:28:37 +0800 | [diff] [blame] | 10 | diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c |
developer | 5d148cb | 2023-06-02 13:08:11 +0800 | [diff] [blame] | 11 | index 14d96c876..995e8bbaf 100644 |
developer | 472dc5c | 2021-12-16 10:28:37 +0800 | [diff] [blame] | 12 | --- a/drivers/i2c/busses/i2c-mt65xx.c |
| 13 | +++ b/drivers/i2c/busses/i2c-mt65xx.c |
| 14 | @@ -157,7 +157,7 @@ static const u16 mt_i2c_regs_v1[] = { |
| 15 | |
| 16 | static const u16 mt_i2c_regs_v2[] = { |
| 17 | [OFFSET_DATA_PORT] = 0x0, |
| 18 | - [OFFSET_SLAVE_ADDR] = 0x4, |
| 19 | + [OFFSET_SLAVE_ADDR] = 0x94, |
| 20 | [OFFSET_INTR_MASK] = 0x8, |
| 21 | [OFFSET_INTR_STAT] = 0xc, |
| 22 | [OFFSET_CONTROL] = 0x10, |
| 23 | @@ -289,6 +289,18 @@ static const struct mtk_i2c_compatible mt7622_compat = { |
| 24 | .ltiming_adjust = 0, |
| 25 | }; |
| 26 | |
| 27 | +static const struct mtk_i2c_compatible mt7981_compat = { |
| 28 | + .regs = mt_i2c_regs_v2, |
| 29 | + .pmic_i2c = 0, |
| 30 | + .dcm = 0, |
| 31 | + .auto_restart = 1, |
| 32 | + .aux_len_reg = 1, |
| 33 | + .support_33bits = 1, |
| 34 | + .timing_adjust = 1, |
| 35 | + .dma_sync = 1, |
| 36 | + .ltiming_adjust = 1, |
| 37 | +}; |
| 38 | + |
| 39 | static const struct mtk_i2c_compatible mt7986_compat = { |
| 40 | .quirks = &mt7622_i2c_quirks, |
| 41 | .regs = mt_i2c_regs_v1, |
| 42 | @@ -332,6 +344,7 @@ static const struct of_device_id mtk_i2c_of_match[] = { |
| 43 | { .compatible = "mediatek,mt6577-i2c", .data = &mt6577_compat }, |
| 44 | { .compatible = "mediatek,mt6589-i2c", .data = &mt6589_compat }, |
| 45 | { .compatible = "mediatek,mt7622-i2c", .data = &mt7622_compat }, |
| 46 | + { .compatible = "mediatek,mt7981-i2c", .data = &mt7981_compat }, |
| 47 | { .compatible = "mediatek,mt7986-i2c", .data = &mt7986_compat }, |
| 48 | { .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat }, |
| 49 | { .compatible = "mediatek,mt8183-i2c", .data = &mt8183_compat }, |
| 50 | -- |
developer | 5d148cb | 2023-06-02 13:08:11 +0800 | [diff] [blame] | 51 | 2.34.1 |
developer | 472dc5c | 2021-12-16 10:28:37 +0800 | [diff] [blame] | 52 | |