spi-rockchip.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/spi/spi-rockchip.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Rockchip SPI Controller
  7. description:
  8. The Rockchip SPI controller is used to interface with various devices such
  9. as flash and display controllers using the SPI communication interface.
  10. allOf:
  11. - $ref: spi-controller.yaml#
  12. maintainers:
  13. - Heiko Stuebner <heiko@sntech.de>
  14. # Everything else is described in the common file
  15. properties:
  16. compatible:
  17. oneOf:
  18. - const: rockchip,rk3036-spi
  19. - const: rockchip,rk3066-spi
  20. - const: rockchip,rk3228-spi
  21. - const: rockchip,rv1108-spi
  22. - items:
  23. - enum:
  24. - rockchip,px30-spi
  25. - rockchip,rk3128-spi
  26. - rockchip,rk3188-spi
  27. - rockchip,rk3288-spi
  28. - rockchip,rk3308-spi
  29. - rockchip,rk3328-spi
  30. - rockchip,rk3368-spi
  31. - rockchip,rk3399-spi
  32. - rockchip,rk3506-spi
  33. - rockchip,rk3528-spi
  34. - rockchip,rk3562-spi
  35. - rockchip,rk3568-spi
  36. - rockchip,rk3576-spi
  37. - rockchip,rk3588-spi
  38. - rockchip,rv1126-spi
  39. - const: rockchip,rk3066-spi
  40. reg:
  41. maxItems: 1
  42. interrupts:
  43. maxItems: 1
  44. clocks:
  45. items:
  46. - description: transfer-clock
  47. - description: peripheral clock
  48. clock-names:
  49. items:
  50. - const: spiclk
  51. - const: apb_pclk
  52. dmas:
  53. items:
  54. - description: TX DMA Channel
  55. - description: RX DMA Channel
  56. dma-names:
  57. items:
  58. - const: tx
  59. - const: rx
  60. rx-sample-delay-ns:
  61. default: 0
  62. description:
  63. Nano seconds to delay after the SCLK edge before sampling Rx data
  64. (may need to be fine tuned for high capacitance lines).
  65. If not specified 0 will be used.
  66. pinctrl-names:
  67. minItems: 1
  68. items:
  69. - const: default
  70. - const: sleep
  71. description:
  72. Names for the pin configuration(s); may be "default" or "sleep",
  73. where the "sleep" configuration may describe the state
  74. the pins should be in during system suspend.
  75. power-domains:
  76. maxItems: 1
  77. required:
  78. - compatible
  79. - reg
  80. - interrupts
  81. - clocks
  82. - clock-names
  83. unevaluatedProperties: false
  84. examples:
  85. - |
  86. #include <dt-bindings/clock/rk3188-cru-common.h>
  87. #include <dt-bindings/interrupt-controller/arm-gic.h>
  88. #include <dt-bindings/interrupt-controller/irq.h>
  89. spi0: spi@ff110000 {
  90. compatible = "rockchip,rk3066-spi";
  91. reg = <0xff110000 0x1000>;
  92. interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
  93. clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
  94. clock-names = "spiclk", "apb_pclk";
  95. dmas = <&pdma1 11>, <&pdma1 12>;
  96. dma-names = "tx", "rx";
  97. pinctrl-0 = <&spi1_pins>;
  98. pinctrl-1 = <&spi1_sleep>;
  99. pinctrl-names = "default", "sleep";
  100. rx-sample-delay-ns = <10>;
  101. #address-cells = <1>;
  102. #size-cells = <0>;
  103. };