18c2ecf20Sopenharmony_ciFreescale's NAND flash controller (NFC)
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis variant of the Freescale NAND flash controller (NFC) can be found on
48c2ecf20Sopenharmony_ciVybrid (vf610), MPC5125, MCF54418 and Kinetis K70.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciRequired properties:
78c2ecf20Sopenharmony_ci- compatible: Should be set to "fsl,vf610-nfc".
88c2ecf20Sopenharmony_ci- reg: address range of the NFC.
98c2ecf20Sopenharmony_ci- interrupts: interrupt of the NFC.
108c2ecf20Sopenharmony_ci- #address-cells: shall be set to 1. Encode the nand CS.
118c2ecf20Sopenharmony_ci- #size-cells : shall be set to 0.
128c2ecf20Sopenharmony_ci- assigned-clocks: main clock from the SoC, for Vybrid <&clks VF610_CLK_NFC>;
138c2ecf20Sopenharmony_ci- assigned-clock-rates: The NAND bus timing is derived from this clock
148c2ecf20Sopenharmony_ci    rate and should not exceed maximum timing for any NAND memory chip
158c2ecf20Sopenharmony_ci    in a board stuffing. Typical NAND memory timings derived from this
168c2ecf20Sopenharmony_ci    clock are found in the SoC hardware reference manual. Furthermore,
178c2ecf20Sopenharmony_ci    there might be restrictions on maximum rates when using hardware ECC.
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci- #address-cells, #size-cells : Must be present if the device has sub-nodes
208c2ecf20Sopenharmony_ci  representing partitions.
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciRequired children nodes:
238c2ecf20Sopenharmony_ciChildren nodes represent the available nand chips. Currently the driver can
248c2ecf20Sopenharmony_cionly handle one NAND chip.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciRequired properties:
278c2ecf20Sopenharmony_ci- compatible: Should be set to "fsl,vf610-nfc-cs".
288c2ecf20Sopenharmony_ci- nand-bus-width: see nand-controller.yaml
298c2ecf20Sopenharmony_ci- nand-ecc-mode: see nand-controller.yaml
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciRequired properties for hardware ECC:
328c2ecf20Sopenharmony_ci- nand-ecc-strength: supported strengths are 24 and 32 bit (see nand-controller.yaml)
338c2ecf20Sopenharmony_ci- nand-ecc-step-size: step size equals page size, currently only 2k pages are
348c2ecf20Sopenharmony_ci    supported
358c2ecf20Sopenharmony_ci- nand-on-flash-bbt: see nand-controller.yaml
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciExample:
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci	nfc: nand@400e0000 {
408c2ecf20Sopenharmony_ci		compatible = "fsl,vf610-nfc";
418c2ecf20Sopenharmony_ci		#address-cells = <1>;
428c2ecf20Sopenharmony_ci		#size-cells = <0>;
438c2ecf20Sopenharmony_ci		reg = <0x400e0000 0x4000>;
448c2ecf20Sopenharmony_ci		interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
458c2ecf20Sopenharmony_ci		clocks = <&clks VF610_CLK_NFC>;
468c2ecf20Sopenharmony_ci		clock-names = "nfc";
478c2ecf20Sopenharmony_ci		assigned-clocks = <&clks VF610_CLK_NFC>;
488c2ecf20Sopenharmony_ci		assigned-clock-rates = <33000000>;
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci		nand@0 {
518c2ecf20Sopenharmony_ci			compatible = "fsl,vf610-nfc-nandcs";
528c2ecf20Sopenharmony_ci			reg = <0>;
538c2ecf20Sopenharmony_ci			nand-bus-width = <8>;
548c2ecf20Sopenharmony_ci			nand-ecc-mode = "hw";
558c2ecf20Sopenharmony_ci			nand-ecc-strength = <32>;
568c2ecf20Sopenharmony_ci			nand-ecc-step-size = <2048>;
578c2ecf20Sopenharmony_ci			nand-on-flash-bbt;
588c2ecf20Sopenharmony_ci		};
598c2ecf20Sopenharmony_ci	};
60