[v4,1/9] dt-bindings: mtd: ingenic: Add compatible strings for JZ4740 and JZ4725B

Message ID 20190209192305.4434-1-paul@crapouillou.net
State Changes Requested
Delegated to: Miquel Raynal
Headers show
Series
  • [v4,1/9] dt-bindings: mtd: ingenic: Add compatible strings for JZ4740 and JZ4725B
Related show

Commit Message

Paul Cercueil Feb. 9, 2019, 7:22 p.m.
Add compatible strings to probe the jz4780-nand and jz4780-bch drivers
from devicetree on the JZ4725B and JZ4740 SoCs from Ingenic.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---

Changes:

v2: - Change 'ingenic,jz4725b-nand' compatible string to
      'ingenic,jz4740-nand' to reflect driver change
    - Add 'ingenic,jz4740-bch' compatible string
    - Document 'ingenic,oob-layout' property

v3: - Removed 'ingenic,oob-layout' property
    - Update compatible strings to what the driver supports

v4: No change

 Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Comments

Rob Herring Feb. 13, 2019, 9:45 p.m. | #1
On Sat,  9 Feb 2019 16:22:57 -0300, Paul Cercueil wrote:
> Add compatible strings to probe the jz4780-nand and jz4780-bch drivers
> from devicetree on the JZ4725B and JZ4740 SoCs from Ingenic.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> 
> Changes:
> 
> v2: - Change 'ingenic,jz4725b-nand' compatible string to
>       'ingenic,jz4740-nand' to reflect driver change
>     - Add 'ingenic,jz4740-bch' compatible string
>     - Document 'ingenic,oob-layout' property
> 
> v3: - Removed 'ingenic,oob-layout' property
>     - Update compatible strings to what the driver supports
> 
> v4: No change
> 
>  Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Miquel Raynal March 4, 2019, 9:45 a.m. | #2
Hi Paul,

Paul Cercueil <paul@crapouillou.net> wrote on Sat,  9 Feb 2019 16:22:57
-0300:

> Add compatible strings to probe the jz4780-nand and jz4780-bch drivers
> from devicetree on the JZ4725B and JZ4740 SoCs from Ingenic.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> 
> Changes:
> 
> v2: - Change 'ingenic,jz4725b-nand' compatible string to
>       'ingenic,jz4740-nand' to reflect driver change
>     - Add 'ingenic,jz4740-bch' compatible string
>     - Document 'ingenic,oob-layout' property
> 
> v3: - Removed 'ingenic,oob-layout' property
>     - Update compatible strings to what the driver supports
> 
> v4: No change
> 
>  Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt b/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
> index 29ea5853ca91..a5b940f18bf6 100644
> --- a/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
> +++ b/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
> @@ -6,7 +6,10 @@ memory-controllers/ingenic,jz4780-nemc.txt), and thus NAND device nodes must
>  be children of the NEMC node.
>  
>  Required NAND controller device properties:
> -- compatible: Should be set to "ingenic,jz4780-nand".
> +- compatible: Should be one of:
> +  * ingenic,jz4740-nand
> +  * ingenic,jz4725b-nand
> +  * ingenic,jz4780-nand

Wouldn't "-nand-controller" suffix be better? Of course in the driver
you should still check for jz4780-nand.

>  - reg: For each bank with a NAND chip attached, should specify a bank number,
>    an offset of 0 and a size of 0x1000000 (i.e. the whole NEMC bank).
>  
> @@ -72,7 +75,10 @@ NAND devices. The following is a description of the device properties for a
>  BCH controller.
>  
>  Required BCH properties:
> -- compatible: Should be set to "ingenic,jz4780-bch".
> +- compatible: Should be one of:
> +  * ingenic,jz4740-ecc
> +  * ingenic,jz4725b-bch
> +  * ingenic,jz4780-bch
>  - reg: Should specify the BCH controller registers location and length.
>  - clocks: Clock for the BCH controller.
>  

Thanks,
Miquèl
Paul Cercueil March 4, 2019, 6:22 p.m. | #3
Hi Miquel,

