linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] add i2c support for mt8168
@ 2022-03-07  3:36 Kewei Xu
  2022-03-07  3:36 ` [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC Kewei Xu
  2022-03-07  3:36 ` [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168 Kewei Xu
  0 siblings, 2 replies; 10+ messages in thread
From: Kewei Xu @ 2022-03-07  3:36 UTC (permalink / raw)
  To: wsa
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	qii.wang, liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei,
	kewei.xu

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(+)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC
  2022-03-07  3:36 [PATCH v1 0/2] add i2c support for mt8168 Kewei Xu
@ 2022-03-07  3:36 ` Kewei Xu
  2022-03-07 10:49   ` AngeloGioacchino Del Regno
                     ` (3 more replies)
  2022-03-07  3:36 ` [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168 Kewei Xu
  1 sibling, 4 replies; 10+ messages in thread
From: Kewei Xu @ 2022-03-07  3:36 UTC (permalink / raw)
  To: wsa
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	qii.wang, liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei,
	kewei.xu

Add a DT binding documentation for the MT8168 soc.

Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>
---
 Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
index 88f74a3c81ec..026985b8f61a 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
@@ -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
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168
  2022-03-07  3:36 [PATCH v1 0/2] add i2c support for mt8168 Kewei Xu
  2022-03-07  3:36 ` [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC Kewei Xu
@ 2022-03-07  3:36 ` Kewei Xu
  2022-03-07 10:47   ` AngeloGioacchino Del Regno
                     ` (2 more replies)
  1 sibling, 3 replies; 10+ messages in thread
From: Kewei Xu @ 2022-03-07  3:36 UTC (permalink / raw)
  To: wsa
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	qii.wang, liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei,
	kewei.xu

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

Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>
---
 drivers/i2c/busses/i2c-mt65xx.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index 682293ec9825..99db0a2ebe9c 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -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 },
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168
  2022-03-07  3:36 ` [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168 Kewei Xu
@ 2022-03-07 10:47   ` AngeloGioacchino Del Regno
  2022-03-08  0:58   ` Qii Wang
  2022-03-11 20:37   ` Wolfram Sang
  2 siblings, 0 replies; 10+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-03-07 10:47 UTC (permalink / raw)
  To: Kewei Xu, wsa
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	qii.wang, liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei

Il 07/03/22 04:36, Kewei Xu ha scritto:
> Add i2c compatible for MT8168. Compare to MT2712 i2c controller,
> MT8168 need to synchronize signal with dma.
> 
> Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC
  2022-03-07  3:36 ` [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC Kewei Xu
@ 2022-03-07 10:49   ` AngeloGioacchino Del Regno
  2022-03-07 18:46   ` Krzysztof Kozlowski
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-03-07 10:49 UTC (permalink / raw)
  To: Kewei Xu, wsa
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	qii.wang, liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei

Il 07/03/22 04:36, Kewei Xu ha scritto:
> Add a DT binding documentation for the MT8168 soc.
> 
> Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>

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

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> ---
>   Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
> index 88f74a3c81ec..026985b8f61a 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
> @@ -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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC
  2022-03-07  3:36 ` [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC Kewei Xu
  2022-03-07 10:49   ` AngeloGioacchino Del Regno
@ 2022-03-07 18:46   ` Krzysztof Kozlowski
  2022-03-08  0:48   ` Qii Wang
  2022-03-11 20:37   ` Wolfram Sang
  3 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-07 18:46 UTC (permalink / raw)
  To: Kewei Xu, wsa
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	qii.wang, liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei

On 07/03/2022 04:36, Kewei Xu wrote:
> Add a DT binding documentation for the MT8168 soc.
> 
> Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt | 1 +
>  1 file changed, 1 insertion(+)
> 


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC
  2022-03-07  3:36 ` [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC Kewei Xu
  2022-03-07 10:49   ` AngeloGioacchino Del Regno
  2022-03-07 18:46   ` Krzysztof Kozlowski
@ 2022-03-08  0:48   ` Qii Wang
  2022-03-11 20:37   ` Wolfram Sang
  3 siblings, 0 replies; 10+ messages in thread
From: Qii Wang @ 2022-03-08  0:48 UTC (permalink / raw)
  To: Kewei Xu, wsa
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei

On Mon, 2022-03-07 at 11:36 +0800, Kewei Xu wrote:
> Add a DT binding documentation for the MT8168 soc.
> 
> Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>

Reviewed-by: Qii Wang <qii.wang@mediatek.com>

> ---
>  Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
> b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
> index 88f74a3c81ec..026985b8f61a 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
> @@ -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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168
  2022-03-07  3:36 ` [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168 Kewei Xu
  2022-03-07 10:47   ` AngeloGioacchino Del Regno
@ 2022-03-08  0:58   ` Qii Wang
  2022-03-11 20:37   ` Wolfram Sang
  2 siblings, 0 replies; 10+ messages in thread
From: Qii Wang @ 2022-03-08  0:58 UTC (permalink / raw)
  To: Kewei Xu, wsa
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei

On Mon, 2022-03-07 at 11:36 +0800, Kewei Xu wrote:
> Add i2c compatible for MT8168. Compare to MT2712 i2c controller,
> MT8168 need to synchronize signal with dma.
> 
> Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>

Reviewed-by: Qii Wang <qii.wang@mediatek.com>

> ---
>  drivers/i2c/busses/i2c-mt65xx.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC
  2022-03-07  3:36 ` [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC Kewei Xu
                     ` (2 preceding siblings ...)
  2022-03-08  0:48   ` Qii Wang
@ 2022-03-11 20:37   ` Wolfram Sang
  3 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2022-03-11 20:37 UTC (permalink / raw)
  To: Kewei Xu
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	qii.wang, liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

On Mon, Mar 07, 2022 at 11:36:48AM +0800, Kewei Xu wrote:
> Add a DT binding documentation for the MT8168 soc.
> 
> Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168
  2022-03-07  3:36 ` [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168 Kewei Xu
  2022-03-07 10:47   ` AngeloGioacchino Del Regno
  2022-03-08  0:58   ` Qii Wang
@ 2022-03-11 20:37   ` Wolfram Sang
  2 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2022-03-11 20:37 UTC (permalink / raw)
  To: Kewei Xu
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu,
	qii.wang, liguo.zhang, caiyu.chen, housong.zhang, yuhan.wei

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]

On Mon, Mar 07, 2022 at 11:36:49AM +0800, Kewei Xu wrote:
> Add i2c compatible for MT8168. Compare to MT2712 i2c controller,
> MT8168 need to synchronize signal with dma.
> 
> Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-11 20:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07  3:36 [PATCH v1 0/2] add i2c support for mt8168 Kewei Xu
2022-03-07  3:36 ` [PATCH v1 1/2] dt-bindings: i2c: update bindings for MT8168 SoC Kewei Xu
2022-03-07 10:49   ` AngeloGioacchino Del Regno
2022-03-07 18:46   ` Krzysztof Kozlowski
2022-03-08  0:48   ` Qii Wang
2022-03-11 20:37   ` Wolfram Sang
2022-03-07  3:36 ` [PATCH v1 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8168 Kewei Xu
2022-03-07 10:47   ` AngeloGioacchino Del Regno
2022-03-08  0:58   ` Qii Wang
2022-03-11 20:37   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).