qcom,spi-qup.txt 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. SPI slave nodes must be children of the SPI master node and can contain
  29. properties described in Documentation/devicetree/bindings/spi/spi-bus.txt
  30. Example:
  31. spi_8: spi@f9964000 { /* BLSP2 QUP2 */
  32. compatible = "qcom,spi-qup-v2";
  33. #address-cells = <1>;
  34. #size-cells = <0>;
  35. reg = <0xf9964000 0x1000>;
  36. interrupts = <0 102 0>;
  37. spi-max-frequency = <19200000>;
  38. clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>;
  39. clock-names = "core", "iface";
  40. pinctrl-names = "default";
  41. pinctrl-0 = <&spi8_default>;
  42. device@0 {
  43. compatible = "arm,pl022-dummy";
  44. #address-cells = <1>;
  45. #size-cells = <1>;
  46. reg = <0>; /* Chip select 0 */
  47. spi-max-frequency = <19200000>;
  48. spi-cpol;
  49. };
  50. device@1 {
  51. compatible = "arm,pl022-dummy";
  52. #address-cells = <1>;
  53. #size-cells = <1>;
  54. reg = <1>; /* Chip select 1 */
  55. spi-max-frequency = <9600000>;
  56. spi-cpha;
  57. };
  58. device@2 {
  59. compatible = "arm,pl022-dummy";
  60. #address-cells = <1>;
  61. #size-cells = <1>;
  62. reg = <2>; /* Chip select 2 */
  63. spi-max-frequency = <19200000>;
  64. spi-cpol;
  65. spi-cpha;
  66. };
  67. device@3 {
  68. compatible = "arm,pl022-dummy";
  69. #address-cells = <1>;
  70. #size-cells = <1>;
  71. reg = <3>; /* Chip select 3 */
  72. spi-max-frequency = <19200000>;
  73. spi-cpol;
  74. spi-cpha;
  75. spi-cs-high;
  76. };
  77. };