spi-davinci.txt 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. - reg: Offset and length of SPI controller register space
  14. - num-cs: Number of chip selects. This includes internal as well as
  15. GPIO chip selects.
  16. - ti,davinci-spi-intr-line: interrupt line used to connect the SPI
  17. IP to the interrupt controller within the SoC. Possible values
  18. are 0 and 1. Manual says one of the two possible interrupt
  19. lines can be tied to the interrupt controller. Set this
  20. based on a specifc SoC configuration.
  21. - interrupts: interrupt number mapped to CPU.
  22. - clocks: spi clk phandle
  23. Optional:
  24. - cs-gpios: gpio chip selects
  25. For example to have 3 internal CS and 2 GPIO CS, user could define
  26. cs-gpios = <0>, <0>, <0>, <&gpio1 30 0>, <&gpio1 31 0>;
  27. where first three are internal CS and last two are GPIO CS.
  28. Optional properties for slave devices:
  29. SPI slave nodes can contain the following properties.
  30. Not all SPI Peripherals from Texas Instruments support this.
  31. Please check SPI peripheral documentation for a device before using these.
  32. - ti,spi-wdelay : delay between transmission of words
  33. (SPIFMTn.WDELAY, SPIDAT1.WDEL) must be specified in number of SPI module
  34. clock periods.
  35. delay = WDELAY * SPI_module_clock_period + 2 * SPI_module_clock_period
  36. Below is timing diagram which shows functional meaning of
  37. "ti,spi-wdelay" parameter.
  38. +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
  39. SPI_CLK | | | | | | | | | | | | | | | |
  40. +----------+ +-+ +-+ +-+ +-+ +---------------------------+ +-+ +-+ +-
  41. SPI_SOMI/SIMO+-----------------+ +-----------
  42. +----------+ word1 +---------------------------+word2
  43. +-----------------+ +-----------
  44. WDELAY
  45. <-------------------------->
  46. Example of a NOR flash slave device (n25q032) connected to DaVinci
  47. SPI controller device over the SPI bus.
  48. spi0:spi@20BF0000 {
  49. #address-cells = <1>;
  50. #size-cells = <0>;
  51. compatible = "ti,dm6446-spi";
  52. reg = <0x20BF0000 0x1000>;
  53. num-cs = <4>;
  54. ti,davinci-spi-intr-line = <0>;
  55. interrupts = <338>;
  56. clocks = <&clkspi>;
  57. flash: n25q032@0 {
  58. #address-cells = <1>;
  59. #size-cells = <1>;
  60. compatible = "st,m25p32";
  61. spi-max-frequency = <25000000>;
  62. reg = <0>;
  63. ti,spi-wdelay = <8>;
  64. partition@0 {
  65. label = "u-boot-spl";
  66. reg = <0x0 0x80000>;
  67. read-only;
  68. };
  69. partition@1 {
  70. label = "test";
  71. reg = <0x80000 0x380000>;
  72. };
  73. };
  74. };