ti-aemif.txt 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. * Device tree bindings for Texas instruments AEMIF controller
  2. The Async External Memory Interface (EMIF16/AEMIF) controller is intended to
  3. provide a glue-less interface to a variety of asynchronous memory devices like
  4. ASRA M, NOR and NAND memory. A total of 256M bytes of any of these memories
  5. can be accessed at any given time via four chip selects with 64M byte access
  6. per chip select. Synchronous memories such as DDR1 SD RAM, SDR SDRAM
  7. and Mobile SDR are not supported.
  8. Documentation:
  9. Davinci DM646x - http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf
  10. OMAP-L138 (DA850) - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf
  11. Kestone - http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf
  12. Required properties:
  13. - compatible: "ti,davinci-aemif"
  14. "ti,keystone-aemif"
  15. "ti,da850-aemif"
  16. - reg: contains offset/length value for AEMIF control registers
  17. space.
  18. - #address-cells: Must be 2. The partition number has to be encoded in the
  19. first address cell and it may accept values 0..N-1
  20. (N - total number of partitions). It's recommended to
  21. assign N-1 number for the control partition. The second
  22. cell is the offset into the partition.
  23. - #size-cells: Must be set to 1.
  24. - ranges: Contains memory regions. There are two types of
  25. ranges/partitions:
  26. - CS-specific partition/range. If continuous, must be
  27. set up to reflect the memory layout for 4 chipselects,
  28. if not then additional range/partition can be added and
  29. child device can select the proper one.
  30. - control partition which is common for all CS
  31. interfaces.
  32. - clocks: the clock feeding the controller clock. Required only
  33. if clock tree data present in device tree.
  34. See clock-bindings.txt
  35. - clock-names: clock name. It has to be "aemif". Required only if clock
  36. tree data present in device tree, in another case don't
  37. use it.
  38. See clock-bindings.txt
  39. - clock-ranges: Empty property indicating that child nodes can inherit
  40. named clocks. Required only if clock tree data present
  41. in device tree.
  42. See clock-bindings.txt
  43. Child chip-select (cs) nodes contain the memory devices nodes connected to
  44. such as NOR (e.g. cfi-flash) and NAND (ti,davinci-nand, see davinci-nand.txt).
  45. There might be board specific devices like FPGAs.
  46. Required child cs node properties:
  47. - #address-cells: Must be 2.
  48. - #size-cells: Must be 1.
  49. - ranges: Empty property indicating that child nodes can inherit
  50. memory layout.
  51. - clock-ranges: Empty property indicating that child nodes can inherit
  52. named clocks. Required only if clock tree data present
  53. in device tree.
  54. - ti,cs-chipselect: number of chipselect. Indicates on the aemif driver
  55. which chipselect is used for accessing the memory. For
  56. compatibles "ti,davinci-aemif" and "ti,keystone-aemif"
  57. it can be in range [0-3]. For compatible
  58. "ti,da850-aemif" range is [2-5].
  59. Optional child cs node properties:
  60. - ti,cs-bus-width: width of the asynchronous device's data bus
  61. 8 or 16 if not preset 8
  62. - ti,cs-select-strobe-mode: enable/disable select strobe mode
  63. In select strobe mode chip select behaves as
  64. the strobe and is active only during the strobe
  65. period. If present then enable.
  66. - ti,cs-extended-wait-mode: enable/disable extended wait mode
  67. if set, the controller monitors the EMIFWAIT pin
  68. mapped to that chip select to determine if the
  69. device wants to extend the strobe period. If
  70. present then enable.
  71. - ti,cs-min-turnaround-ns: minimum turn around time, ns
  72. Time between the end of one asynchronous memory
  73. access and the start of another asynchronous
  74. memory access. This delay is not incurred
  75. between a read followed by read or a write
  76. followed by a write to same chip select.
  77. - ti,cs-read-setup-ns: read setup width, ns
  78. Time between the beginning of a memory cycle
  79. and the activation of read strobe.
  80. Minimum value is 1 (0 treated as 1).
  81. - ti,cs-read-strobe-ns: read strobe width, ns
  82. Time between the activation and deactivation of
  83. the read strobe.
  84. Minimum value is 1 (0 treated as 1).
  85. - ti,cs-read-hold-ns: read hold width, ns
  86. Time between the deactivation of the read
  87. strobe and the end of the cycle (which may be
  88. either an address change or the deactivation of
  89. the chip select signal.
  90. Minimum value is 1 (0 treated as 1).
  91. - ti,cs-write-setup-ns: write setup width, ns
  92. Time between the beginning of a memory cycle
  93. and the activation of write strobe.
  94. Minimum value is 1 (0 treated as 1).
  95. - ti,cs-write-strobe-ns: write strobe width, ns
  96. Time between the activation and deactivation of
  97. the write strobe.
  98. Minimum value is 1 (0 treated as 1).
  99. - ti,cs-write-hold-ns: write hold width, ns
  100. Time between the deactivation of the write
  101. strobe and the end of the cycle (which may be
  102. either an address change or the deactivation of
  103. the chip select signal.
  104. Minimum value is 1 (0 treated as 1).
  105. If any of the above parameters are absent, current parameter value will be taken
  106. from the corresponding HW reg.
  107. Example for aemif, davinci nand and nor flash chip select shown below.
  108. memory-controller@21000A00 {
  109. compatible = "ti,davinci-aemif";
  110. #address-cells = <2>;
  111. #size-cells = <1>;
  112. clocks = <&clkaemif 0>;
  113. clock-names = "aemif";
  114. clock-ranges;
  115. reg = <0x21000A00 0x00000100>;
  116. ranges = <0 0 0x70000000 0x10000000
  117. 1 0 0x21000A00 0x00000100>;
  118. /*
  119. * Partition0: CS-specific memory range which is
  120. * implemented as continuous physical memory region
  121. * Partition1: control memory range
  122. */
  123. nand:cs2 {
  124. #address-cells = <2>;
  125. #size-cells = <1>;
  126. clock-ranges;
  127. ranges;
  128. ti,cs-chipselect = <2>;
  129. /* all timings in nanoseconds */
  130. ti,cs-min-turnaround-ns = <0>;
  131. ti,cs-read-hold-ns = <7>;
  132. ti,cs-read-strobe-ns = <42>;
  133. ti,cs-read-setup-ns = <14>;
  134. ti,cs-write-hold-ns = <7>;
  135. ti,cs-write-strobe-ns = <42>;
  136. ti,cs-write-setup-ns = <14>;
  137. nand@0,0x8000000 {
  138. compatible = "ti,davinci-nand";
  139. reg = <0 0x8000000 0x4000000
  140. 1 0x0000000 0x0000100>;
  141. /*
  142. * Partition0, offset 0x8000000, size 0x4000000
  143. * Partition1, offset 0x0000000, size 0x0000100
  144. */
  145. .. see davinci-nand.txt
  146. };
  147. };
  148. nor:cs0 {
  149. #address-cells = <2>;
  150. #size-cells = <1>;
  151. clock-ranges;
  152. ranges;
  153. ti,cs-chipselect = <0>;
  154. /* all timings in nanoseconds */
  155. ti,cs-min-turnaround-ns = <0>;
  156. ti,cs-read-hold-ns = <8>;
  157. ti,cs-read-strobe-ns = <40>;
  158. ti,cs-read-setup-ns = <14>;
  159. ti,cs-write-hold-ns = <7>;
  160. ti,cs-write-strobe-ns = <40>;
  161. ti,cs-write-setup-ns = <14>;
  162. ti,cs-bus-width = <16>;
  163. flash@0,0x0000000 {
  164. compatible = "cfi-flash";
  165. reg = <0 0x0000000 0x4000000>;
  166. ...
  167. };
  168. };
  169. };