* [PATCH 0/2] i2c: i2c-mt65xx: add support for MT7981
@ 2023-03-14 1:18 Daniel Golle
2023-03-14 1:18 ` [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC Daniel Golle
2023-03-14 1:18 ` [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding " Daniel Golle
0 siblings, 2 replies; 8+ messages in thread
From: Daniel Golle @ 2023-03-14 1:18 UTC (permalink / raw)
To: linux-i2c, linux-mediatek, linux-arm-kernel, linux-kernel,
devicetree, Qii Wang, Rob Herring, Krzysztof Kozlowski,
Matthias Brugger, AngeloGioacchino Del Regno
Add support for the I2C units found in the MT7981 SoC.
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: 24469a0e5052ba01a35a15f104717a82b7a4798b
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC
2023-03-14 1:18 [PATCH 0/2] i2c: i2c-mt65xx: add support for MT7981 Daniel Golle
@ 2023-03-14 1:18 ` Daniel Golle
2023-03-14 9:26 ` AngeloGioacchino Del Regno
2023-03-14 1:18 ` [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding " Daniel Golle
1 sibling, 1 reply; 8+ messages in thread
From: Daniel Golle @ 2023-03-14 1:18 UTC (permalink / raw)
To: linux-i2c, linux-mediatek, linux-arm-kernel, linux-kernel,
devicetree, Qii Wang, Rob Herring, Krzysztof Kozlowski,
Matthias Brugger, AngeloGioacchino Del Regno
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 43dd966d5ef5..54cabd366403 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.39.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC
2023-03-14 1:18 [PATCH 0/2] i2c: i2c-mt65xx: add support for MT7981 Daniel Golle
2023-03-14 1:18 ` [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC Daniel Golle
@ 2023-03-14 1:18 ` Daniel Golle
2023-03-14 9:28 ` AngeloGioacchino Del Regno
1 sibling, 1 reply; 8+ messages in thread
From: Daniel Golle @ 2023-03-14 1:18 UTC (permalink / raw)
To: linux-i2c, linux-mediatek, linux-arm-kernel, linux-kernel,
devicetree, Qii Wang, Rob Herring, Krzysztof Kozlowski,
Matthias Brugger, AngeloGioacchino Del Regno
Add binding documentation 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 72ae2e01cf22..5ae6769483d7 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.39.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC
2023-03-14 1:18 ` [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC Daniel Golle
@ 2023-03-14 9:26 ` AngeloGioacchino Del Regno
2023-03-14 12:32 ` Daniel Golle
0 siblings, 1 reply; 8+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-03-14 9:26 UTC (permalink / raw)
To: Daniel Golle, linux-i2c, linux-mediatek, linux-arm-kernel,
linux-kernel, devicetree, Qii Wang, Rob Herring,
Krzysztof Kozlowski, Matthias Brugger
Il 14/03/23 02:18, Daniel Golle ha scritto:
> 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 43dd966d5ef5..54cabd366403 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,
I've found a downstream kernel saying that MT7981 uses `mt_i2c_regs_v2`,
hence the question:
Are you sure that this is supposed to be v3?
Regards,
Angelo
> + .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 },
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC
2023-03-14 1:18 ` [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding " Daniel Golle
@ 2023-03-14 9:28 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 8+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-03-14 9:28 UTC (permalink / raw)
To: Daniel Golle, linux-i2c, linux-mediatek, linux-arm-kernel,
linux-kernel, devicetree, Qii Wang, Rob Herring,
Krzysztof Kozlowski, Matthias Brugger
Il 14/03/23 02:18, Daniel Golle ha scritto:
> Add binding documentation 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 72ae2e01cf22..5ae6769483d7 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
If MT7981 uses mt_i2c_regs_v2, the i2c compatible would be
compatible = "mediatek,mt7981-i2c", "mediatek,mt8183-i2c";
Regards,
Angelo
> - const: mediatek,mt7986-i2c
> - const: mediatek,mt8168-i2c
> - const: mediatek,mt8173-i2c
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC
2023-03-14 9:26 ` AngeloGioacchino Del Regno
@ 2023-03-14 12:32 ` Daniel Golle
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Golle @ 2023-03-14 12:32 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: linux-i2c, linux-mediatek, linux-arm-kernel, linux-kernel,
devicetree, Qii Wang, Rob Herring, Krzysztof Kozlowski,
Matthias Brugger
On Tue, Mar 14, 2023 at 10:26:56AM +0100, AngeloGioacchino Del Regno wrote:
> Il 14/03/23 02:18, Daniel Golle ha scritto:
> > 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 43dd966d5ef5..54cabd366403 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,
>
> I've found a downstream kernel saying that MT7981 uses `mt_i2c_regs_v2`,
> hence the question:
>
> Are you sure that this is supposed to be v3?
Yes, I've seen that downstream kernel and it also patches
OFFSET_SLAVE_ADDR to be 0x94 instead of 0x4 (which is the only difference
between v2 and v3 regs).
So yes, I'm sure MT7981 and MT7988 use v3 register layout.
>
> Regards,
> Angelo
>
> > + .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 },
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC
2023-04-06 21:41 ` [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC Daniel Golle
@ 2023-04-07 8:36 ` Krzysztof Kozlowski
0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-07 8:36 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 06/04/2023 23:41, Daniel Golle wrote:
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC
2023-04-06 21:41 [PATCH 0/2] i2c: i2c-mt65xx: add support for MT7981 Daniel Golle
@ 2023-04-06 21:41 ` Daniel Golle
2023-04-07 8:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Golle @ 2023-04-06 21:41 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 binding documentation 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
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-04-07 8:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 1:18 [PATCH 0/2] i2c: i2c-mt65xx: add support for MT7981 Daniel Golle
2023-03-14 1:18 ` [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC Daniel Golle
2023-03-14 9:26 ` AngeloGioacchino Del Regno
2023-03-14 12:32 ` Daniel Golle
2023-03-14 1:18 ` [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding " Daniel Golle
2023-03-14 9:28 ` AngeloGioacchino Del Regno
2023-04-06 21:41 [PATCH 0/2] i2c: i2c-mt65xx: add support for MT7981 Daniel Golle
2023-04-06 21:41 ` [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC Daniel Golle
2023-04-07 8:36 ` Krzysztof Kozlowski
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).