diff mbox series

[5/9] dt-bindings: spi: mtk-snfi: add mt7986 IC snfi bindings

Message ID 20221128020613.14821-6-xiangsheng.hou@mediatek.com (mailing list archive)
State Superseded
Headers show
Series Add MediaTek MT7986 SPI NAND and ECC support | expand

Commit Message

Xiangsheng Hou Nov. 28, 2022, 2:06 a.m. UTC
1. add mt7986 IC bindings
2. add optional nfi_hclk property which needed for mt7986

Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
---
 .../devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml      | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Krzysztof Kozlowski Nov. 28, 2022, 9 a.m. UTC | #1
On 28/11/2022 03:06, Xiangsheng Hou wrote:
> 1. add mt7986 IC bindings

Subject: drop second, redundant "bindings".

> 2. add optional nfi_hclk property which needed for mt7986
> 
> Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
> ---
>  .../devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml      | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml
> index 6e6e02c91780..ee20075cd0e7 100644
> --- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml
> +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml
> @@ -26,6 +26,7 @@ properties:
>      enum:
>        - mediatek,mt7622-snand
>        - mediatek,mt7629-snand
> +      - mediatek,mt7986-snand
>  
>    reg:
>      items:
> @@ -36,14 +37,19 @@ properties:
>        - description: NFI interrupt
>  
>    clocks:
> +    minItems: 2
>      items:
>        - description: clock used for the controller
>        - description: clock used for the SPI bus
> +      - description: clock used for the AHB bus dma bus, this depends on
> +                     hardware design, so this is optional.

Optional for which variants? For all of them?

>  
>    clock-names:
> +    minItems: 2
>      items:
>        - const: nfi_clk
>        - const: pad_clk
> +      - const: nfi_hclk



Best regards,
Krzysztof
Xiangsheng Hou Nov. 29, 2022, 2:50 a.m. UTC | #2
Hi Krzysztof,

On Mon, 2022-11-28 at 10:00 +0100, Krzysztof Kozlowski wrote:
> On 28/11/2022 03:06, Xiangsheng Hou wrote:
> > 1. add mt7986 IC bindings
> 
> Subject: drop second, redundant "bindings".
Will be fixed in next series.

> >    clocks:
> > +    minItems: 2
> >      items:
> >        - description: clock used for the controller
> >        - description: clock used for the SPI bus
> > +      - description: clock used for the AHB bus dma bus, this
> > depends on
> > +                     hardware design, so this is optional.
> 
> Optional for which variants? For all of them?
It`s only needed for the item 3 nfi_hclk. Is it proper with this
description or any other suggestion.

> 
> >  
> >    clock-names:
> > +    minItems: 2
> >      items:
> >        - const: nfi_clk
> >        - const: pad_clk
> > +      - const: nfi_hclk
> 

Best regards,
Xiangsheng Hou
Krzysztof Kozlowski Nov. 29, 2022, 7:47 a.m. UTC | #3
On 29/11/2022 03:50, Xiangsheng Hou (侯祥胜) wrote:
> Hi Krzysztof,
> 
> On Mon, 2022-11-28 at 10:00 +0100, Krzysztof Kozlowski wrote:
>> On 28/11/2022 03:06, Xiangsheng Hou wrote:
>>> 1. add mt7986 IC bindings
>>
>> Subject: drop second, redundant "bindings".
> Will be fixed in next series.
> 
>>>    clocks:
>>> +    minItems: 2
>>>      items:
>>>        - description: clock used for the controller
>>>        - description: clock used for the SPI bus
>>> +      - description: clock used for the AHB bus dma bus, this
>>> depends on
>>> +                     hardware design, so this is optional.
>>
>> Optional for which variants? For all of them?
> It`s only needed for the item 3 nfi_hclk. Is it proper with this
> description or any other suggestion.

I understand third clock is optional. For which variants/compatibles it
is optional? Add allOf:if:then restricting it.

Best regards,
Krzysztof
Xiangsheng Hou Nov. 30, 2022, 8:18 a.m. UTC | #4
Hi Krzysztof,

On Tue, 2022-11-29 at 08:47 +0100, Krzysztof Kozlowski wrote:
> On 29/11/2022 03:50, Xiangsheng Hou (侯祥胜) wrote:
> > 
> > > >    clocks:
> > > > +    minItems: 2
> > > >      items:
> > > >        - description: clock used for the controller
> > > >        - description: clock used for the SPI bus
> > > > +      - description: clock used for the AHB bus dma bus, this
> > > > depends on
> > > > +                     hardware design, so this is optional.
> > > 
> > > Optional for which variants? For all of them?
> > 
> > It`s only needed for the item 3 nfi_hclk. Is it proper with this
> > description or any other suggestion.
> 
> I understand third clock is optional. For which variants/compatibles
> it
> is optional? Add allOf:if:then restricting it.

The MediaTek SPI NAND controller IP used by MT7986 is the newest.
In the future, there will have other SoCs.
If add restricting on this, may not easy to maintain.
Does this acceptable?

Thanks
Xiangsheng Hou
Krzysztof Kozlowski Nov. 30, 2022, 8:33 a.m. UTC | #5
On 30/11/2022 09:18, Xiangsheng Hou (侯祥胜) wrote:
> Hi Krzysztof,
> 
> On Tue, 2022-11-29 at 08:47 +0100, Krzysztof Kozlowski wrote:
>> On 29/11/2022 03:50, Xiangsheng Hou (侯祥胜) wrote:
>>>
>>>>>    clocks:
>>>>> +    minItems: 2
>>>>>      items:
>>>>>        - description: clock used for the controller
>>>>>        - description: clock used for the SPI bus
>>>>> +      - description: clock used for the AHB bus dma bus, this
>>>>> depends on
>>>>> +                     hardware design, so this is optional.
>>>>
>>>> Optional for which variants? For all of them?
>>>
>>> It`s only needed for the item 3 nfi_hclk. Is it proper with this
>>> description or any other suggestion.
>>
>> I understand third clock is optional. For which variants/compatibles
>> it
>> is optional? Add allOf:if:then restricting it.
> 
> The MediaTek SPI NAND controller IP used by MT7986 is the newest.
> In the future, there will have other SoCs.
> If add restricting on this, may not easy to maintain.
> Does this acceptable?

I don't think it is not easy to maintain. We have it in many, many
bindings...

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml
index 6e6e02c91780..ee20075cd0e7 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml
@@ -26,6 +26,7 @@  properties:
     enum:
       - mediatek,mt7622-snand
       - mediatek,mt7629-snand
+      - mediatek,mt7986-snand
 
   reg:
     items:
@@ -36,14 +37,19 @@  properties:
       - description: NFI interrupt
 
   clocks:
+    minItems: 2
     items:
       - description: clock used for the controller
       - description: clock used for the SPI bus
+      - description: clock used for the AHB bus dma bus, this depends on
+                     hardware design, so this is optional.
 
   clock-names:
+    minItems: 2
     items:
       - const: nfi_clk
       - const: pad_clk
+      - const: nfi_hclk
 
   nand-ecc-engine:
     description: device-tree node of the accompanying ECC engine.