devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miquel RAYNAL <miquel.raynal@free-electrons.com>
To: Rob Herring <robh@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>, Andrew Lunn <andrew@lunn.ch>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Hanna Hawa <hannah@marvell.com>,
	Will Deacon <will.deacon@arm.com>, Stefan Agner <stefan@agner.ch>,
	Nadav Haklai <nadavh@marvell.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-mtd@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	devel@driverdev.osuosl.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Maxim Levitsky <maximlevitsky@gmail.com>,
	Kamal Dasu <kdasu.kdev@gmail.com>,
	Josh Wu <rainyfeeling@outlook.com>,
	Russell King <linux@armlinux.org.uk>,
	Marek Vasut <marek.vasut@gmail.com>, Chen-Yu Tsai <wens@csie.org>,
	bcm-kernel-feedback-list@broadcom.com,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Sylvain Lemieux <slemie>
Subject: Re: [RFC 05/12] dt-bindings: mtd: add Marvell NAND controller documentation
Date: Mon, 6 Nov 2017 14:24:48 +0100	[thread overview]
Message-ID: <20171106142448.40ca5033@xps13> (raw)
In-Reply-To: <20171024190433.r5xy25eqdesz7jjs@rob-hp-laptop>

Hi Rob,

> > +Required properties:
> > +C'est faux, t'en a rajouté un y a pas longtps :).
> > +Je conseille de mettre ça sous forme de liste, genre  
> 
> Humm.

Oops!

> 
> > +
> > +- compatible: can be one of the following:
> > +    * "marvell,armada-8k-nand-controller"
> > +    * "marvell,armada370-nand-controller"
> > +    * "marvell,pxa3xx-nand-controller"
> > +    * "marvell,armada-8k-nand" (deprecated)
> > +    * "marvell,armada370-nand" (deprecated)
> > +    * "marvell,pxa3xx-nand" (deprecated)
> > +- reg: shall contain registers location and length for data and
> > reg.  
> 
> 2 regions?

Just one, rephrased.

> 
> > +- #address-cells: shall be set to 1. Encode the nand CS.
> > +- #size-cells: shall be set to 0.
> > +- interrupts: shall define the nand controller interrupt.
> > +- clocks: shall reference nand controller clocks.  
> 
> How many clocks?

Only one too: "reference the NAND controller clock".

> 
> > +- marvell,system-controller: Set to retrieve the syscon node that
> > handles
> > +  NAND controller related registers (only required with the
> > +  "marvell,armada-8k-nand[-controller]" compatibles).
> > +
> > +Optional properties:
> > +- dmas: shall reference DMA channel associated to the NAND
> > controller. +- dma-names: shall be "rxtx".
> > +
> > +Optional children nodes:
> > +Children nodes represent the available NAND chips.
> > +
> > +Required properties:
> > +- reg: shall contain the native Chip Select ids (0-3)
> > +- marvell,rb: shall contain the native Ready/Busy ids (0-1)
> > +
> > +Optional properties:
> > +- marvell,nand-keep-config: orders the driver not to take the
> > timings
> > +  from the core and leaving them completely untouched. Bootloader
> > +  timings will then be used.
> > +- marvell,nand-enable-arbiter: only useful for PXA platforms, will
> > +  enable bus arbiter between NFC and DFI bus (must be enabled for
> > +  NFC operation)  
> 
> Why do you need this if it must be enabled?

That is right, there is no more need for it, also removed it from the
driver, just knowing the board with the compatible string is enough.

