summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
blob: e7f8d7ed47ebfabb67de32b9b611ed52aca4bf35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Device tree bindings for GPMC connected NANDs

GPMC connected NAND (found on OMAP boards) are represented as child nodes of
the GPMC controller with a name of "nand".

All timing relevant properties as well as generic gpmc child properties are
explained in a separate documents - please refer to
Documentation/devicetree/bindings/bus/ti-gpmc.txt

For NAND specific properties such as ECC modes or bus width, please refer to
Documentation/devicetree/bindings/mtd/nand.txt


Required properties:

 - reg:		The CS line the peripheral is connected to

Optional properties:

 - nand-bus-width: 		Set this numeric value to 16 if the hardware
				is wired that way. If not specified, a bus
				width of 8 is assumed.

 - ti,nand-ecc-opt:		A string setting the ECC layout to use. One of:

		"sw"		Software method (default)
		"hw"		Hardware method
		"hw-romcode"	gpmc hamming mode method & romcode layout
		"bch4"		4-bit BCH ecc code
		"bch8"		8-bit BCH ecc code

 - elm_id:	Specifies elm device node. This is required to support BCH
 		error correction using ELM module.

For inline partiton table parsing (optional):

 - #address-cells: should be set to 1
 - #size-cells: should be set to 1

Example for an AM33xx board:

	gpmc: gpmc@50000000 {
		compatible = "ti,am3352-gpmc";
		ti,hwmods = "gpmc";
		reg = <0x50000000 0x1000000>;
		interrupts = <100>;
		gpmc,num-cs = <8>;
		gpmc,num-waitpins = <2>;
		#address-cells = <2>;
		#size-cells = <1>;
		ranges = <0 0 0x08000000 0x2000>;	/* CS0: NAND */
		elm_id = <&elm>;

		nand@0,0 {
			reg = <0 0 0>; /* CS0, offset 0 */
			nand-bus-width = <16>;
			ti,nand-ecc-opt = "bch8";

			gpmc,sync-clk = <0>;
			gpmc,cs-on = <0>;
			gpmc,cs-rd-off = <44>;
			gpmc,cs-wr-off = <44>;
			gpmc,adv-on = <6>;
			gpmc,adv-rd-off = <34>;
			gpmc,adv-wr-off = <44>;
			gpmc,we-off = <40>;
			gpmc,oe-off = <54>;
			gpmc,access = <64>;
			gpmc,rd-cycle = <82>;
			gpmc,wr-cycle = <82>;
			gpmc,wr-access = <40>;
			gpmc,wr-data-mux-bus = <0>;

			#address-cells = <1>;
			#size-cells = <1>;

			/* partitions go here */
		};
	};