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

Xiangsheng Hou posted 9 patches 1 year, 9 months ago
There is a newer version of this series
[PATCH 5/9] dt-bindings: spi: mtk-snfi: add mt7986 IC snfi bindings
Posted by Xiangsheng Hou 1 year, 9 months ago
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(+)

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.
-- 
2.25.1
Re: [PATCH 5/9] dt-bindings: spi: mtk-snfi: add mt7986 IC snfi bindings
Posted by Krzysztof Kozlowski 1 year, 9 months ago
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
Re: [PATCH 5/9] dt-bindings: spi: mtk-snfi: add mt7986 IC snfi bindings
Posted by Xiangsheng Hou (侯祥胜) 1 year, 9 months ago
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


Re: [PATCH 5/9] dt-bindings: spi: mtk-snfi: add mt7986 IC snfi bindings
Posted by Krzysztof Kozlowski 1 year, 9 months ago
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

Re: [PATCH 5/9] dt-bindings: spi: mtk-snfi: add mt7986 IC snfi bindings
Posted by Xiangsheng Hou (侯祥胜) 1 year, 9 months ago
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
Re: [PATCH 5/9] dt-bindings: spi: mtk-snfi: add mt7986 IC snfi bindings
Posted by Krzysztof Kozlowski 1 year, 9 months ago
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