atmel-nand.txt 3.8 KB

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