atmel-nand.txt 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. Atmel NAND flash
  2. Required properties:
  3. - compatible : "atmel,at91rm9200-nand".
  4. - reg : should specify localbus address and size used for the chip,
  5. and hardware ECC controller if available.
  6. If the hardware ECC is PMECC, it should contain address and size for
  7. PMECC, PMECC Error Location controller and ROM which has lookup tables.
  8. - atmel,nand-addr-offset : offset for the address latch.
  9. - atmel,nand-cmd-offset : offset for the command latch.
  10. - #address-cells, #size-cells : Must be present if the device has sub-nodes
  11. representing partitions.
  12. - gpios : specifies the gpio pins to control the NAND device. detect is an
  13. optional gpio and may be set to 0 if not present.
  14. Optional properties:
  15. - nand-ecc-mode : String, operation mode of the NAND ecc mode, soft by default.
  16. Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
  17. "soft_bch".
  18. - atmel,has-pmecc : boolean to enable Programmable Multibit ECC hardware.
  19. Only supported by at91sam9x5 or later sam9 product.
  20. - atmel,pmecc-cap : error correct capability for Programmable Multibit ECC
  21. Controller. Supported values are: 2, 4, 8, 12, 24.
  22. - atmel,pmecc-sector-size : sector size for ECC computation. Supported values
  23. are: 512, 1024.
  24. - atmel,pmecc-lookup-table-offset : includes two offsets of lookup table in ROM
  25. for different sector size. First one is for sector size 512, the next is for
  26. sector size 1024.
  27. - nand-bus-width : 8 or 16 bus width if not present 8
  28. - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
  29. Examples:
  30. nand0: nand@40000000,0 {
  31. compatible = "atmel,at91rm9200-nand";
  32. #address-cells = <1>;
  33. #size-cells = <1>;
  34. reg = <0x40000000 0x10000000
  35. 0xffffe800 0x200
  36. >;
  37. atmel,nand-addr-offset = <21>; /* ale */
  38. atmel,nand-cmd-offset = <22>; /* cle */
  39. nand-on-flash-bbt;
  40. nand-ecc-mode = "soft";
  41. gpios = <&pioC 13 0 /* rdy */
  42. &pioC 14 0 /* nce */
  43. 0 /* cd */
  44. >;
  45. partition@0 {
  46. ...
  47. };
  48. };
  49. /* for PMECC supported chips */
  50. nand0: nand@40000000 {
  51. compatible = "atmel,at91rm9200-nand";
  52. #address-cells = <1>;
  53. #size-cells = <1>;
  54. reg = < 0x40000000 0x10000000 /* bus addr & size */
  55. 0xffffe000 0x00000600 /* PMECC addr & size */
  56. 0xffffe600 0x00000200 /* PMECC ERRLOC addr & size */
  57. 0x00100000 0x00100000 /* ROM addr & size */
  58. >;
  59. atmel,nand-addr-offset = <21>; /* ale */
  60. atmel,nand-cmd-offset = <22>; /* cle */
  61. nand-on-flash-bbt;
  62. nand-ecc-mode = "hw";
  63. atmel,has-pmecc; /* enable PMECC */
  64. atmel,pmecc-cap = <2>;
  65. atmel,pmecc-sector-size = <512>;
  66. atmel,pmecc-lookup-table-offset = <0x8000 0x10000>;
  67. gpios = <&pioD 5 0 /* rdy */
  68. &pioD 4 0 /* nce */
  69. 0 /* cd */
  70. >;
  71. partition@0 {
  72. ...
  73. };
  74. };