spi-samsung.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. * Samsung SPI Controller
  2. The Samsung SPI controller is used to interface with various devices such as flash
  3. and display controllers using the SPI communication interface.
  4. Required SoC Specific Properties:
  5. - compatible: should be one of the following.
  6. - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms
  7. - samsung,s3c6410-spi: for s3c6410 platforms
  8. - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms
  9. - samsung,exynos5433-spi: for exynos5433 compatible controllers
  10. - samsung,exynos7-spi: for exynos7 platforms <DEPRECATED>
  11. - reg: physical base address of the controller and length of memory mapped
  12. region.
  13. - interrupts: The interrupt number to the cpu. The interrupt specifier format
  14. depends on the interrupt controller.
  15. - dmas : Two or more DMA channel specifiers following the convention outlined
  16. in bindings/dma/dma.txt
  17. - dma-names: Names for the dma channels. There must be at least one channel
  18. named "tx" for transmit and named "rx" for receive.
  19. - clocks: specifies the clock IDs provided to the SPI controller; they are
  20. required for interacting with the controller itself, for synchronizing the bus
  21. and as I/O clock (the latter is required by exynos5433 and exynos7).
  22. - clock-names: string names of the clocks in the 'clocks' property; for all the
  23. the devices the names must be "spi", "spi_busclkN" (where N is determined by
  24. "samsung,spi-src-clk"), while Exynos5433 should specify a third clock
  25. "spi_ioclk" for the I/O clock.
  26. Required Board Specific Properties:
  27. - #address-cells: should be 1.
  28. - #size-cells: should be 0.
  29. Optional Board Specific Properties:
  30. - samsung,spi-src-clk: If the spi controller includes a internal clock mux to
  31. select the clock source for the spi bus clock, this property can be used to
  32. indicate the clock to be used for driving the spi bus clock. If not specified,
  33. the clock number 0 is used as default.
  34. - num-cs: Specifies the number of chip select lines supported. If
  35. not specified, the default number of chip select lines is set to 1.
  36. - cs-gpios: should specify GPIOs used for chipselects (see spi-bus.txt)
  37. - no-cs-readback: the CS line is disconnected, therefore the device should not
  38. operate based on CS signalling.
  39. SPI Controller specific data in SPI slave nodes:
  40. - The spi slave nodes should provide the following information which is required
  41. by the spi controller.
  42. - samsung,spi-feedback-delay: The sampling phase shift to be applied on the
  43. miso line (to account for any lag in the miso line). The following are the
  44. valid values.
  45. - 0: No phase shift.
  46. - 1: 90 degree phase shift sampling.
  47. - 2: 180 degree phase shift sampling.
  48. - 3: 270 degree phase shift sampling.
  49. Aliases:
  50. - All the SPI controller nodes should be represented in the aliases node using
  51. the following format 'spi{n}' where n is a unique number for the alias.
  52. Example:
  53. - SoC Specific Portion:
  54. spi_0: spi@12d20000 {
  55. compatible = "samsung,exynos4210-spi";
  56. reg = <0x12d20000 0x100>;
  57. interrupts = <0 66 0>;
  58. dmas = <&pdma0 5
  59. &pdma0 4>;
  60. dma-names = "tx", "rx";
  61. #address-cells = <1>;
  62. #size-cells = <0>;
  63. };
  64. - Board Specific Portion:
  65. spi_0: spi@12d20000 {
  66. #address-cells = <1>;
  67. #size-cells = <0>;
  68. pinctrl-names = "default";
  69. pinctrl-0 = <&spi0_bus>;
  70. cs-gpios = <&gpa2 5 0>;
  71. w25q80bw@0 {
  72. #address-cells = <1>;
  73. #size-cells = <1>;
  74. compatible = "w25x80";
  75. reg = <0>;
  76. spi-max-frequency = <10000>;
  77. controller-data {
  78. samsung,spi-feedback-delay = <0>;
  79. };
  80. partition@0 {
  81. label = "U-Boot";
  82. reg = <0x0 0x40000>;
  83. read-only;
  84. };
  85. partition@40000 {
  86. label = "Kernel";
  87. reg = <0x40000 0xc0000>;
  88. };
  89. };
  90. };