On Mon, Mar 4, 2019 at 10:45 AM, Miquel Raynal 
<miquel.raynal@bootlin.com> wrote:
> Hi Paul,
> 
> Paul Cercueil <paul@crapouillou.net <mailto:paul@crapouillou.net>> 
> wrote on Sat,  9 Feb 2019 16:22:57
> -0300:
> 
>>  Add compatible strings to probe the jz4780-nand and jz4780-bch 
>> drivers
>>  from devicetree on the JZ4725B and JZ4740 SoCs from Ingenic.
>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net 
>> <mailto:paul@crapouillou.net>>
>>  ---
>> 
>>  Changes:
>> 
>>  v2: - Change 'ingenic,jz4725b-nand' compatible string to
>>        'ingenic,jz4740-nand' to reflect driver change
>>      - Add 'ingenic,jz4740-bch' compatible string
>>      - Document 'ingenic,oob-layout' property
>> 
>>  v3: - Removed 'ingenic,oob-layout' property
>>      - Update compatible strings to what the driver supports
>> 
>>  v4: No change
>> 
>>   Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt | 10 
>> ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>> 
>>  diff --git 
>> a/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt 
>> b/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
>>  index 29ea5853ca91..a5b940f18bf6 100644
>>  --- a/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
>>  +++ b/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
>>  @@ -6,7 +6,10 @@ memory-controllers/ingenic,jz4780-nemc.txt), and 
>> thus NAND device nodes must
>>   be children of the NEMC node.
>> 
>>   Required NAND controller device properties:
>>  -- compatible: Should be set to "ingenic,jz4780-nand".
>>  +- compatible: Should be one of:
>>  +  * ingenic,jz4740-nand
>>  +  * ingenic,jz4725b-nand
>>  +  * ingenic,jz4780-nand
> 
> Wouldn't "-nand-controller" suffix be better? Of course in the driver
> you should still check for jz4780-nand.

So I would be compatible with:
* ingenic,jz4740-nand-controller
* ingenic,jz4725b-nand-controller
* ingenic,jz4780-nand
?

>>   - reg: For each bank with a NAND chip attached, should specify a 
>> bank number,
>>     an offset of 0 and a size of 0x1000000 (i.e. the whole NEMC 
>> bank).
>> 
>>  @@ -72,7 +75,10 @@ NAND devices. The following is a description of 
>> the device properties for a
>>   BCH controller.
>> 
>>   Required BCH properties:
>>  -- compatible: Should be set to "ingenic,jz4780-bch".
>>  +- compatible: Should be one of:
>>  +  * ingenic,jz4740-ecc
>>  +  * ingenic,jz4725b-bch
>>  +  * ingenic,jz4780-bch
>>   - reg: Should specify the BCH controller registers location and 
>> length.
>>   - clocks: Clock for the BCH controller.
>> 
> 
> Thanks,
> Miquèl
Miquel Raynal March 4, 2019, 6:51 p.m. | #4
Hi Paul,

> >>  --- a/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
> >>  +++ b/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
> >>  @@ -6,7 +6,10 @@ memory-controllers/ingenic,jz4780-nemc.txt), and >> thus NAND device nodes must
> >>   be children of the NEMC node.  
> >> >>   Required NAND controller device properties:  
> >>  -- compatible: Should be set to "ingenic,jz4780-nand".
> >>  +- compatible: Should be one of:
> >>  +  * ingenic,jz4740-nand
> >>  +  * ingenic,jz4725b-nand
> >>  +  * ingenic,jz4780-nand  
> > 
> > Wouldn't "-nand-controller" suffix be better? Of course in the driver
> > you should still check for jz4780-nand.  
> 
> So I would be compatible with:
> * ingenic,jz4740-nand-controller
> * ingenic,jz4725b-nand-controller
> * ingenic,jz4780-nand
> ?

From a driver POV I would even prefer ingenic,jz4780-nand-controller. I
don't know what's best here. Maybe Boris or Rob can help?


Thanks,
Miquèl
Paul Cercueil March 13, 2019, 12:55 p.m. | #5
Hi,

