* Re: [PATCH v2 1/2] spi: dt-bindings: add SPI IPM v59 compatible for mt7987 and mt7989
@ 2026-10-01 8:21 Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-10-01 8:21 UTC (permalink / raw)
To: Tim Kuo (郭廷笙)
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, linux-spi,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
Steven Liu (劉人豪),
SkyLake Huang (黃啟澤),
Sam Shih (史碩三)
On 01/10/2026 10:15, Tim Kuo (郭廷笙) wrote:
> On Wed, 2026-09-30 at 12:36 +0200, Krzysztof Kozlowski wrote:
>> On Tue, Sep 29, 2026 at 02:25:15PM +0800, Tim Kuo wrote:
>>> MTK mt7987 and mt7989 SPI hardware has been updated to IPM v59 SPI
>>> IP and
>>> it differs from earlier IPM designs, most visibly in the tick delay
>>> field
>>> of SPI_CMD_REG, so it needs its own fallback compatible rather than
>>> reusing
>>> "mediatek,spi-ipm".
>>>
>>> Signed-off-by: Tim Kuo <Tim.Kuo@mediatek.com>
>>> ---
>>> v2: Add mt7987 and mt7989 real device compatible
>>>
>>> .../devicetree/bindings/spi/mediatek,spi-mt65xx.yaml | 5
>>> +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mt65xx.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mt65xx.yaml
>>> index 3bf3eb1f8728..d2c740572d85 100644
>>> --- a/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mt65xx.yaml
>>> +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mt65xx.yaml
>>> @@ -39,6 +39,11 @@ properties:
>>> - mediatek,mt7988-spi-single
>>> - mediatek,mt8188-spi-ipm
>>> - const: mediatek,spi-ipm
>>> + - items:
>>> + - enum:
>>> + - mediatek,mt7987-spi
>>> + - mediatek,mt7989-spi
>>> + - const: mediatek,spi-ipm-v59
>>
>> No, look at the binding and recent commits. This should be a specific
>> compatible. Git history easily tells you that.
>>
>> Best regards,
>> Krzysztof
>>
>
> Thanks for the review. I went back through the binding and the history;
> let me confirm I took the right lesson from it before I send v3, and
> ask one thing about the DTS.
Did you just paste here LLM output to your prompt and followed up by
typical agent question "is this what you wanted"? If so, straight way to
get yourself PLONKed, because it is a plague.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] spi: dt-bindings: add SPI IPM v59 compatible for mt7987 and mt7989
@ 2026-10-01 8:15 Tim Kuo (郭廷笙)
0 siblings, 0 replies; 4+ messages in thread
From: Tim Kuo (郭廷笙) @ 2026-10-01 8:15 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, linux-spi,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
Steven Liu (劉人豪),
SkyLake Huang (黃啟澤),
Sam Shih (史碩三)
On Wed, 2026-09-30 at 12:36 +0200, Krzysztof Kozlowski wrote:
> On Tue, Sep 29, 2026 at 02:25:15PM +0800, Tim Kuo wrote:
> > MTK mt7987 and mt7989 SPI hardware has been updated to IPM v59 SPI
> > IP and
> > it differs from earlier IPM designs, most visibly in the tick delay
> > field
> > of SPI_CMD_REG, so it needs its own fallback compatible rather than
> > reusing
> > "mediatek,spi-ipm".
> >
> > Signed-off-by: Tim Kuo <Tim.Kuo@mediatek.com>
> > ---
> > v2: Add mt7987 and mt7989 real device compatible
> >
> > .../devicetree/bindings/spi/mediatek,spi-mt65xx.yaml | 5
> > +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-
> > mt65xx.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-
> > mt65xx.yaml
> > index 3bf3eb1f8728..d2c740572d85 100644
> > --- a/Documentation/devicetree/bindings/spi/mediatek,spi-
> > mt65xx.yaml
> > +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-
> > mt65xx.yaml
> > @@ -39,6 +39,11 @@ properties:
> > - mediatek,mt7988-spi-single
> > - mediatek,mt8188-spi-ipm
> > - const: mediatek,spi-ipm
> > + - items:
> > + - enum:
> > + - mediatek,mt7987-spi
> > + - mediatek,mt7989-spi
> > + - const: mediatek,spi-ipm-v59
>
> No, look at the binding and recent commits. This should be a specific
> compatible. Git history easily tells you that.
>
> Best regards,
> Krzysztof
>
Thanks for the review. I went back through the binding and the history;
let me confirm I took the right lesson from it before I send v3, and
ask one thing about the DTS.
1) My reading now is that the problem is the SoC-less, version-numbered
"mediatek,spi-ipm-v59" string: an internal IP revision is not something
anyone can read off a board, and the binding otherwise never invents a
new generic compatible for a new variant.
So for v3 I dropped "mediatek,spi-ipm-v59" entirely and added MT7987 to
the existing IPM group:
- items:
- enum:
- mediatek,mt7981-spi-ipm
- mediatek,mt7986-spi-ipm
+ - mediatek,mt7987-spi-ipm
- mediatek,mt7988-spi-quad
- mediatek,mt7988-spi-single
+ - mediatek,mt7989-spi-ipm
- mediatek,mt8188-spi-ipm
- const: mediatek,spi-ipm
"mediatek,spi-ipm" stays a valid fallback for MT7987: a driver that
only knows the generic string programs bits: 24:22, which are the low 3
bits of the widened field, so it still works. On the driver side
mtk_ipm_v59_compat will become mt7987_compat and matches
"mediatek,mt7987-spi" which outranks the "mediatek,spi-ipm" entry.
Does that what you had in mind? or please let me know if that is still
not what you meant.
2) The mt7987 DTS is not upstream yet. It currently only lives in
OpenWrt's tree, and they will be prepared to upstream separately in the
future. So this patch would add a compatible that no in-tree DTS uses
yet.
https://github.com/openwrt/openwrt/commit/9de7189ed43bb7524fe8bcb3e9f57
a6516d0990d
Is that acceptable, or do you prefer the binding to land together with
(or after) the mt7987 DTS?
BRs,
Tim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] spi: dt-bindings: add SPI IPM v59 compatible for mt7987 and mt7989
2026-09-29 6:25 Tim Kuo
@ 2026-09-30 10:36 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-30 10:36 UTC (permalink / raw)
To: Tim Kuo
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, linux-spi,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
Steven Liu, Sky Huang
On Tue, Sep 29, 2026 at 02:25:15PM +0800, Tim Kuo wrote:
> MTK mt7987 and mt7989 SPI hardware has been updated to IPM v59 SPI IP and
> it differs from earlier IPM designs, most visibly in the tick delay field
> of SPI_CMD_REG, so it needs its own fallback compatible rather than reusing
> "mediatek,spi-ipm".
>
> Signed-off-by: Tim Kuo <Tim.Kuo@mediatek.com>
> ---
> v2: Add mt7987 and mt7989 real device compatible
>
> .../devicetree/bindings/spi/mediatek,spi-mt65xx.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
> index 3bf3eb1f8728..d2c740572d85 100644
> --- a/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
> +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
> @@ -39,6 +39,11 @@ properties:
> - mediatek,mt7988-spi-single
> - mediatek,mt8188-spi-ipm
> - const: mediatek,spi-ipm
> + - items:
> + - enum:
> + - mediatek,mt7987-spi
> + - mediatek,mt7989-spi
> + - const: mediatek,spi-ipm-v59
No, look at the binding and recent commits. This should be a specific
compatible. Git history easily tells you that.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] spi: dt-bindings: add SPI IPM v59 compatible for mt7987 and mt7989
@ 2026-09-29 6:25 Tim Kuo
2026-09-30 10:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Tim Kuo @ 2026-09-29 6:25 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Steven Liu, Sky Huang, Tim Kuo
MTK mt7987 and mt7989 SPI hardware has been updated to IPM v59 SPI IP and
it differs from earlier IPM designs, most visibly in the tick delay field
of SPI_CMD_REG, so it needs its own fallback compatible rather than reusing
"mediatek,spi-ipm".
Signed-off-by: Tim Kuo <Tim.Kuo@mediatek.com>
---
v2: Add mt7987 and mt7989 real device compatible
.../devicetree/bindings/spi/mediatek,spi-mt65xx.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
index 3bf3eb1f8728..d2c740572d85 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
@@ -39,6 +39,11 @@ properties:
- mediatek,mt7988-spi-single
- mediatek,mt8188-spi-ipm
- const: mediatek,spi-ipm
+ - items:
+ - enum:
+ - mediatek,mt7987-spi
+ - mediatek,mt7989-spi
+ - const: mediatek,spi-ipm-v59
- items:
- enum:
- mediatek,mt8196-spi
base-commit: 0d9d0dbf2fddcff5859d623e90ca73c4054276e1
--
2.45.2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-01 8:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-01 8:21 [PATCH v2 1/2] spi: dt-bindings: add SPI IPM v59 compatible for mt7987 and mt7989 Krzysztof Kozlowski
-- strict thread matches above, loose matches on Subject: below --
2026-10-01 8:15 Tim Kuo (郭廷笙)
2026-09-29 6:25 Tim Kuo
2026-09-30 10: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
all inboxes | Powered by JetHome®