linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] i2c: i2c-mt65xx: add support for MT7981
@ 2023-04-10 16:19 Daniel Golle
  2023-04-10 16:19 ` [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC Daniel Golle
  2023-04-10 16:19 ` [PATCH v3 2/2] i2c: mediatek: add support for " Daniel Golle
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Golle @ 2023-04-10 16:19 UTC (permalink / raw)
  To: linux-i2c, linux-mediatek, linux-arm-kernel, linux-kernel,
	devicetree, Qii Wang, Rob Herring, Krzysztof Kozlowski,
	AngeloGioacchino Del Regno, Matthias Brugger, Sam Shih

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 commit 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 v2:
 * bindings come before patches using them
 * remove reduntant word 'bindings' from dt-bindings commit

Changes since v1:
 * add missing commit description
 * add link to commit in MediaTek's SDK to cover letter

Daniel Golle (2):
  dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC
  i2c: mediatek: add support 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
-- 
2.40.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC
  2023-04-10 16:19 [PATCH v3 0/2] i2c: i2c-mt65xx: add support for MT7981 Daniel Golle
@ 2023-04-10 16:19 ` Daniel Golle
  2023-04-11  5:53   ` Krzysztof Kozlowski
                     ` (2 more replies)
  2023-04-10 16:19 ` [PATCH v3 2/2] i2c: mediatek: add support for " Daniel Golle
  1 sibling, 3 replies; 9+ messages in thread
From: Daniel Golle @ 2023-04-10 16:19 UTC (permalink / raw)
  To: linux-i2c, linux-mediatek, linux-arm-kernel, linux-kernel,
	devicetree, Qii Wang, Rob Herring, Krzysztof Kozlowski,
	AngeloGioacchino Del Regno, Matthias Brugger, Sam Shih

