1Atmel NAND flash 2 3Required properties: 4- compatible : "atmel,at91rm9200-nand". 5- reg : should specify localbus address and size used for the chip, 6 and hardware ECC controller if available. 7 If the hardware ECC is PMECC, it should contain address and size for 8 PMECC, PMECC Error Location controller and ROM which has lookup tables. 9- atmel,nand-addr-offset : offset for the address latch. 10- atmel,nand-cmd-offset : offset for the command latch. 11- #address-cells, #size-cells : Must be present if the device has sub-nodes 12 representing partitions. 13 14- gpios : specifies the gpio pins to control the NAND device. detect is an 15 optional gpio and may be set to 0 if not present. 16 17Optional properties: 18- atmel,nand-has-dma : boolean to support dma transfer for nand read/write. 19- nand-ecc-mode : String, operation mode of the NAND ecc mode, soft by default. 20 Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first", 21 "soft_bch". 22- atmel,has-pmecc : boolean to enable Programmable Multibit ECC hardware. 23 Only supported by at91sam9x5 or later sam9 product. 24- atmel,pmecc-cap : error correct capability for Programmable Multibit ECC 25 Controller. Supported values are: 2, 4, 8, 12, 24. 26- atmel,pmecc-sector-size : sector size for ECC computation. Supported values 27 are: 512, 1024. 28- atmel,pmecc-lookup-table-offset : includes two offsets of lookup table in ROM 29 for different sector size. First one is for sector size 512, the next is for 30 sector size 1024. 31- nand-bus-width : 8 or 16 bus width if not present 8 32- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false 33- Nand Flash Controller(NFC) is a slave driver under Atmel nand flash 34 - Required properties: 35 - compatible : "atmel,sama5d3-nfc". 36 - reg : should specify the address and size used for NFC command registers, 37 NFC registers and NFC Sram. NFC Sram address and size can be absent 38 if don't want to use it. 39 - Optional properties: 40 - atmel,write-by-sram: boolean to enable NFC write by sram. 41 42Examples: 43nand0: nand@40000000,0 { 44 compatible = "atmel,at91rm9200-nand"; 45 #address-cells = <1>; 46 #size-cells = <1>; 47 reg = <0x40000000 0x10000000 48 0xffffe800 0x200 49 >; 50 atmel,nand-addr-offset = <21>; /* ale */ 51 atmel,nand-cmd-offset = <22>; /* cle */ 52 nand-on-flash-bbt; 53 nand-ecc-mode = "soft"; 54 gpios = <&pioC 13 0 /* rdy */ 55 &pioC 14 0 /* nce */ 56 0 /* cd */ 57 >; 58 partition@0 { 59 ... 60 }; 61}; 62 63/* for PMECC supported chips */ 64nand0: nand@40000000 { 65 compatible = "atmel,at91rm9200-nand"; 66 #address-cells = <1>; 67 #size-cells = <1>; 68 reg = < 0x40000000 0x10000000 /* bus addr & size */ 69 0xffffe000 0x00000600 /* PMECC addr & size */ 70 0xffffe600 0x00000200 /* PMECC ERRLOC addr & size */ 71 0x00100000 0x00100000 /* ROM addr & size */ 72 >; 73 atmel,nand-addr-offset = <21>; /* ale */ 74 atmel,nand-cmd-offset = <22>; /* cle */ 75 nand-on-flash-bbt; 76 nand-ecc-mode = "hw"; 77 atmel,has-pmecc; /* enable PMECC */ 78 atmel,pmecc-cap = <2>; 79 atmel,pmecc-sector-size = <512>; 80 atmel,pmecc-lookup-table-offset = <0x8000 0x10000>; 81 gpios = <&pioD 5 0 /* rdy */ 82 &pioD 4 0 /* nce */ 83 0 /* cd */ 84 >; 85 partition@0 { 86 ... 87 }; 88}; 89 90/* for NFC supported chips */ 91nand0: nand@40000000 { 92 compatible = "atmel,at91rm9200-nand"; 93 #address-cells = <1>; 94 #size-cells = <1>; 95 ranges; 96 ... 97 nfc@70000000 { 98 compatible = "atmel,sama5d3-nfc"; 99 #address-cells = <1>; 100 #size-cells = <1>; 101 reg = < 102 0x70000000 0x10000000 /* NFC Command Registers */ 103 0xffffc000 0x00000070 /* NFC HSMC regs */ 104 0x00200000 0x00100000 /* NFC SRAM banks */ 105 >; 106 }; 107}; 108