spi-orion.txt 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. Marvell Orion SPI device
  2. Required properties:
  3. - compatible : should be on of the following:
  4. - "marvell,orion-spi" for the Orion, mv78x00, Kirkwood and Dove SoCs
  5. - "marvell,armada-370-spi", for the Armada 370 SoCs
  6. - "marvell,armada-375-spi", for the Armada 375 SoCs
  7. - "marvell,armada-380-spi", for the Armada 38x SoCs
  8. - "marvell,armada-390-spi", for the Armada 39x SoCs
  9. - "marvell,armada-xp-spi", for the Armada XP SoCs
  10. - reg : offset and length of the register set for the device.
  11. This property can optionally have additional entries to configure
  12. the SPI direct access mode that some of the Marvell SoCs support
  13. additionally to the normal indirect access (PIO) mode. The values
  14. for the MBus "target" and "attribute" are defined in the Marvell
  15. SoC "Functional Specifications" Manual in the chapter "Marvell
  16. Core Processor Address Decoding".
  17. The eight register sets following the control registers refer to
  18. chip-select lines 0 through 7 respectively.
  19. - cell-index : Which of multiple SPI controllers is this.
  20. - clocks : pointers to the reference clocks for this device, the first
  21. one is the one used for the clock on the spi bus, the
  22. second one is optional and is the clock used for the
  23. functional part of the controller
  24. Optional properties:
  25. - interrupts : Is currently not used.
  26. - clock-names : names of used clocks, mandatory if the second clock is
  27. used, the name must be "core", and "axi" (the latter
  28. is only for Armada 7K/8K).
  29. Example:
  30. spi@10600 {
  31. compatible = "marvell,orion-spi";
  32. #address-cells = <1>;
  33. #size-cells = <0>;
  34. cell-index = <0>;
  35. reg = <0x10600 0x28>;
  36. interrupts = <23>;
  37. };
  38. Example with SPI direct mode support (optionally):
  39. spi0: spi@10600 {
  40. compatible = "marvell,orion-spi";
  41. #address-cells = <1>;
  42. #size-cells = <0>;
  43. cell-index = <0>;
  44. reg = <MBUS_ID(0xf0, 0x01) 0x10600 0x28>, /* control */
  45. <MBUS_ID(0x01, 0x1e) 0 0xffffffff>, /* CS0 */
  46. <MBUS_ID(0x01, 0x5e) 0 0xffffffff>, /* CS1 */
  47. <MBUS_ID(0x01, 0x9e) 0 0xffffffff>, /* CS2 */
  48. <MBUS_ID(0x01, 0xde) 0 0xffffffff>, /* CS3 */
  49. <MBUS_ID(0x01, 0x1f) 0 0xffffffff>, /* CS4 */
  50. <MBUS_ID(0x01, 0x5f) 0 0xffffffff>, /* CS5 */
  51. <MBUS_ID(0x01, 0x9f) 0 0xffffffff>, /* CS6 */
  52. <MBUS_ID(0x01, 0xdf) 0 0xffffffff>; /* CS7 */
  53. interrupts = <23>;
  54. };
  55. To enable the direct mode, the board specific 'ranges' property in the
  56. 'soc' node needs to add the entries for the desired SPI controllers
  57. and its chip-selects that are used in the direct mode instead of PIO
  58. mode. Here an example for this (SPI controller 0, device 1 and SPI
  59. controller 1, device 2 are used in direct mode. All other SPI device
  60. are used in the default indirect (PIO) mode):
  61. soc {
  62. /*
  63. * Enable the SPI direct access by configuring an entry
  64. * here in the board-specific ranges property
  65. */
  66. ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000>, /* internal regs */
  67. <MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>, /* BootROM */
  68. <MBUS_ID(0x01, 0x5e) 0 0 0xf1100000 0x10000>, /* SPI0-DEV1 */
  69. <MBUS_ID(0x01, 0x9a) 0 0 0xf1110000 0x10000>; /* SPI1-DEV2 */
  70. For further information on the MBus bindings, please see the MBus
  71. DT documentation:
  72. Documentation/devicetree/bindings/bus/mvebu-mbus.txt