Add compatible string for the I2C controllers found in the MediaTek
MT7981 SoC.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml
index 685da4df688d6..fda0467cdd954 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml
@@ -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
-- 
2.40.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 2/2] i2c: mediatek: add support for MT7981 SoC
  2023-04-10 16:19 [PATCH v3 0/2] i2c: i2c-mt65xx: add support for MT7981 Daniel Golle
  2023-04-10 16:19 ` [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC Daniel Golle
@ 2023-04-10 16:19 ` Daniel Golle
  2023-04-11  8:16   ` AngeloGioacchino Del Regno
                     ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Daniel Golle @ 2023-04-10 16:19 UTC (permalink / raw)
  To: linux-i2c, linux-mediatek, linux-arm-kernel, linux-kernel,
	devicetree, Qii Wang, Rob Herring, Krzysztof Kozlowski,
	AngeloGioacchino Del Regno, Matthias Brugger, Sam Shih

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>
---
 drivers/i2c/busses/i2c-mt65xx.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index 59eaefe999b11..a43c4d77739ab 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -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 },
-- 
2.40.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC
  2023-04-10 16:19 ` [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC Daniel Golle
@ 2023-04-11  5:53   ` Krzysztof Kozlowski
  2023-04-11  8:16   ` AngeloGioacchino Del Regno
  2023-04-13 16:40   ` Wolfram Sang
  2 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-11  5:53 UTC (permalink / raw)
  To: Daniel Golle, linux-i2c, linux-mediatek, linux-arm-kernel,
	linux-kernel, devicetree, Qii Wang, Rob Herring,
	Krzysztof Kozlowski, AngeloGioacchino Del Regno, Matthias Brugger,
	Sam Shih

On 10/04/2023 18:19, Daniel Golle wrote:
> Add compatible string for the I2C controllers found in the MediaTek
> MT7981 SoC.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/2] i2c: mediatek: add support for MT7981 SoC
  2023-04-10 16:19 ` [PATCH v3 2/2] i2c: mediatek: add support for " Daniel Golle
@ 2023-04-11  8:16   ` AngeloGioacchino Del Regno
  2023-04-11  8:31   ` Alexandre Mergnat
  2023-04-13 16:40   ` Wolfram Sang
  2 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-11  8:16 UTC (permalink / raw)
  To: Daniel Golle, linux-i2c, linux-mediatek, linux-arm-kernel,
	linux-kernel, devicetree, Qii Wang, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger, Sam Shih

Il 10/04/23 18:19, Daniel Golle ha scritto:
> 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>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC
  2023-04-10 16:19 ` [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC Daniel Golle
  2023-04-11  5:53   ` Krzysztof Kozlowski
@ 2023-04-11  8:16   ` AngeloGioacchino Del Regno
  2023-04-13 16:40   ` Wolfram Sang
  2 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-11  8:16 UTC (permalink / raw)
  To: Daniel Golle, linux-i2c, linux-mediatek, linux-arm-kernel,
	linux-kernel, devicetree, Qii Wang, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger, Sam Shih

Il 10/04/23 18:19, Daniel Golle ha scritto:
> Add compatible string for the I2C controllers found in the MediaTek
> MT7981 SoC.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>

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



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/2] i2c: mediatek: add support for MT7981 SoC
  2023-04-10 16:19 ` [PATCH v3 2/2] i2c: mediatek: add support for " Daniel Golle
  2023-04-11  8:16   ` AngeloGioacchino Del Regno
@ 2023-04-11  8:31   ` Alexandre Mergnat
  2023-04-13 16:40   ` Wolfram Sang
  2 siblings, 0 replies; 9+ messages in thread
From: Alexandre Mergnat @ 2023-04-11  8:31 UTC (permalink / raw)
  To: Daniel Golle, linux-i2c, linux-mediatek, linux-arm-kernel,
	linux-kernel, devicetree, Qii Wang, Rob Herring,
	Krzysztof Kozlowski, AngeloGioacchino Del Regno, Matthias Brugger,
	Sam Shih

On 10/04/2023 18:19, Daniel Golle wrote:
> 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).

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC
  2023-04-10 16:19 ` [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC Daniel Golle
  2023-04-11  5:53   ` Krzysztof Kozlowski
  2023-04-11  8:16   ` AngeloGioacchino Del Regno
@ 2023-04-13 16:40   ` Wolfram Sang
  2 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2023-04-13 16:40 UTC (permalink / raw)
  To: Daniel Golle
  Cc: linux-i2c, linux-mediatek, linux-arm-kernel, linux-kernel,
	devicetree, Qii Wang, Rob Herring, Krzysztof Kozlowski,
	AngeloGioacchino Del Regno, Matthias Brugger, Sam Shih


[-- Attachment #1.1: Type: text/plain, Size: 242 bytes --]

On Mon, Apr 10, 2023 at 05:19:21PM +0100, Daniel Golle wrote:
> Add compatible string for the I2C controllers found in the MediaTek
> MT7981 SoC.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Applied to for-next, thanks!


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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/2] i2c: mediatek: add support for MT7981 SoC
  2023-04-10 16:19 ` [PATCH v3 2/2] i2c: mediatek: add support for " Daniel Golle
  2023-04-11  8:16   ` AngeloGioacchino Del Regno
  2023-04-11  8:31   ` Alexandre Mergnat
@ 2023-04-13 16:40   ` Wolfram Sang
  2 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2023-04-13 16:40 UTC (permalink / raw)
  To: Daniel Golle
  Cc: linux-i2c, linux-mediatek, linux-arm-kernel, linux-kernel,
	devicetree, Qii Wang, Rob Herring, Krzysztof Kozlowski,
	AngeloGioacchino Del Regno, Matthias Brugger, Sam Shih


[-- Attachment #1.1: Type: text/plain, Size: 397 bytes --]

On Mon, Apr 10, 2023 at 05:19:38PM +0100, Daniel Golle wrote:
> 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>

Applied to for-next, thanks!


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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-04-13 16:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-10 16:19 [PATCH v3 0/2] i2c: i2c-mt65xx: add support for MT7981 Daniel Golle
2023-04-10 16:19 ` [PATCH v3 1/2] dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC Daniel Golle
2023-04-11  5:53   ` Krzysztof Kozlowski
2023-04-11  8:16   ` AngeloGioacchino Del Regno
2023-04-13 16:40   ` Wolfram Sang
2023-04-10 16:19 ` [PATCH v3 2/2] i2c: mediatek: add support for " Daniel Golle
2023-04-11  8:16   ` AngeloGioacchino Del Regno
2023-04-11  8:31   ` Alexandre Mergnat
2023-04-13 16:40   ` 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).