mvebu-devbus.txt 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. Device tree bindings for MVEBU Device Bus controllers
  2. The Device Bus controller available in some Marvell's SoC allows to control
  3. different types of standard memory and I/O devices such as NOR, NAND, and FPGA.
  4. The actual devices are instantiated from the child nodes of a Device Bus node.
  5. Required properties:
  6. - compatible: Armada 370/XP SoC are supported using the
  7. "marvell,mvebu-devbus" compatible string.
  8. Orion5x SoC are supported using the
  9. "marvell,orion-devbus" compatible string.
  10. - reg: A resource specifier for the register space.
  11. This is the base address of a chip select within
  12. the controller's register space.
  13. (see the example below)
  14. - #address-cells: Must be set to 1
  15. - #size-cells: Must be set to 1
  16. - ranges: Must be set up to reflect the memory layout with four
  17. integer values for each chip-select line in use:
  18. 0 <physical address of mapping> <size>
  19. Optional properties:
  20. - devbus,keep-config This property can optionally be used to keep
  21. using the timing parameters set by the
  22. bootloader. It makes all the timing properties
  23. described below unused.
  24. Timing properties for child nodes:
  25. Read parameters:
  26. - devbus,turn-off-ps: Defines the time during which the controller does not
  27. drive the AD bus after the completion of a device read.
  28. This prevents contentions on the Device Bus after a read
  29. cycle from a slow device.
  30. Mandatory, except if devbus,keep-config is used.
  31. - devbus,bus-width: Defines the bus width, in bits (e.g. <16>).
  32. Mandatory, except if devbus,keep-config is used.
  33. - devbus,badr-skew-ps: Defines the time delay from from A[2:0] toggle,
  34. to read data sample. This parameter is useful for
  35. synchronous pipelined devices, where the address
  36. precedes the read data by one or two cycles.
  37. Mandatory, except if devbus,keep-config is used.
  38. - devbus,acc-first-ps: Defines the time delay from the negation of
  39. ALE[0] to the cycle that the first read data is sampled
  40. by the controller.
  41. Mandatory, except if devbus,keep-config is used.
  42. - devbus,acc-next-ps: Defines the time delay between the cycle that
  43. samples data N and the cycle that samples data N+1
  44. (in burst accesses).
  45. Mandatory, except if devbus,keep-config is used.
  46. - devbus,rd-setup-ps: Defines the time delay between DEV_CSn assertion to
  47. DEV_OEn assertion. If set to 0 (default),
  48. DEV_OEn and DEV_CSn are asserted at the same cycle.
  49. This parameter has no affect on <acc-first-ps> parameter
  50. (no affect on first data sample). Set <rd-setup-ps>
  51. to a value smaller than <acc-first-ps>.
  52. Mandatory for "marvell,mvebu-devbus" compatible string,
  53. except if devbus,keep-config is used.
  54. - devbus,rd-hold-ps: Defines the time between the last data sample to the
  55. de-assertion of DEV_CSn. If set to 0 (default),
  56. DEV_OEn and DEV_CSn are de-asserted at the same cycle
  57. (the cycle of the last data sample).
  58. This parameter has no affect on DEV_OEn de-assertion.
  59. DEV_OEn is always de-asserted the next cycle after
  60. last data sampled. Also this parameter has no
  61. affect on <turn-off-ps> parameter.
  62. Set <rd-hold-ps> to a value smaller than <turn-off-ps>.
  63. Mandatory for "marvell,mvebu-devbus" compatible string,
  64. except if devbus,keep-config is used.
  65. Write parameters:
  66. - devbus,ale-wr-ps: Defines the time delay from the ALE[0] negation cycle
  67. to the DEV_WEn assertion.
  68. Mandatory.
  69. - devbus,wr-low-ps: Defines the time during which DEV_WEn is active.
  70. A[2:0] and Data are kept valid as long as DEV_WEn
  71. is active. This parameter defines the setup time of
  72. address and data to DEV_WEn rise.
  73. Mandatory.
  74. - devbus,wr-high-ps: Defines the time during which DEV_WEn is kept
  75. inactive (high) between data beats of a burst write.
  76. DEV_A[2:0] and Data are kept valid (do not toggle) for
  77. <wr-high-ps> - <tick> ps.
  78. This parameter defines the hold time of address and
  79. data after DEV_WEn rise.
  80. Mandatory.
  81. - devbus,sync-enable: Synchronous device enable.
  82. 1: True
  83. 0: False
  84. Mandatory for "marvell,mvebu-devbus" compatible string,
  85. except if devbus,keep-config is used.
  86. An example for an Armada XP GP board, with a 16 MiB NOR device as child
  87. is showed below. Note that the Device Bus driver is in charge of allocating
  88. the mbus address decoding window for each of its child devices.
  89. The window is created using the chip select specified in the child
  90. device node together with the base address and size specified in the ranges
  91. property. For instance, in the example below the allocated decoding window
  92. will start at base address 0xf0000000, with a size 0x1000000 (16 MiB)
  93. for chip select 0 (a.k.a DEV_BOOTCS).
  94. This address window handling is done in this mvebu-devbus only as a temporary
  95. solution. It will be removed when the support for mbus device tree binding is
  96. added.
  97. The reg property implicitly specifies the chip select as this:
  98. 0x10400: DEV_BOOTCS
  99. 0x10408: DEV_CS0
  100. 0x10410: DEV_CS1
  101. 0x10418: DEV_CS2
  102. 0x10420: DEV_CS3
  103. Example:
  104. devbus-bootcs@d0010400 {
  105. status = "okay";
  106. ranges = <0 0xf0000000 0x1000000>; /* @addr 0xf0000000, size 0x1000000 */
  107. #address-cells = <1>;
  108. #size-cells = <1>;
  109. /* Device Bus parameters are required */
  110. /* Read parameters */
  111. devbus,bus-width = <8>;
  112. devbus,turn-off-ps = <60000>;
  113. devbus,badr-skew-ps = <0>;
  114. devbus,acc-first-ps = <124000>;
  115. devbus,acc-next-ps = <248000>;
  116. devbus,rd-setup-ps = <0>;
  117. devbus,rd-hold-ps = <0>;
  118. /* Write parameters */
  119. devbus,sync-enable = <0>;
  120. devbus,wr-high-ps = <60000>;
  121. devbus,wr-low-ps = <60000>;
  122. devbus,ale-wr-ps = <60000>;
  123. flash@0 {
  124. compatible = "cfi-flash";
  125. /* 16 MiB */
  126. reg = <0 0x1000000>;
  127. bank-width = <2>;
  128. #address-cells = <1>;
  129. #size-cells = <1>;
  130. /*
  131. * We split the 16 MiB in two partitions,
  132. * just as an example.
  133. */
  134. partition@0 {
  135. label = "First";
  136. reg = <0 0x800000>;
  137. };
  138. partition@800000 {
  139. label = "Second";
  140. reg = <0x800000 0x800000>;
  141. };
  142. };
  143. };