atmel-nand.txt 3.7 KB

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