Merge tag 'ux500-core-for-v3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / Documentation / devicetree / bindings / spi / spi-samsung.txt
1 * Samsung SPI Controller
2
3 The Samsung SPI controller is used to interface with various devices such as flash
4 and display controllers using the SPI communication interface.
5
6 Required SoC Specific Properties:
7
8 - compatible: should be one of the following.
9     - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms
10     - samsung,s3c6410-spi: for s3c6410 platforms
11     - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms
12     - samsung,exynos4210-spi: for exynos4 and exynos5 platforms
13
14 - reg: physical base address of the controller and length of memory mapped
15   region.
16
17 - interrupts: The interrupt number to the cpu. The interrupt specifier format
18   depends on the interrupt controller.
19
20 [PRELIMINARY: the dma channel allocation will change once there are
21 official DMA bindings]
22
23 - tx-dma-channel: The dma channel specifier for tx operations. The format of
24   the dma specifier depends on the dma controller.
25
26 - rx-dma-channel: The dma channel specifier for rx operations. The format of
27   the dma specifier depends on the dma controller.
28
29 Required Board Specific Properties:
30
31 - #address-cells: should be 1.
32 - #size-cells: should be 0.
33
34 Optional Board Specific Properties:
35
36 - samsung,spi-src-clk: If the spi controller includes a internal clock mux to
37   select the clock source for the spi bus clock, this property can be used to
38   indicate the clock to be used for driving the spi bus clock. If not specified,
39   the clock number 0 is used as default.
40
41 - num-cs: Specifies the number of chip select lines supported. If
42   not specified, the default number of chip select lines is set to 1.
43
44 SPI Controller specific data in SPI slave nodes:
45
46 - The spi slave nodes should provide the following information which is required
47   by the spi controller.
48
49   - cs-gpio: A gpio specifier that specifies the gpio line used as
50     the slave select line by the spi controller. The format of the gpio
51     specifier depends on the gpio controller.
52
53   - samsung,spi-feedback-delay: The sampling phase shift to be applied on the
54     miso line (to account for any lag in the miso line). The following are the
55     valid values.
56
57       - 0: No phase shift.
58       - 1: 90 degree phase shift sampling.
59       - 2: 180 degree phase shift sampling.
60       - 3: 270 degree phase shift sampling.
61
62 Aliases:
63
64 - All the SPI controller nodes should be represented in the aliases node using
65   the following format 'spi{n}' where n is a unique number for the alias.
66
67
68 Example:
69
70 - SoC Specific Portion:
71
72         spi_0: spi@12d20000 {
73                 compatible = "samsung,exynos4210-spi";
74                 reg = <0x12d20000 0x100>;
75                 interrupts = <0 66 0>;
76                 tx-dma-channel = <&pdma0 5>;
77                 rx-dma-channel = <&pdma0 4>;
78         };
79
80 - Board Specific Portion:
81
82         spi_0: spi@12d20000 {
83                 #address-cells = <1>;
84                 #size-cells = <0>;
85                 pinctrl-names = "default";
86                 pinctrl-0 = <&spi0_bus>;
87
88                 w25q80bw@0 {
89                         #address-cells = <1>;
90                         #size-cells = <1>;
91                         compatible = "w25x80";
92                         reg = <0>;
93                         spi-max-frequency = <10000>;
94
95                         controller-data {
96                                 cs-gpio = <&gpa2 5 1 0 3>;
97                                 samsung,spi-feedback-delay = <0>;
98                         };
99
100                         partition@0 {
101                                 label = "U-Boot";
102                                 reg = <0x0 0x40000>;
103                                 read-only;
104                         };
105
106                         partition@40000 {
107                                 label = "Kernel";
108                                 reg = <0x40000 0xc0000>;
109                         };
110                 };
111         };