spi-pl022.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/spi/spi-pl022.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: ARM PL022 SPI controller
  7. maintainers:
  8. - Linus Walleij <linusw@kernel.org>
  9. allOf:
  10. - $ref: spi-controller.yaml#
  11. - $ref: /schemas/arm/primecell.yaml#
  12. # We need a select here so we don't match all nodes with 'arm,primecell'
  13. select:
  14. properties:
  15. compatible:
  16. contains:
  17. const: arm,pl022
  18. required:
  19. - compatible
  20. properties:
  21. compatible:
  22. items:
  23. - const: arm,pl022
  24. - const: arm,primecell
  25. reg:
  26. maxItems: 1
  27. interrupts:
  28. maxItems: 1
  29. clocks:
  30. maxItems: 2
  31. clock-names:
  32. items:
  33. - const: sspclk
  34. - const: apb_pclk
  35. pl022,autosuspend-delay:
  36. description: delay in ms following transfer completion before the
  37. runtime power management system suspends the device. A setting of 0
  38. indicates no delay and the device will be suspended immediately.
  39. $ref: /schemas/types.yaml#/definitions/uint32
  40. pl022,rt:
  41. description: indicates the controller should run the message pump with realtime
  42. priority to minimise the transfer latency on the bus (boolean)
  43. type: boolean
  44. dmas:
  45. description:
  46. Two or more DMA channel specifiers following the convention outlined
  47. in bindings/dma/dma.txt
  48. minItems: 2
  49. maxItems: 32
  50. dma-names:
  51. description:
  52. There must be at least one channel named "tx" for transmit and named "rx"
  53. for receive.
  54. minItems: 2
  55. maxItems: 32
  56. additionalItems: true
  57. items:
  58. - const: rx
  59. - const: tx
  60. resets:
  61. maxItems: 1
  62. required:
  63. - compatible
  64. - reg
  65. - interrupts
  66. unevaluatedProperties: false
  67. examples:
  68. - |
  69. spi@e0100000 {
  70. compatible = "arm,pl022", "arm,primecell";
  71. reg = <0xe0100000 0x1000>;
  72. #address-cells = <1>;
  73. #size-cells = <0>;
  74. interrupts = <0 31 0x4>;
  75. dmas = <&dma_controller 23 1>,
  76. <&dma_controller 24 0>;
  77. dma-names = "rx", "tx";
  78. flash@1 {
  79. compatible = "st,m25p80";
  80. reg = <1>;
  81. spi-max-frequency = <12000000>;
  82. spi-cpol;
  83. spi-cpha;
  84. pl022,interface = <0>;
  85. pl022,com-mode = <0x2>;
  86. pl022,rx-level-trig = <0>;
  87. pl022,tx-level-trig = <0>;
  88. pl022,ctrl-len = <0x11>;
  89. pl022,wait-state = <0>;
  90. pl022,duplex = <0>;
  91. };
  92. };
  93. ...