spi-davinci.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. Davinci SPI controller device bindings
  2. Links on DM:
  3. Keystone 2 - http://www.ti.com/lit/ug/sprugp2a/sprugp2a.pdf
  4. dm644x - http://www.ti.com/lit/ug/sprue32a/sprue32a.pdf
  5. OMAP-L138/da830 - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf
  6. Required properties:
  7. - #address-cells: number of cells required to define a chip select
  8. address on the SPI bus. Should be set to 1.
  9. - #size-cells: should be zero.
  10. - compatible:
  11. - "ti,dm6441-spi" for SPI used similar to that on DM644x SoC family
  12. - "ti,da830-spi" for SPI used similar to that on DA8xx SoC family
  13. - "ti,keystone-spi" for SPI used similar to that on Keystone2 SoC
  14. family
  15. - reg: Offset and length of SPI controller register space
  16. - num-cs: Number of chip selects. This includes internal as well as
  17. GPIO chip selects.
  18. - ti,davinci-spi-intr-line: interrupt line used to connect the SPI
  19. IP to the interrupt controller within the SoC. Possible values
  20. are 0 and 1. Manual says one of the two possible interrupt
  21. lines can be tied to the interrupt controller. Set this
  22. based on a specific SoC configuration.
  23. - interrupts: interrupt number mapped to CPU.
  24. - clocks: spi clk phandle
  25. For 66AK2G this property should be set per binding,
  26. Documentation/devicetree/bindings/clock/ti,sci-clk.txt
  27. SoC-specific Required Properties:
  28. The following are mandatory properties for Keystone 2 66AK2G SoCs only:
  29. - power-domains: Should contain a phandle to a PM domain provider node
  30. and an args specifier containing the SPI device id
  31. value. This property is as per the binding,
  32. Optional:
  33. - cs-gpios: gpio chip selects
  34. For example to have 3 internal CS and 2 GPIO CS, user could define
  35. cs-gpios = <0>, <0>, <0>, <&gpio1 30 0>, <&gpio1 31 0>;
  36. where first three are internal CS and last two are GPIO CS.
  37. Optional properties for slave devices:
  38. SPI slave nodes can contain the following properties.
  39. Not all SPI Peripherals from Texas Instruments support this.
  40. Please check SPI peripheral documentation for a device before using these.
  41. - ti,spi-wdelay : delay between transmission of words
  42. (SPIFMTn.WDELAY, SPIDAT1.WDEL) must be specified in number of SPI module
  43. clock periods.
  44. delay = WDELAY * SPI_module_clock_period + 2 * SPI_module_clock_period
  45. Below is timing diagram which shows functional meaning of
  46. "ti,spi-wdelay" parameter.
  47. +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
  48. SPI_CLK | | | | | | | | | | | | | | | |
  49. +----------+ +-+ +-+ +-+ +-+ +---------------------------+ +-+ +-+ +-
  50. SPI_SOMI/SIMO+-----------------+ +-----------
  51. +----------+ word1 +---------------------------+word2
  52. +-----------------+ +-----------
  53. WDELAY
  54. <-------------------------->
  55. Example of a NOR flash slave device (n25q032) connected to DaVinci
  56. SPI controller device over the SPI bus.
  57. spi0:spi@20bf0000 {
  58. #address-cells = <1>;
  59. #size-cells = <0>;
  60. compatible = "ti,dm6446-spi";
  61. reg = <0x20BF0000 0x1000>;
  62. num-cs = <4>;
  63. ti,davinci-spi-intr-line = <0>;
  64. interrupts = <338>;
  65. clocks = <&clkspi>;
  66. flash: n25q032@0 {
  67. #address-cells = <1>;
  68. #size-cells = <1>;
  69. compatible = "st,m25p32";
  70. spi-max-frequency = <25000000>;
  71. reg = <0>;
  72. ti,spi-wdelay = <8>;
  73. partition@0 {
  74. label = "u-boot-spl";
  75. reg = <0x0 0x80000>;
  76. read-only;
  77. };
  78. partition@1 {
  79. label = "test";
  80. reg = <0x80000 0x380000>;
  81. };
  82. };
  83. };