162306a36Sopenharmony_ciDevice tree bindings for Texas instruments Davinci/Keystone NAND controller
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciThis file provides information, what the device node for the davinci/keystone
462306a36Sopenharmony_ciNAND interface contains.
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciDocumentation:
762306a36Sopenharmony_ciDavinci DM646x - https://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf
862306a36Sopenharmony_ciKestone - https://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciRequired properties:
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci- compatible:			"ti,davinci-nand"
1362306a36Sopenharmony_ci				"ti,keystone-nand"
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci- reg:				Contains 2 offset/length values:
1662306a36Sopenharmony_ci				- offset and length for the access window.
1762306a36Sopenharmony_ci				- offset and length for accessing the AEMIF
1862306a36Sopenharmony_ci				control registers.
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci- ti,davinci-chipselect:	number of chipselect. Indicates on the
2162306a36Sopenharmony_ci				davinci_nand driver which chipselect is used
2262306a36Sopenharmony_ci				for accessing the nand.
2362306a36Sopenharmony_ci				Can be in the range [0-3].
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciRecommended properties :
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci- ti,davinci-mask-ale:		mask for ALE. Needed for executing address
2862306a36Sopenharmony_ci				phase. These offset will be added to the base
2962306a36Sopenharmony_ci				address for the chip select space the NAND Flash
3062306a36Sopenharmony_ci				device is connected to.
3162306a36Sopenharmony_ci				If not set equal to 0x08.
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci- ti,davinci-mask-cle:		mask for CLE. Needed for executing command
3462306a36Sopenharmony_ci				phase. These offset will be added to the base
3562306a36Sopenharmony_ci				address for the chip select space the NAND Flash
3662306a36Sopenharmony_ci				device is connected to.
3762306a36Sopenharmony_ci				If not set equal to 0x10.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci- ti,davinci-mask-chipsel:	mask for chipselect address. Needed to mask
4062306a36Sopenharmony_ci				addresses for given chipselect.
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci- nand-ecc-mode:		operation mode of the NAND ecc mode. ECC mode
4362306a36Sopenharmony_ci				valid values for davinci driver:
4462306a36Sopenharmony_ci				- "none"
4562306a36Sopenharmony_ci				- "soft"
4662306a36Sopenharmony_ci				- "hw"
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci- ti,davinci-ecc-bits:		used ECC bits, currently supported 1 or 4.
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci- nand-bus-width:		buswidth 8 or 16. If not present 8.
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci- nand-on-flash-bbt:		use flash based bad block table support. OOB
5362306a36Sopenharmony_ci				identifier is saved in OOB area. If not present
5462306a36Sopenharmony_ci				false.
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciDeprecated properties:
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci- ti,davinci-ecc-mode:		operation mode of the NAND ecc mode. ECC mode
5962306a36Sopenharmony_ci				valid values for davinci driver:
6062306a36Sopenharmony_ci				- "none"
6162306a36Sopenharmony_ci				- "soft"
6262306a36Sopenharmony_ci				- "hw"
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci- ti,davinci-nand-buswidth:	buswidth 8 or 16. If not present 8.
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci- ti,davinci-nand-use-bbt:	use flash based bad block table support. OOB
6762306a36Sopenharmony_ci				identifier is saved in OOB area. If not present
6862306a36Sopenharmony_ci				false.
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ciNand device bindings may contain additional sub-nodes describing partitions of
7162306a36Sopenharmony_cithe address space. See partition.txt for more detail. The NAND Flash timing
7262306a36Sopenharmony_civalues must be programmed in the chip select’s node of AEMIF
7362306a36Sopenharmony_cimemory-controller (see Documentation/devicetree/bindings/memory-controllers/
7462306a36Sopenharmony_cidavinci-aemif.txt).
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ciExample(da850 EVM ):
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_cinand_cs3@62000000 {
7962306a36Sopenharmony_ci	compatible = "ti,davinci-nand";
8062306a36Sopenharmony_ci	reg = <0x62000000 0x807ff
8162306a36Sopenharmony_ci	       0x68000000 0x8000>;
8262306a36Sopenharmony_ci	ti,davinci-chipselect = <1>;
8362306a36Sopenharmony_ci	ti,davinci-mask-ale = <0>;
8462306a36Sopenharmony_ci	ti,davinci-mask-cle = <0>;
8562306a36Sopenharmony_ci	ti,davinci-mask-chipsel = <0>;
8662306a36Sopenharmony_ci	nand-ecc-mode = "hw";
8762306a36Sopenharmony_ci	ti,davinci-ecc-bits = <4>;
8862306a36Sopenharmony_ci	nand-on-flash-bbt;
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci	partition@180000 {
9162306a36Sopenharmony_ci		label = "ubifs";
9262306a36Sopenharmony_ci		reg = <0x180000 0x7e80000>;
9362306a36Sopenharmony_ci	};
9462306a36Sopenharmony_ci};
95