mvebu-devbus.txt 5.7 KB

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