Le lun. 4 mars 2019 à 15:51, Miquel Raynal <miquel.raynal@bootlin.com> 
a écrit :
> Hi Paul,
> 
>>  >>  --- 
>> a/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
>>  >>  +++ 
>> b/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
>>  >>  @@ -6,7 +6,10 @@ memory-controllers/ingenic,jz4780-nemc.txt), 
>> and >> thus NAND device nodes must
>>  >>   be children of the NEMC node.
>>  >> >>   Required NAND controller device properties:
>>  >>  -- compatible: Should be set to "ingenic,jz4780-nand".
>>  >>  +- compatible: Should be one of:
>>  >>  +  * ingenic,jz4740-nand
>>  >>  +  * ingenic,jz4725b-nand
>>  >>  +  * ingenic,jz4780-nand
>>  >
>>  > Wouldn't "-nand-controller" suffix be better? Of course in the 
>> driver
>>  > you should still check for jz4780-nand.
>> 
>>  So I would be compatible with:
>>  * ingenic,jz4740-nand-controller
>>  * ingenic,jz4725b-nand-controller
>>  * ingenic,jz4780-nand
>>  ?
> 
> From a driver POV I would even prefer ingenic,jz4780-nand-controller. 
> I
> don't know what's best here. Maybe Boris or Rob can help?

The "ingenic,jz4780-nand" compatible string is already out there and 
used
in devicetree files, so I wouldn't change it just for the sake of it.

-Paul
Boris Brezillon March 13, 2019, 1:09 p.m. | #6
On Wed, 13 Mar 2019 09:55:34 -0300
Paul Cercueil <paul@crapouillou.net> wrote:

> Hi,
> 
> Le lun. 4 mars 2019 à 15:51, Miquel Raynal <miquel.raynal@bootlin.com> 
> a écrit :
> > Hi Paul,
> >   
> >>  >>  ---   
> >> a/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt  
> >>  >>  +++   
> >> b/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt  
> >>  >>  @@ -6,7 +6,10 @@ memory-controllers/ingenic,jz4780-nemc.txt),   
> >> and >> thus NAND device nodes must  
> >>  >>   be children of the NEMC node.  
> >>  >> >>   Required NAND controller device properties:  
> >>  >>  -- compatible: Should be set to "ingenic,jz4780-nand".
> >>  >>  +- compatible: Should be one of:
> >>  >>  +  * ingenic,jz4740-nand
> >>  >>  +  * ingenic,jz4725b-nand
> >>  >>  +  * ingenic,jz4780-nand  
> >>  >
> >>  > Wouldn't "-nand-controller" suffix be better? Of course in the   
> >> driver  
> >>  > you should still check for jz4780-nand.  
> >> 
> >>  So I would be compatible with:
> >>  * ingenic,jz4740-nand-controller
> >>  * ingenic,jz4725b-nand-controller
> >>  * ingenic,jz4780-nand
> >>  ?  
> > 
> > From a driver POV I would even prefer ingenic,jz4780-nand-controller. 
> > I
> > don't know what's best here. Maybe Boris or Rob can help?

Let's keep it consistent and have all compatibles follow the old
naming scheme (ingenic,<soc>-nand). But yes, for new drivers, I agree
that -nand-controller is better than just -nand.

Patch

diff --git a/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt b/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
index 29ea5853ca91..a5b940f18bf6 100644
--- a/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt
@@ -6,7 +6,10 @@  memory-controllers/ingenic,jz4780-nemc.txt), and thus NAND device nodes must
 be children of the NEMC node.
 
 Required NAND controller device properties:
-- compatible: Should be set to "ingenic,jz4780-nand".
+- compatible: Should be one of:
+  * ingenic,jz4740-nand
+  * ingenic,jz4725b-nand
+  * ingenic,jz4780-nand
 - reg: For each bank with a NAND chip attached, should specify a bank number,
   an offset of 0 and a size of 0x1000000 (i.e. the whole NEMC bank).
 
@@ -72,7 +75,10 @@  NAND devices. The following is a description of the device properties for a
 BCH controller.
 
 Required BCH properties:
-- compatible: Should be set to "ingenic,jz4780-bch".
+- compatible: Should be one of:
+  * ingenic,jz4740-ecc
+  * ingenic,jz4725b-bch
+  * ingenic,jz4780-bch
 - reg: Should specify the BCH controller registers location and length.
 - clocks: Clock for the BCH controller.