Skip to contentSkip to conversation

add i2c support for mt8168

PATCH Applied Kewei Xu 5 participants 10 messages Mar 7, 2022 – Mar 11, 2022

Subsystems (4)
lore
Share & tools
lore

Kewei Xu

author
#0 lore raw

cover add i2c support for mt8168

Kewei Xu (2):
dt-bindings: i2c: update bindings for MT8168 SoC
i2c: mediatek: Add i2c compatible for Mediatek MT8168

 .../devicetree/bindings/i2c/i2c-mt65xx.txt         |  1 +
 drivers/i2c/busses/i2c-mt65xx.c                    | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
Signature · 1 line
2.18.0
author
#1 lore raw

PATCH 1/2 dt-bindings: i2c: update bindings for MT8168 SoC

Add a DT binding documentation for the MT8168 soc.

---
 Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt +1 -0
index 88f74a3c81ec..026985b8f61a 100644
@@ -12,6 +12,7 @@ Required properties:
       "mediatek,mt7622-i2c": for MediaTek MT7622
       "mediatek,mt7623-i2c", "mediatek,mt6577-i2c": for MediaTek MT7623
       "mediatek,mt7629-i2c", "mediatek,mt2712-i2c": for MediaTek MT7629
+      "mediatek,mt8168-i2c": for MediaTek MT8168
       "mediatek,mt8173-i2c": for MediaTek MT8173
       "mediatek,mt8183-i2c": for MediaTek MT8183
       "mediatek,mt8186-i2c": for MediaTek MT8186
Signature · 1 line
2.18.0
maintainer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC

Il 07/03/22 04:36, Kewei Xu ha scritto:

Quoted 3 lines

Add a DT binding documentation for the MT8168 soc.

A conversion to dt-binding (yaml) would be very appreciated... however there is nothing wrong with this addition, so:

Quoted 9 lines
---
  Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt | 1 +
  1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt +0 -0
index 88f74a3c81ec..026985b8f61a 100644

Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt Required properties: · line 18

Quoted 7 lines
Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt +1 -0
@@ -12,6 +12,7 @@ Required properties:
        "mediatek,mt7622-i2c": for MediaTek MT7622
        "mediatek,mt7623-i2c", "mediatek,mt6577-i2c": for MediaTek MT7623
        "mediatek,mt7629-i2c", "mediatek,mt2712-i2c": for MediaTek MT7629
+      "mediatek,mt8168-i2c": for MediaTek MT8168
        "mediatek,mt8173-i2c": for MediaTek MT8173
        "mediatek,mt8183-i2c": for MediaTek MT8183
        "mediatek,mt8186-i2c": for MediaTek MT8186

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

maintainer Reviewed-by on v1 1/2
#4 lore raw

Re: [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC

In reply to Kewei Xu
Quoted 3 lines · Kewei Xu

Add a DT binding documentation for the MT8168 soc.

Quoted 19 lines
---
 Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt +0 -0
index 88f74a3c81ec..026985b8f61a 100644
@@ -12,6 +12,7 @@ Required properties:
       "mediatek,mt7622-i2c": for MediaTek MT7622
       "mediatek,mt7623-i2c", "mediatek,mt6577-i2c": for MediaTek

MT7623

       "mediatek,mt7629-i2c", "mediatek,mt2712-i2c": for MediaTek
MT7629
+      "mediatek,mt8168-i2c": for MediaTek MT8168
       "mediatek,mt8173-i2c": for MediaTek MT8173
       "mediatek,mt8183-i2c": for MediaTek MT8183
       "mediatek,mt8186-i2c": for MediaTek MT8186
author
#6 lore raw

PATCH 2/2 i2c: mediatek: Add i2c compatible for Mediatek MT8168

In reply to Kewei Xu

Add i2c compatible for MT8168. Compare to MT2712 i2c controller, MT8168 need to synchronize signal with dma.

---
 drivers/i2c/busses/i2c-mt65xx.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/i2c/busses/i2c-mt65xx.c +14 -0
index 682293ec9825..99db0a2ebe9c 100644
@@ -371,6 +371,19 @@ static const struct mtk_i2c_compatible mt7622_compat = {
 	.max_dma_support = 32,
 };
 
+static const struct mtk_i2c_compatible mt8168_compat = {
+	.regs = mt_i2c_regs_v1,
+	.pmic_i2c = 0,
+	.dcm = 1,
+	.auto_restart = 1,
+	.aux_len_reg = 1,
+	.timing_adjust = 1,
+	.dma_sync = 1,
+	.ltiming_adjust = 0,
+	.apdma_sync = 0,
+	.max_dma_support = 33,
+};
+
 static const struct mtk_i2c_compatible mt8173_compat = {
 	.regs = mt_i2c_regs_v1,
 	.pmic_i2c = 0,
@@ -430,6 +443,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,mt8168-i2c", .data = &mt8168_compat },
 	{ .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat },
 	{ .compatible = "mediatek,mt8183-i2c", .data = &mt8183_compat },
 	{ .compatible = "mediatek,mt8186-i2c", .data = &mt8186_compat },
Signature · 1 line
2.18.0
maintainer Reviewed-by on v1 2/2
#7 lore raw

Re: [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168

Il 07/03/22 04:36, Kewei Xu ha scritto:

Quoted 4 lines

Add i2c compatible for MT8168. Compare to MT2712 i2c controller, MT8168 need to synchronize signal with dma.

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

maintainer Reviewed-by on v1 2/2
#8 lore raw

Re: [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168

In reply to Kewei Xu
Quoted 4 lines · Kewei Xu

Add i2c compatible for MT8168. Compare to MT2712 i2c controller, MT8168 need to synchronize signal with dma.

Quoted 5 lines
---
 drivers/i2c/busses/i2c-mt65xx.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Applied
#9 lore raw

Re: [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168

In reply to Kewei Xu
Quoted 4 lines · Kewei Xu

Add i2c compatible for MT8168. Compare to MT2712 i2c controller, MT8168 need to synchronize signal with dma.

Applied to for-next, thanks!