spi_pl022.txt 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ARM PL022 SPI controller
  2. Required properties:
  3. - compatible : "arm,pl022", "arm,primecell"
  4. - reg : Offset and length of the register set for the device
  5. - interrupts : Should contain SPI controller interrupt
  6. - num-cs : total number of chipselects
  7. Optional properties:
  8. - cs-gpios : should specify GPIOs used for chipselects.
  9. The gpios will be referred to as reg = <index> in the SPI child nodes.
  10. If unspecified, a single SPI device without a chip select can be used.
  11. - pl022,autosuspend-delay : delay in ms following transfer completion before
  12. the runtime power management system suspends the
  13. device. A setting of 0 indicates no delay and the
  14. device will be suspended immediately
  15. - pl022,rt : indicates the controller should run the message pump with realtime
  16. priority to minimise the transfer latency on the bus (boolean)
  17. - dmas : Two or more DMA channel specifiers following the convention outlined
  18. in bindings/dma/dma.txt
  19. - dma-names: Names for the dma channels, if present. There must be at
  20. least one channel named "tx" for transmit and named "rx" for
  21. receive.
  22. SPI slave nodes must be children of the SPI master node and can
  23. contain the following properties.
  24. - pl022,interface : interface type:
  25. 0: SPI
  26. 1: Texas Instruments Synchronous Serial Frame Format
  27. 2: Microwire (Half Duplex)
  28. - pl022,com-mode : polling, interrupt or dma
  29. - pl022,rx-level-trig : Rx FIFO watermark level
  30. - pl022,tx-level-trig : Tx FIFO watermark level
  31. - pl022,ctrl-len : Microwire interface: Control length
  32. - pl022,wait-state : Microwire interface: Wait state
  33. - pl022,duplex : Microwire interface: Full/Half duplex
  34. Example:
  35. spi@e0100000 {
  36. compatible = "arm,pl022", "arm,primecell";
  37. reg = <0xe0100000 0x1000>;
  38. #address-cells = <1>;
  39. #size-cells = <0>;
  40. interrupts = <0 31 0x4>;
  41. dmas = <&dma-controller 23 1>,
  42. <&dma-controller 24 0>;
  43. dma-names = "rx", "tx";
  44. m25p80@1 {
  45. compatible = "st,m25p80";
  46. reg = <1>;
  47. spi-max-frequency = <12000000>;
  48. spi-cpol;
  49. spi-cpha;
  50. pl022,hierarchy = <0>;
  51. pl022,interface = <0>;
  52. pl022,slave-tx-disable;
  53. pl022,com-mode = <0x2>;
  54. pl022,rx-level-trig = <0>;
  55. pl022,tx-level-trig = <0>;
  56. pl022,ctrl-len = <0x11>;
  57. pl022,wait-state = <0>;
  58. pl022,duplex = <0>;
  59. };
  60. };