xref: /freebsd/sys/contrib/device-tree/Bindings/mtd/vf610-nfc.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotFreescale's NAND flash controller (NFC)
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThis variant of the Freescale NAND flash controller (NFC) can be found on
4*c66ec88fSEmmanuel VadotVybrid (vf610), MPC5125, MCF54418 and Kinetis K70.
5*c66ec88fSEmmanuel Vadot
6*c66ec88fSEmmanuel VadotRequired properties:
7*c66ec88fSEmmanuel Vadot- compatible: Should be set to "fsl,vf610-nfc".
8*c66ec88fSEmmanuel Vadot- reg: address range of the NFC.
9*c66ec88fSEmmanuel Vadot- interrupts: interrupt of the NFC.
10*c66ec88fSEmmanuel Vadot- #address-cells: shall be set to 1. Encode the nand CS.
11*c66ec88fSEmmanuel Vadot- #size-cells : shall be set to 0.
12*c66ec88fSEmmanuel Vadot- assigned-clocks: main clock from the SoC, for Vybrid <&clks VF610_CLK_NFC>;
13*c66ec88fSEmmanuel Vadot- assigned-clock-rates: The NAND bus timing is derived from this clock
14*c66ec88fSEmmanuel Vadot    rate and should not exceed maximum timing for any NAND memory chip
15*c66ec88fSEmmanuel Vadot    in a board stuffing. Typical NAND memory timings derived from this
16*c66ec88fSEmmanuel Vadot    clock are found in the SoC hardware reference manual. Furthermore,
17*c66ec88fSEmmanuel Vadot    there might be restrictions on maximum rates when using hardware ECC.
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel Vadot- #address-cells, #size-cells : Must be present if the device has sub-nodes
20*c66ec88fSEmmanuel Vadot  representing partitions.
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel VadotRequired children nodes:
23*c66ec88fSEmmanuel VadotChildren nodes represent the available nand chips. Currently the driver can
24*c66ec88fSEmmanuel Vadotonly handle one NAND chip.
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel VadotRequired properties:
27*c66ec88fSEmmanuel Vadot- compatible: Should be set to "fsl,vf610-nfc-cs".
28*c66ec88fSEmmanuel Vadot- nand-bus-width: see nand-controller.yaml
29*c66ec88fSEmmanuel Vadot- nand-ecc-mode: see nand-controller.yaml
30*c66ec88fSEmmanuel Vadot
31*c66ec88fSEmmanuel VadotRequired properties for hardware ECC:
32*c66ec88fSEmmanuel Vadot- nand-ecc-strength: supported strengths are 24 and 32 bit (see nand-controller.yaml)
33*c66ec88fSEmmanuel Vadot- nand-ecc-step-size: step size equals page size, currently only 2k pages are
34*c66ec88fSEmmanuel Vadot    supported
35*c66ec88fSEmmanuel Vadot- nand-on-flash-bbt: see nand-controller.yaml
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel VadotExample:
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel Vadot	nfc: nand@400e0000 {
40*c66ec88fSEmmanuel Vadot		compatible = "fsl,vf610-nfc";
41*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
42*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
43*c66ec88fSEmmanuel Vadot		reg = <0x400e0000 0x4000>;
44*c66ec88fSEmmanuel Vadot		interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
45*c66ec88fSEmmanuel Vadot		clocks = <&clks VF610_CLK_NFC>;
46*c66ec88fSEmmanuel Vadot		clock-names = "nfc";
47*c66ec88fSEmmanuel Vadot		assigned-clocks = <&clks VF610_CLK_NFC>;
48*c66ec88fSEmmanuel Vadot		assigned-clock-rates = <33000000>;
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel Vadot		nand@0 {
51*c66ec88fSEmmanuel Vadot			compatible = "fsl,vf610-nfc-nandcs";
52*c66ec88fSEmmanuel Vadot			reg = <0>;
53*c66ec88fSEmmanuel Vadot			nand-bus-width = <8>;
54*c66ec88fSEmmanuel Vadot			nand-ecc-mode = "hw";
55*c66ec88fSEmmanuel Vadot			nand-ecc-strength = <32>;
56*c66ec88fSEmmanuel Vadot			nand-ecc-step-size = <2048>;
57*c66ec88fSEmmanuel Vadot			nand-on-flash-bbt;
58*c66ec88fSEmmanuel Vadot		};
59*c66ec88fSEmmanuel Vadot	};
60