> 
> > +- nand-on-flash-bbt: speed up the boot process by not discovering
> > all
> > +  the bad blocks at each boot and reading directly an on flash
> > table. +- nand-ecc-mode: one of the supported ECC modes ("none",
> > "soft",
> > +  "hw"). If not specified, hardware ECC will be used.
> > +- nand-ecc-algo: algorithm to use if previous choice was "soft"
> > +  ("hamming" or "bch). This property may be added for hardware ECC
> > for
> > +  clarification but will be ignored by the driver because ECC mode
> > is
> > +  chosen depending on the page size and the strength required by
> > the
> > +  NAND chip. This value may be overwritten with the
> > nand-ecc-strength
> > +  property.
> > +- nand-ecc-strength: desired ECC strength.
> > +- nand-ecc-step-size: indication on the ECC step size. This has no
> > +  effect and will be ignored by the driver when using hardware
> > +  ECC. Because Marvell's NAND flash controller does use fixed
> > strength
> > +  (1-bit for Hamming, 16-bit for BCH), the step size will shrink or
> > +  grown in order to fit the required strength and the value
> > +  updated. Step sizes are not completely random for all and follow
> > +  certain patterns described in AN-379, "Marvell SoC NFC ECC".  
> 
> For standard properties, just reference nand.txt and add any 
> constraints. Don't define what the property is again.

Ok.

> 
> > +
> > +See Documentation/devicetree/bindings/mtd/nand.txt for more
> > details on +generic bindings.
> > +
> > +
> > +Example:
> > +nand_controller: nand-controller@d0000 {
> > +	compatible = "marvell,armada370-nand-controller";
> > +	reg = <0xd0000 0x54>;
> > +	#address-cells = <1>;
> > +	#size-cells = <0>;
> > +	interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
> > +	clocks = <&coredivclk 0>;
> > +	status = "okay";  
> 
> Don't show status in examples.

Ok.

> 
> > +
> > +	nand@0 {
> > +		reg = <0>;
> > +		marvell,rb = <0>;
> > +		nand-ecc-mode = "hw";
> > +		marvell,nand-keep-config;
> > +		marvell,nand-enable-arbiter;
> > +		nand-on-flash-bbt;
> > +		nand-ecc-strength = <4>;
> > +		nand-ecc-step-size = <512>;
> > +
> > +		partitions {
> > +			compatible = "fixed-partitions";
> > +			#address-cells = <1>;
> > +			#size-cells = <1>;
> > +
> > +			partition@0 {
> > +				label = "Rootfs";
> > +				reg = <0x00000000 0x40000000>;
> > +			};
> > +		};
> > +	};
> > +};
> > -- 
> > 2.11.0
> >   

Thanks for the review,
Miquèl
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2017-11-06 13:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 14:36 [RFC 00/12] Marvell NAND controller rework with ->exec_op() Miquel Raynal
2017-10-18 14:36 ` [RFC 01/12] mtd: nand: provide several helpers to do common NAND operations Miquel Raynal
2017-10-18 14:36 ` [RFC 02/12] mtd: nand: force drivers to explicitly send READ/PROG commands Miquel Raynal
2017-10-20  9:29   ` Stefan Agner
2017-10-20 11:18     ` Boris Brezillon
2017-10-18 14:36 ` [RFC 03/12] mtd: nand: use a static data_interface in the nand_chip structure Miquel Raynal
2017-10-18 17:02   ` Boris Brezillon
2017-10-18 14:36 ` [RFC 04/12] mtd: nand: add ->exec_op() implementation Miquel Raynal
2017-10-18 21:57   ` Boris Brezillon
2017-10-18 14:36 ` [RFC 05/12] dt-bindings: mtd: add Marvell NAND controller documentation Miquel Raynal
2017-10-18 22:01   ` Boris Brezillon
2017-10-24 19:04   ` Rob Herring
2017-11-06 13:24     ` Miquel RAYNAL [this message]
2017-10-18 14:36 ` [RFC 06/12] mtd: nand: add reworked Marvell NAND controller driver Miquel Raynal
2017-10-19  7:18   ` Boris Brezillon
2017-10-18 14:36 ` [RFC 07/12] ARM: dts: armada-370-xp: use reworked " Miquel Raynal
2017-10-18 14:36 ` [RFC 08/12] ARM: dts: armada-375: " Miquel Raynal
2017-10-18 14:36 ` [RFC 09/12] ARM: dts: armada-38x: " Miquel Raynal
2017-10-18 14:36 ` [RFC 10/12] ARM: dts: armada-39x: " Miquel Raynal
2017-10-18 14:36 ` [RFC 11/12] ARM: dts: pxa: " Miquel Raynal
2017-10-18 14:36 ` [RFC 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K/8K Miquel Raynal
2017-10-18 22:29 ` [RFC 00/12] Marvell NAND controller rework with ->exec_op() Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171106142448.40ca5033@xps13 \
    --to=miquel.raynal@free-electrons.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=catalin.marinas@arm.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=hannah@marvell.com \
    --cc=kdasu.kdev@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=marek.vasut@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=maximlevitsky@gmail.com \
    --cc=nadavh@marvell.com \
    --cc=rainyfeeling@outlook.com \
    --cc=robert.jarzmik@free.fr \
    --cc=robh@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=stefan@agner.ch \
    --cc=wens@csie.org \
    --cc=will.deacon@arm.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).