Daniel Mack | bc6b1e7 | 2012-12-14 11:36:44 +0100 | [diff] [blame] | 1 | Device tree bindings for GPMC connected NANDs |
| 2 | |
| 3 | GPMC connected NAND (found on OMAP boards) are represented as child nodes of |
| 4 | the GPMC controller with a name of "nand". |
| 5 | |
| 6 | All timing relevant properties as well as generic gpmc child properties are |
| 7 | explained in a separate documents - please refer to |
| 8 | Documentation/devicetree/bindings/bus/ti-gpmc.txt |
| 9 | |
| 10 | For NAND specific properties such as ECC modes or bus width, please refer to |
| 11 | Documentation/devicetree/bindings/mtd/nand.txt |
| 12 | |
| 13 | |
| 14 | Required properties: |
| 15 | |
| 16 | - reg: The CS line the peripheral is connected to |
| 17 | |
| 18 | Optional properties: |
| 19 | |
| 20 | - nand-bus-width: Set this numeric value to 16 if the hardware |
| 21 | is wired that way. If not specified, a bus |
| 22 | width of 8 is assumed. |
| 23 | |
| 24 | - ti,nand-ecc-opt: A string setting the ECC layout to use. One of: |
| 25 | |
| 26 | "sw" Software method (default) |
| 27 | "hw" Hardware method |
| 28 | "hw-romcode" gpmc hamming mode method & romcode layout |
| 29 | "bch4" 4-bit BCH ecc code |
| 30 | "bch8" 8-bit BCH ecc code |
| 31 | |
Mark Jackson | 496c8a0 | 2013-04-19 21:08:28 +0100 | [diff] [blame] | 32 | - ti,nand-xfer-type: A string setting the data transfer type. One of: |
| 33 | |
| 34 | "prefetch-polled" Prefetch polled mode (default) |
| 35 | "polled" Polled mode, without prefetch |
| 36 | "prefetch-dma" Prefetch enabled sDMA mode |
| 37 | "prefetch-irq" Prefetch enabled irq mode |
| 38 | |
Philip Avinash | 97c794a | 2013-01-18 10:27:46 +0530 | [diff] [blame] | 39 | - elm_id: Specifies elm device node. This is required to support BCH |
| 40 | error correction using ELM module. |
| 41 | |
Daniel Mack | bc6b1e7 | 2012-12-14 11:36:44 +0100 | [diff] [blame] | 42 | For inline partiton table parsing (optional): |
| 43 | |
| 44 | - #address-cells: should be set to 1 |
| 45 | - #size-cells: should be set to 1 |
| 46 | |
| 47 | Example for an AM33xx board: |
| 48 | |
| 49 | gpmc: gpmc@50000000 { |
| 50 | compatible = "ti,am3352-gpmc"; |
| 51 | ti,hwmods = "gpmc"; |
| 52 | reg = <0x50000000 0x1000000>; |
| 53 | interrupts = <100>; |
| 54 | gpmc,num-cs = <8>; |
| 55 | gpmc,num-waitpins = <2>; |
| 56 | #address-cells = <2>; |
| 57 | #size-cells = <1>; |
| 58 | ranges = <0 0 0x08000000 0x2000>; /* CS0: NAND */ |
Philip Avinash | 97c794a | 2013-01-18 10:27:46 +0530 | [diff] [blame] | 59 | elm_id = <&elm>; |
Daniel Mack | bc6b1e7 | 2012-12-14 11:36:44 +0100 | [diff] [blame] | 60 | |
| 61 | nand@0,0 { |
| 62 | reg = <0 0 0>; /* CS0, offset 0 */ |
| 63 | nand-bus-width = <16>; |
| 64 | ti,nand-ecc-opt = "bch8"; |
Mark Jackson | 496c8a0 | 2013-04-19 21:08:28 +0100 | [diff] [blame] | 65 | ti,nand-xfer-type = "polled"; |
Daniel Mack | bc6b1e7 | 2012-12-14 11:36:44 +0100 | [diff] [blame] | 66 | |
Jon Hunter | c059e02 | 2013-04-09 11:37:40 -0500 | [diff] [blame] | 67 | gpmc,sync-clk-ps = <0>; |
| 68 | gpmc,cs-on-ns = <0>; |
| 69 | gpmc,cs-rd-off-ns = <44>; |
| 70 | gpmc,cs-wr-off-ns = <44>; |
| 71 | gpmc,adv-on-ns = <6>; |
| 72 | gpmc,adv-rd-off-ns = <34>; |
| 73 | gpmc,adv-wr-off-ns = <44>; |
| 74 | gpmc,we-off-ns = <40>; |
| 75 | gpmc,oe-off-ns = <54>; |
| 76 | gpmc,access-ns = <64>; |
| 77 | gpmc,rd-cycle-ns = <82>; |
| 78 | gpmc,wr-cycle-ns = <82>; |
| 79 | gpmc,wr-access-ns = <40>; |
| 80 | gpmc,wr-data-mux-bus-ns = <0>; |
Daniel Mack | bc6b1e7 | 2012-12-14 11:36:44 +0100 | [diff] [blame] | 81 | |
| 82 | #address-cells = <1>; |
| 83 | #size-cells = <1>; |
| 84 | |
| 85 | /* partitions go here */ |
| 86 | }; |
| 87 | }; |
| 88 | |