xref: /freebsd-src/sys/contrib/device-tree/Bindings/mtd/fsmc-nand.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotST Microelectronics Flexible Static Memory Controller (FSMC)
2*c66ec88fSEmmanuel VadotNAND Interface
3*c66ec88fSEmmanuel Vadot
4*c66ec88fSEmmanuel VadotRequired properties:
5*c66ec88fSEmmanuel Vadot- compatible : "st,spear600-fsmc-nand", "stericsson,fsmc-nand"
6*c66ec88fSEmmanuel Vadot- reg : Address range of the mtd chip
7*c66ec88fSEmmanuel Vadot- reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd"
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel VadotOptional properties:
10*c66ec88fSEmmanuel Vadot- bank-width : Width (in bytes) of the device.  If not present, the width
11*c66ec88fSEmmanuel Vadot  defaults to 1 byte
12*c66ec88fSEmmanuel Vadot- nand-skip-bbtscan: Indicates the BBT scanning should be skipped
13*c66ec88fSEmmanuel Vadot- timings: array of 6 bytes for NAND timings. The meanings of these bytes
14*c66ec88fSEmmanuel Vadot  are:
15*c66ec88fSEmmanuel Vadot  byte 0 TCLR  : CLE to RE delay in number of AHB clock cycles, only 4 bits
16*c66ec88fSEmmanuel Vadot                 are valid. Zero means one clockcycle, 15 means 16 clock
17*c66ec88fSEmmanuel Vadot                 cycles.
18*c66ec88fSEmmanuel Vadot  byte 1 TAR   : ALE to RE delay, 4 bits are valid. Same format as TCLR.
19*c66ec88fSEmmanuel Vadot  byte 2 THIZ  : number of HCLK clock cycles during which the data bus is
20*c66ec88fSEmmanuel Vadot                 kept in Hi-Z (tristate) after the start of a write access.
21*c66ec88fSEmmanuel Vadot                 Only valid for write transactions. Zero means zero cycles,
22*c66ec88fSEmmanuel Vadot                 255 means 255 cycles.
23*c66ec88fSEmmanuel Vadot  byte 3 THOLD : number of HCLK clock cycles to hold the address (and data
24*c66ec88fSEmmanuel Vadot                 when writing) after the command deassertation. Zero means
25*c66ec88fSEmmanuel Vadot                 one cycle, 255 means 256 cycles.
26*c66ec88fSEmmanuel Vadot  byte 4 TWAIT : number of HCLK clock cycles to assert the command to the
27*c66ec88fSEmmanuel Vadot                 NAND flash in response to SMWAITn. Zero means 1 cycle,
28*c66ec88fSEmmanuel Vadot                 255 means 256 cycles.
29*c66ec88fSEmmanuel Vadot  byte 5 TSET  : number of HCLK clock cycles to assert the address before the
30*c66ec88fSEmmanuel Vadot                 command is asserted. Zero means one cycle, 255 means 256
31*c66ec88fSEmmanuel Vadot                 cycles.
32*c66ec88fSEmmanuel Vadot- bank: default NAND bank to use (0-3 are valid, 0 is the default).
33*c66ec88fSEmmanuel Vadot- nand-ecc-mode      : see nand-controller.yaml
34*c66ec88fSEmmanuel Vadot- nand-ecc-strength  : see nand-controller.yaml
35*c66ec88fSEmmanuel Vadot- nand-ecc-step-size : see nand-controller.yaml
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel VadotCan support 1-bit HW ECC (default) or if stronger correction is required,
38*c66ec88fSEmmanuel Vadotsoftware-based BCH.
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel VadotExample:
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel Vadot	fsmc: flash@d1800000 {
43*c66ec88fSEmmanuel Vadot		compatible = "st,spear600-fsmc-nand";
44*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
45*c66ec88fSEmmanuel Vadot		#size-cells = <1>;
46*c66ec88fSEmmanuel Vadot		reg = <0xd1800000 0x1000	/* FSMC Register */
47*c66ec88fSEmmanuel Vadot		       0xd2000000 0x0010	/* NAND Base DATA */
48*c66ec88fSEmmanuel Vadot		       0xd2020000 0x0010	/* NAND Base ADDR */
49*c66ec88fSEmmanuel Vadot		       0xd2010000 0x0010>;	/* NAND Base CMD */
50*c66ec88fSEmmanuel Vadot		reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
51*c66ec88fSEmmanuel Vadot
52*c66ec88fSEmmanuel Vadot		bank-width = <1>;
53*c66ec88fSEmmanuel Vadot		nand-skip-bbtscan;
54*c66ec88fSEmmanuel Vadot		timings = /bits/ 8 <0 0 0 2 3 0>;
55*c66ec88fSEmmanuel Vadot		bank = <1>;
56*c66ec88fSEmmanuel Vadot
57*c66ec88fSEmmanuel Vadot		partition@0 {
58*c66ec88fSEmmanuel Vadot			...
59*c66ec88fSEmmanuel Vadot		};
60*c66ec88fSEmmanuel Vadot	};
61