qcom,spi-qup.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. Qualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI)
  2. The QUP core is an AHB slave that provides a common data path (an output FIFO
  3. and an input FIFO) for serial peripheral interface (SPI) mini-core.
  4. SPI in master mode supports up to 50MHz, up to four chip selects, programmable
  5. data path from 4 bits to 32 bits and numerous protocol variants.
  6. Required properties:
  7. - compatible: Should contain:
  8. "qcom,spi-qup-v1.1.1" for 8660, 8960 and 8064.
  9. "qcom,spi-qup-v2.1.1" for 8974 and later
  10. "qcom,spi-qup-v2.2.1" for 8974 v2 and later.
  11. - reg: Should contain base register location and length
  12. - interrupts: Interrupt number used by this controller
  13. - clocks: Should contain the core clock and the AHB clock.
  14. - clock-names: Should be "core" for the core clock and "iface" for the
  15. AHB clock.
  16. - #address-cells: Number of cells required to define a chip select
  17. address on the SPI bus. Should be set to 1.
  18. - #size-cells: Should be zero.
  19. Optional properties:
  20. - spi-max-frequency: Specifies maximum SPI clock frequency,
  21. Units - Hz. Definition as per
  22. Documentation/devicetree/bindings/spi/spi-bus.txt
  23. - num-cs: total number of chipselects
  24. - cs-gpios: should specify GPIOs used for chipselects.
  25. The gpios will be referred to as reg = <index> in the SPI child
  26. nodes. If unspecified, a single SPI device without a chip
  27. select can be used.
  28. - dmas: Two DMA channel specifiers following the convention outlined
  29. in bindings/dma/dma.txt
  30. - dma-names: Names for the dma channels, if present. There must be at
  31. least one channel named "tx" for transmit and named "rx" for
  32. receive.
  33. SPI slave nodes must be children of the SPI master node and can contain
  34. properties described in Documentation/devicetree/bindings/spi/spi-bus.txt
  35. Example:
  36. spi_8: spi@f9964000 { /* BLSP2 QUP2 */
  37. compatible = "qcom,spi-qup-v2";
  38. #address-cells = <1>;
  39. #size-cells = <0>;
  40. reg = <0xf9964000 0x1000>;
  41. interrupts = <0 102 0>;
  42. spi-max-frequency = <19200000>;
  43. clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>;
  44. clock-names = "core", "iface";
  45. dmas = <&blsp1_bam 13>, <&blsp1_bam 12>;
  46. dma-names = "rx", "tx";
  47. pinctrl-names = "default";
  48. pinctrl-0 = <&spi8_default>;
  49. device@0 {
  50. compatible = "arm,pl022-dummy";
  51. #address-cells = <1>;
  52. #size-cells = <1>;
  53. reg = <0>; /* Chip select 0 */
  54. spi-max-frequency = <19200000>;
  55. spi-cpol;
  56. };
  57. device@1 {
  58. compatible = "arm,pl022-dummy";
  59. #address-cells = <1>;
  60. #size-cells = <1>;
  61. reg = <1>; /* Chip select 1 */
  62. spi-max-frequency = <9600000>;
  63. spi-cpha;
  64. };
  65. device@2 {
  66. compatible = "arm,pl022-dummy";
  67. #address-cells = <1>;
  68. #size-cells = <1>;
  69. reg = <2>; /* Chip select 2 */
  70. spi-max-frequency = <19200000>;
  71. spi-cpol;
  72. spi-cpha;
  73. };
  74. device@3 {
  75. compatible = "arm,pl022-dummy";
  76. #address-cells = <1>;
  77. #size-cells = <1>;
  78. reg = <3>; /* Chip select 3 */
  79. spi-max-frequency = <19200000>;
  80. spi-cpol;
  81. spi-cpha;
  82. spi-cs-high;
  83. };
  84. };