i2c: i2c-mt65xx: add support for MT7981
Subsystems (4)
cover i2c: i2c-mt65xx: add support for MT7981
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).
Corresponding patch in MediaTek's SDK:
https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/472dc5cf11d4359cb3e3f80577dba22df0696e43/target/linux/mediatek/patches-5.4/0901-i2c-busses-add-mt7981-support.patch
Changes since v1:
* add missing commit description
* add link to patch in MediaTek's SDK to cover letter
Daniel Golle (2):
i2c: mediatek: add support for MT7981 SoC
dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC
.../devicetree/bindings/i2c/i2c-mt65xx.yaml | 1 + drivers/i2c/busses/i2c-mt65xx.c | 13 +++++++++++++ 2 files changed, 14 insertions(+)
base-commit: e134c93f788fb93fd6a3ec3af9af850a2048c7e6
Signature · 1 line
2.40.0
PATCH 1/2 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).
--- drivers/i2c/busses/i2c-mt65xx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/i2c/busses/i2c-mt65xx.c +13 -0
@@ -431,6 +431,18 @@ static const struct mtk_i2c_compatible mt8168_compat = { .max_dma_support = 33, }; +static const struct mtk_i2c_compatible mt7981_compat = { + .regs = mt_i2c_regs_v3, + .pmic_i2c =0 , + .dcm =0 , + .auto_restart =1 , + .aux_len_reg =1 , + .timing_adjust =1 , + .dma_sync =1 , + .ltiming_adjust =1 , + .max_dma_support =33 +}; +static const struct mtk_i2c_compatible mt7986_compat = { .quirks = &mt7622_i2c_quirks, .regs = mt_i2c_regs_v1,
@@ -516,6 +528,7 @@ static const struct of_device_id mtk_i2c_of_match[] = { { .compatible = "mediatek,mt6577-i2c", .data = &mt6577_compat }, { .compatible = "mediatek,mt6589-i2c", .data = &mt6589_compat }, { .compatible = "mediatek,mt7622-i2c", .data = &mt7622_compat }, + { .compatible = "mediatek,mt7981-i2c", .data = &mt7981_compat }, { .compatible = "mediatek,mt7986-i2c", .data = &mt7986_compat }, { .compatible = "mediatek,mt8168-i2c", .data = &mt8168_compat }, { .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat },
Signature · 1 line
2.40.0
PATCH 2/2 dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC
In reply to Daniel GolleAdd binding documentation for the I2C controllers found in the MediaTek MT7981 SoC.
--- Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml +1 -0
@@ -23,6 +23,7 @@ properties: - const: mediatek,mt6577-i2c - const: mediatek,mt6589-i2c - const: mediatek,mt7622-i2c + - const: mediatek,mt7981-i2c - const: mediatek,mt7986-i2c - const: mediatek,mt8168-i2c - const: mediatek,mt8173-i2c
Signature · 1 line
2.40.0
Re: [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC
Quoted 2 lines · Daniel Golle
Add binding documentation for the I2C controllers found in the MediaTek MT7981 SoC.
Subject: drop second/last, redundant "binding". The "dt-bindings" prefix is already stating that these are bindings.
Bindings come before patches using them.
BTW, I did not get previous patch at all, but your cover letter suggests these are compatible.
Best regards,
Krzysztof