diff mbox series

[1/3] dt-bindings: mtd: sunxi: Add new compatible

Message ID 20190404162111.22618-2-miquel.raynal@bootlin.com (mailing list archive)
State New, archived
Headers show
Series Sun8i NAND DMA support | expand

Commit Message

Miquel Raynal April 4, 2019, 4:21 p.m. UTC
The A33 NAND controller is slightly different than the A10+ ones,
eg. DMA handling is a bit different and a few register offsets
changed.

Introduce a new compatible to represent this version of the IP.

Also append '-controller' to the new compatible (which is required for
new compatibles) as this is describing a NAND controller and not a
NAND chip.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/sunxi-nand.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Maxime Ripard April 5, 2019, 9:13 a.m. UTC | #1
Hi,

On Thu, Apr 04, 2019 at 06:21:09PM +0200, Miquel Raynal wrote:
> The A33 NAND controller is slightly different than the A10+ ones,
> eg. DMA handling is a bit different and a few register offsets
> changed.
>
> Introduce a new compatible to represent this version of the IP.
>
> Also append '-controller' to the new compatible (which is required for
> new compatibles) as this is describing a NAND controller and not a
> NAND chip.

Out of curiosity, why are you requiring that suffix now?

> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/sunxi-nand.txt | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
> index dcd5a5d80dc0..6128d41d8c59 100644
> --- a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
> +++ b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
> @@ -1,7 +1,12 @@
>  Allwinner NAND Flash Controller (NFC)
>
>  Required properties:
> -- compatible : "allwinner,sun4i-a10-nand".
> +- compatible : Must be one of:
> +	       - "allwinner,sun4i-a10-nand"
> +	       - "allwinner,sun8i-a33-nand-controller"
> +	       The former may be used by all IPs, however sun8i family
> +	       will need the second one in order to make use of the
> +	       internal DMA capabilities.

I'm not sure we should have that statement. We have no idea whether or
not this can be used by all IPs *today*, and we surely don't know
about the one that are going to come out.

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Miquel Raynal April 5, 2019, 9:28 a.m. UTC | #2
Hi Maxime,

Maxime Ripard <maxime.ripard@bootlin.com> wrote on Fri, 5 Apr 2019
11:13:02 +0200:

> Hi,
> 
> On Thu, Apr 04, 2019 at 06:21:09PM +0200, Miquel Raynal wrote:
> > The A33 NAND controller is slightly different than the A10+ ones,
> > eg. DMA handling is a bit different and a few register offsets
> > changed.
> >
> > Introduce a new compatible to represent this version of the IP.
> >
> > Also append '-controller' to the new compatible (which is required for
> > new compatibles) as this is describing a NAND controller and not a
> > NAND chip.  
> 
> Out of curiosity, why are you requiring that suffix now?

Because people are confused with the terminology and we see people
mixing all the terms very often: NAND controller, NAND bus, NAND
chip, ECC engine, etc. This node only describes a NAND controller, so
let be more precise and stop naming everything just "NAND".

> 
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> >  Documentation/devicetree/bindings/mtd/sunxi-nand.txt | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
> > index dcd5a5d80dc0..6128d41d8c59 100644
> > --- a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
> > +++ b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
> > @@ -1,7 +1,12 @@
> >  Allwinner NAND Flash Controller (NFC)
> >
> >  Required properties:
> > -- compatible : "allwinner,sun4i-a10-nand".
> > +- compatible : Must be one of:
> > +	       - "allwinner,sun4i-a10-nand"
> > +	       - "allwinner,sun8i-a33-nand-controller"
> > +	       The former may be used by all IPs, however sun8i family
> > +	       will need the second one in order to make use of the
> > +	       internal DMA capabilities.  
> 
> I'm not sure we should have that statement. We have no idea whether or
> not this can be used by all IPs *today*, and we surely don't know
> about the one that are going to come out.

Shall I just drop the whole comment ("The former" ... "capabilities.")?


Thanks,
Miquèl
Maxime Ripard April 5, 2019, 9:56 a.m. UTC | #3
On Fri, Apr 05, 2019 at 11:28:13AM +0200, Miquel Raynal wrote:
> Hi Maxime,
>
> Maxime Ripard <maxime.ripard@bootlin.com> wrote on Fri, 5 Apr 2019
> 11:13:02 +0200:
>
> > Hi,
> >
> > On Thu, Apr 04, 2019 at 06:21:09PM +0200, Miquel Raynal wrote:
> > > The A33 NAND controller is slightly different than the A10+ ones,
> > > eg. DMA handling is a bit different and a few register offsets
> > > changed.
> > >
> > > Introduce a new compatible to represent this version of the IP.
> > >
> > > Also append '-controller' to the new compatible (which is required for
> > > new compatibles) as this is describing a NAND controller and not a
> > > NAND chip.
> >
> > Out of curiosity, why are you requiring that suffix now?
>
> Because people are confused with the terminology and we see people
> mixing all the terms very often: NAND controller, NAND bus, NAND
> chip, ECC engine, etc. This node only describes a NAND controller, so
> let be more precise and stop naming everything just "NAND".

Sounds reasonable :)

> >
> > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > > ---
> > >  Documentation/devicetree/bindings/mtd/sunxi-nand.txt | 7 ++++++-
> > >  1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
> > > index dcd5a5d80dc0..6128d41d8c59 100644
> > > --- a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
> > > +++ b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
> > > @@ -1,7 +1,12 @@
> > >  Allwinner NAND Flash Controller (NFC)
> > >
> > >  Required properties:
> > > -- compatible : "allwinner,sun4i-a10-nand".
> > > +- compatible : Must be one of:
> > > +	       - "allwinner,sun4i-a10-nand"
> > > +	       - "allwinner,sun8i-a33-nand-controller"
> > > +	       The former may be used by all IPs, however sun8i family
> > > +	       will need the second one in order to make use of the
> > > +	       internal DMA capabilities.
> >
> > I'm not sure we should have that statement. We have no idea whether or
> > not this can be used by all IPs *today*, and we surely don't know
> > about the one that are going to come out.
>
> Shall I just drop the whole comment ("The former" ... "capabilities.")?

Yep.

Thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
index dcd5a5d80dc0..6128d41d8c59 100644
--- a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
@@ -1,7 +1,12 @@ 
 Allwinner NAND Flash Controller (NFC)
 
 Required properties:
-- compatible : "allwinner,sun4i-a10-nand".
+- compatible : Must be one of:
+	       - "allwinner,sun4i-a10-nand"
+	       - "allwinner,sun8i-a33-nand-controller"
+	       The former may be used by all IPs, however sun8i family
+	       will need the second one in order to make use of the
+	       internal DMA capabilities.
 - reg : shall contain registers location and length for data and reg.
 - interrupts : shall define the nand controller interrupt.
 - #address-cells: shall be set to 1. Encode the nand CS.