spi_qsd.txt 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. Qualcomm Serial Peripheral Interface (SPI)
  2. Required properties:
  3. - compatible : Should be "qcom,spi-qup-v2".
  4. - reg : Offset and length of the register regions for the device
  5. - reg-names : Register region names referenced in reg above.
  6. Required register resource entries are:
  7. "spi_physical" : Physical address of controller register blocks.
  8. - interrupts : Interrupt numbers used by this controller
  9. - interrupt-names : Interrupt resource names referenced in interrupts above.
  10. Required interrupt resource entries are:
  11. "spi_irq" : QUP-core interrupt.
  12. - spi-max-frequency : Specifies maximum SPI clock frequency, Units - Hz.
  13. Required alias:
  14. - The desired bus-number is specified via an alias with the following format
  15. 'spi{n}' where n is the bus number.
  16. Optional properties:
  17. - qcom,gpio-mosi : GPIO pin number of the MOSI bus line.
  18. - qcom,gpio-miso : GPIO pin number of the MISO bus line.
  19. - qcom,gpio-clk : GPIO pin number of the CLK bus line.
  20. - qcom,gpio-cs0 : GPIO pin number of the chipselect0 bus line.
  21. - qcom,gpio-cs1 : GPIO pin number of the chipselect1 bus line.
  22. - qcom,gpio-cs2 : GPIO pin number of the chipselect2 bus line.
  23. - qcom,gpio-cs3 : GPIO pin number of the chipselect3 bus line.
  24. - qcom,infinite-mode: When missing or set to zero, QUP uses infinite-mode. When
  25. value is non-zero, the value is the number of words in maximum transfer
  26. length.
  27. - qcom,active-only : Vote for core clock when the application processor goes
  28. to active state and remove that vote when it goes to idle state. This flag may
  29. improve service time of first spi request at the expense of power consumption.
  30. When this entry is not present, voting is done by the runtime-pm callbacks.
  31. - qcom,master-id : Master endpoint number used for voting on clocks using the
  32. bus-scaling driver.
  33. - qcom,rt-priority : whether spi message queue is set to run as a realtime task.
  34. With this spi transaction message pump with high (realtime) priority to reduce
  35. the transfer latency on the bus by minimising the delay between a transfer request
  36. - qcom,shared : whether this qup is shared with other ee's
  37. Optional properties which are required for support of BAM-mode:
  38. - qcom,ver-reg-exists : Boolean. When present, allows driver to verify if HW
  39. version support latest features (e.g. BAM) and then enable them. Should be
  40. removed for legacy HW.
  41. - qcom,use-bam : Boolean. When present, enables BAM-mode.
  42. - qcom,use-pinctrl : Boolean. When present, enables pinctrl frame work to configure GPIO's
  43. instead of existing gpio mux hence gpio entries are no more required if present.
  44. - pinctrl-names : Property must contain "spi_default" and "spi_sleep" if
  45. pinctrl is to be used.
  46. instead of existing gpio mux hence gpio entries are no more required if present.
  47. - qcom,bam-consumer-pipe-index : BAM consumer-pipe index.
  48. - qcom,bam-producer-pipe-index : BAM producer-pipe index.
  49. - reg-names : register region names referenced in reg.
  50. Required register resource for BAM are:
  51. "spi_bam_physical" : Physical address of BAM for this controller.
  52. - interrupt-names : interrupt resource names referenced in interrupts.
  53. Required interrupt resource from BAM are:
  54. "spi_bam_irq" : BAM interrupt used by the controller.
  55. Optional SPI slave nodes must be children of the SPI master node and contain
  56. the following properties.
  57. - reg: (required) chip-select address of the device.
  58. - compatible : (required) Name of SPI device following generic names.
  59. - spi-max-frequency : (required) Maximum SPI clocking speed of device in Hz
  60. - interrupts : (recommended) Should contain the SPI slave interrupt number
  61. encoded depending on the type of the interrupt controller.
  62. - interrupt-parent : (recommended) The phandle for the interrupt controller
  63. that services interrupts for this device.
  64. - spi-cpol : (optional) Empty property indicating device requires inverse
  65. clock polarity (CPOL) mode
  66. - spi-cpha : (optional) Empty property indicating device requires shifted
  67. clock phase (CPHA) mode
  68. - spi-cs-high : (optional) Empty property indicating device requires
  69. chip select active high
  70. Example:
  71. aliases {
  72. spi0 = &spi_0;
  73. };
  74. spi_0: spi@f9923000 {
  75. compatible = "qcom,spi-qup-v2";
  76. reg-names = "spi_physical", "spi_bam_physical";
  77. reg = <0xf9923000 0x1000>,
  78. <0xf9904000 0x10000>;
  79. interrupt-names = "spi_irq", "spi_bam_irq";
  80. interrupts = <0 95 0>, <0 238 0>;
  81. spi-max-frequency = <19200000>;
  82. #address-cells = <1>;
  83. #size-cells = <0>;
  84. qcom,gpio-mosi = <&msmgpio 0 0>;
  85. qcom,gpio-miso = <&msmgpio 1 0>;
  86. qcom,gpio-clk = <&msmgpio 3 0>;
  87. qcom,gpio-cs2 = <&msmgpio 9 0>;
  88. qcom,infinite-mode = <0>;
  89. qcom,use-bam;
  90. qcom,use-pinctrl;
  91. qcom,bam-consumer-pipe-index = <12>;
  92. qcom,bam-producer-pipe-index = <13>;
  93. qcom,ver-reg-exists;
  94. qcom,master-id = <86>;
  95. qcom,rt-priority;
  96. };