162306a36Sopenharmony_ciFreescale's NAND flash controller (NFC)
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciThis variant of the Freescale NAND flash controller (NFC) can be found on
462306a36Sopenharmony_ciVybrid (vf610), MPC5125, MCF54418 and Kinetis K70.
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciRequired properties:
762306a36Sopenharmony_ci- compatible: Should be set to "fsl,vf610-nfc".
862306a36Sopenharmony_ci- reg: address range of the NFC.
962306a36Sopenharmony_ci- interrupts: interrupt of the NFC.
1062306a36Sopenharmony_ci- #address-cells: shall be set to 1. Encode the nand CS.
1162306a36Sopenharmony_ci- #size-cells : shall be set to 0.
1262306a36Sopenharmony_ci- assigned-clocks: main clock from the SoC, for Vybrid <&clks VF610_CLK_NFC>;
1362306a36Sopenharmony_ci- assigned-clock-rates: The NAND bus timing is derived from this clock
1462306a36Sopenharmony_ci    rate and should not exceed maximum timing for any NAND memory chip
1562306a36Sopenharmony_ci    in a board stuffing. Typical NAND memory timings derived from this
1662306a36Sopenharmony_ci    clock are found in the SoC hardware reference manual. Furthermore,
1762306a36Sopenharmony_ci    there might be restrictions on maximum rates when using hardware ECC.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci- #address-cells, #size-cells : Must be present if the device has sub-nodes
2062306a36Sopenharmony_ci  representing partitions.
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciRequired children nodes:
2362306a36Sopenharmony_ciChildren nodes represent the available nand chips. Currently the driver can
2462306a36Sopenharmony_cionly handle one NAND chip.
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ciRequired properties:
2762306a36Sopenharmony_ci- compatible: Should be set to "fsl,vf610-nfc-cs".
2862306a36Sopenharmony_ci- nand-bus-width: see nand-controller.yaml
2962306a36Sopenharmony_ci- nand-ecc-mode: see nand-controller.yaml
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciRequired properties for hardware ECC:
3262306a36Sopenharmony_ci- nand-ecc-strength: supported strengths are 24 and 32 bit (see nand-controller.yaml)
3362306a36Sopenharmony_ci- nand-ecc-step-size: step size equals page size, currently only 2k pages are
3462306a36Sopenharmony_ci    supported
3562306a36Sopenharmony_ci- nand-on-flash-bbt: see nand-controller.yaml
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciExample:
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci	nfc: nand@400e0000 {
4062306a36Sopenharmony_ci		compatible = "fsl,vf610-nfc";
4162306a36Sopenharmony_ci		#address-cells = <1>;
4262306a36Sopenharmony_ci		#size-cells = <0>;
4362306a36Sopenharmony_ci		reg = <0x400e0000 0x4000>;
4462306a36Sopenharmony_ci		interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
4562306a36Sopenharmony_ci		clocks = <&clks VF610_CLK_NFC>;
4662306a36Sopenharmony_ci		clock-names = "nfc";
4762306a36Sopenharmony_ci		assigned-clocks = <&clks VF610_CLK_NFC>;
4862306a36Sopenharmony_ci		assigned-clock-rates = <33000000>;
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci		nand@0 {
5162306a36Sopenharmony_ci			compatible = "fsl,vf610-nfc-nandcs";
5262306a36Sopenharmony_ci			reg = <0>;
5362306a36Sopenharmony_ci			nand-bus-width = <8>;
5462306a36Sopenharmony_ci			nand-ecc-mode = "hw";
5562306a36Sopenharmony_ci			nand-ecc-strength = <32>;
5662306a36Sopenharmony_ci			nand-ecc-step-size = <2048>;
5762306a36Sopenharmony_ci			nand-on-flash-bbt;
5862306a36Sopenharmony_ci		};
5962306a36Sopenharmony_ci	};
60