162306a36Sopenharmony_ciGPIO assisted NAND flash
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciThe GPIO assisted NAND flash uses a memory mapped interface to
462306a36Sopenharmony_ciread/write the NAND commands and data and GPIO pins for the control
562306a36Sopenharmony_cisignals.
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciRequired properties:
862306a36Sopenharmony_ci- compatible : "gpio-control-nand"
962306a36Sopenharmony_ci- reg : should specify localbus chip select and size used for the chip.  The
1062306a36Sopenharmony_ci  resource describes the data bus connected to the NAND flash and all accesses
1162306a36Sopenharmony_ci  are made in native endianness.
1262306a36Sopenharmony_ci- #address-cells, #size-cells : Must be present if the device has sub-nodes
1362306a36Sopenharmony_ci  representing partitions.
1462306a36Sopenharmony_ci- gpios : Specifies the GPIO pins to control the NAND device.  The order of
1562306a36Sopenharmony_ci  GPIO references is:  RDY, nCE, ALE, CLE, and nWP. nCE and nWP are optional.
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ciOptional properties:
1862306a36Sopenharmony_ci- bank-width : Width (in bytes) of the device.  If not present, the width
1962306a36Sopenharmony_ci  defaults to 1 byte.
2062306a36Sopenharmony_ci- chip-delay : chip dependent delay for transferring data from array to
2162306a36Sopenharmony_ci  read registers (tR).  If not present then a default of 20us is used.
2262306a36Sopenharmony_ci- gpio-control-nand,io-sync-reg : A 64-bit physical address for a read
2362306a36Sopenharmony_ci  location used to guard against bus reordering with regards to accesses to
2462306a36Sopenharmony_ci  the GPIO's and the NAND flash data bus.  If present, then after changing
2562306a36Sopenharmony_ci  GPIO state and before and after command byte writes, this register will be
2662306a36Sopenharmony_ci  read to ensure that the GPIO accesses have completed.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ciThe device tree may optionally contain sub-nodes describing partitions of the
2962306a36Sopenharmony_ciaddress space. See partition.txt for more detail.
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciExamples:
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_cigpio-nand@1,0 {
3462306a36Sopenharmony_ci	compatible = "gpio-control-nand";
3562306a36Sopenharmony_ci	reg = <1 0x0000 0x2>;
3662306a36Sopenharmony_ci	#address-cells = <1>;
3762306a36Sopenharmony_ci	#size-cells = <1>;
3862306a36Sopenharmony_ci	gpios = <&banka 1 0>,	/* RDY */
3962306a36Sopenharmony_ci		<0>, 		/* nCE */
4062306a36Sopenharmony_ci		<&banka 3 0>, 	/* ALE */
4162306a36Sopenharmony_ci		<&banka 4 0>, 	/* CLE */
4262306a36Sopenharmony_ci		<0>;		/* nWP */
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci	partition@0 {
4562306a36Sopenharmony_ci	...
4662306a36Sopenharmony_ci	};
4762306a36Sopenharmony_ci};
48