0066-spi-qup-Add-device-tree-bindings-information.patch 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. From a8e8c90a3cc81c6a7a44ff7fb18ceb71978c9155 Mon Sep 17 00:00:00 2001
  2. From: "Ivan T. Ivanov" <[email protected]>
  3. Date: Thu, 13 Feb 2014 18:21:23 +0200
  4. Subject: [PATCH 066/182] spi: qup: Add device tree bindings information
  5. The Qualcomm Universal Peripheral (QUP) core is an
  6. AHB slave that provides a common data path (an output
  7. FIFO and an input FIFO) for serial peripheral interface
  8. (SPI) mini-core.
  9. Signed-off-by: Ivan T. Ivanov <[email protected]>
  10. Signed-off-by: Mark Brown <[email protected]>
  11. ---
  12. .../devicetree/bindings/spi/qcom,spi-qup.txt | 85 ++++++++++++++++++++
  13. 1 file changed, 85 insertions(+)
  14. create mode 100644 Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
  15. --- /dev/null
  16. +++ b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
  17. @@ -0,0 +1,85 @@
  18. +Qualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI)
  19. +
  20. +The QUP core is an AHB slave that provides a common data path (an output FIFO
  21. +and an input FIFO) for serial peripheral interface (SPI) mini-core.
  22. +
  23. +SPI in master mode supports up to 50MHz, up to four chip selects, programmable
  24. +data path from 4 bits to 32 bits and numerous protocol variants.
  25. +
  26. +Required properties:
  27. +- compatible: Should contain "qcom,spi-qup-v2.1.1" or "qcom,spi-qup-v2.2.1"
  28. +- reg: Should contain base register location and length
  29. +- interrupts: Interrupt number used by this controller
  30. +
  31. +- clocks: Should contain the core clock and the AHB clock.
  32. +- clock-names: Should be "core" for the core clock and "iface" for the
  33. + AHB clock.
  34. +
  35. +- #address-cells: Number of cells required to define a chip select
  36. + address on the SPI bus. Should be set to 1.
  37. +- #size-cells: Should be zero.
  38. +
  39. +Optional properties:
  40. +- spi-max-frequency: Specifies maximum SPI clock frequency,
  41. + Units - Hz. Definition as per
  42. + Documentation/devicetree/bindings/spi/spi-bus.txt
  43. +
  44. +SPI slave nodes must be children of the SPI master node and can contain
  45. +properties described in Documentation/devicetree/bindings/spi/spi-bus.txt
  46. +
  47. +Example:
  48. +
  49. + spi_8: spi@f9964000 { /* BLSP2 QUP2 */
  50. +
  51. + compatible = "qcom,spi-qup-v2";
  52. + #address-cells = <1>;
  53. + #size-cells = <0>;
  54. + reg = <0xf9964000 0x1000>;
  55. + interrupts = <0 102 0>;
  56. + spi-max-frequency = <19200000>;
  57. +
  58. + clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>;
  59. + clock-names = "core", "iface";
  60. +
  61. + pinctrl-names = "default";
  62. + pinctrl-0 = <&spi8_default>;
  63. +
  64. + device@0 {
  65. + compatible = "arm,pl022-dummy";
  66. + #address-cells = <1>;
  67. + #size-cells = <1>;
  68. + reg = <0>; /* Chip select 0 */
  69. + spi-max-frequency = <19200000>;
  70. + spi-cpol;
  71. + };
  72. +
  73. + device@1 {
  74. + compatible = "arm,pl022-dummy";
  75. + #address-cells = <1>;
  76. + #size-cells = <1>;
  77. + reg = <1>; /* Chip select 1 */
  78. + spi-max-frequency = <9600000>;
  79. + spi-cpha;
  80. + };
  81. +
  82. + device@2 {
  83. + compatible = "arm,pl022-dummy";
  84. + #address-cells = <1>;
  85. + #size-cells = <1>;
  86. + reg = <2>; /* Chip select 2 */
  87. + spi-max-frequency = <19200000>;
  88. + spi-cpol;
  89. + spi-cpha;
  90. + };
  91. +
  92. + device@3 {
  93. + compatible = "arm,pl022-dummy";
  94. + #address-cells = <1>;
  95. + #size-cells = <1>;
  96. + reg = <3>; /* Chip select 3 */
  97. + spi-max-frequency = <19200000>;
  98. + spi-cpol;
  99. + spi-cpha;
  100. + spi-cs-high;
  101. + };
  102. + };