kernel: update 3.14 to 3.14.18
[openwrt/staging/luka.git] / target / linux / ipq806x / patches / 0066-spi-qup-Add-device-tree-bindings-information.patch
1 From a8e8c90a3cc81c6a7a44ff7fb18ceb71978c9155 Mon Sep 17 00:00:00 2001
2 From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
3 Date: Thu, 13 Feb 2014 18:21:23 +0200
4 Subject: [PATCH 066/182] spi: qup: Add device tree bindings information
5
6 The Qualcomm Universal Peripheral (QUP) core is an
7 AHB slave that provides a common data path (an output
8 FIFO and an input FIFO) for serial peripheral interface
9 (SPI) mini-core.
10
11 Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
12 Signed-off-by: Mark Brown <broonie@linaro.org>
13 ---
14 .../devicetree/bindings/spi/qcom,spi-qup.txt | 85 ++++++++++++++++++++
15 1 file changed, 85 insertions(+)
16 create mode 100644 Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
17
18 --- /dev/null
19 +++ b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
20 @@ -0,0 +1,85 @@
21 +Qualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI)
22 +
23 +The QUP core is an AHB slave that provides a common data path (an output FIFO
24 +and an input FIFO) for serial peripheral interface (SPI) mini-core.
25 +
26 +SPI in master mode supports up to 50MHz, up to four chip selects, programmable
27 +data path from 4 bits to 32 bits and numerous protocol variants.
28 +
29 +Required properties:
30 +- compatible: Should contain "qcom,spi-qup-v2.1.1" or "qcom,spi-qup-v2.2.1"
31 +- reg: Should contain base register location and length
32 +- interrupts: Interrupt number used by this controller
33 +
34 +- clocks: Should contain the core clock and the AHB clock.
35 +- clock-names: Should be "core" for the core clock and "iface" for the
36 + AHB clock.
37 +
38 +- #address-cells: Number of cells required to define a chip select
39 + address on the SPI bus. Should be set to 1.
40 +- #size-cells: Should be zero.
41 +
42 +Optional properties:
43 +- spi-max-frequency: Specifies maximum SPI clock frequency,
44 + Units - Hz. Definition as per
45 + Documentation/devicetree/bindings/spi/spi-bus.txt
46 +
47 +SPI slave nodes must be children of the SPI master node and can contain
48 +properties described in Documentation/devicetree/bindings/spi/spi-bus.txt
49 +
50 +Example:
51 +
52 + spi_8: spi@f9964000 { /* BLSP2 QUP2 */
53 +
54 + compatible = "qcom,spi-qup-v2";
55 + #address-cells = <1>;
56 + #size-cells = <0>;
57 + reg = <0xf9964000 0x1000>;
58 + interrupts = <0 102 0>;
59 + spi-max-frequency = <19200000>;
60 +
61 + clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>;
62 + clock-names = "core", "iface";
63 +
64 + pinctrl-names = "default";
65 + pinctrl-0 = <&spi8_default>;
66 +
67 + device@0 {
68 + compatible = "arm,pl022-dummy";
69 + #address-cells = <1>;
70 + #size-cells = <1>;
71 + reg = <0>; /* Chip select 0 */
72 + spi-max-frequency = <19200000>;
73 + spi-cpol;
74 + };
75 +
76 + device@1 {
77 + compatible = "arm,pl022-dummy";
78 + #address-cells = <1>;
79 + #size-cells = <1>;
80 + reg = <1>; /* Chip select 1 */
81 + spi-max-frequency = <9600000>;
82 + spi-cpha;
83 + };
84 +
85 + device@2 {
86 + compatible = "arm,pl022-dummy";
87 + #address-cells = <1>;
88 + #size-cells = <1>;
89 + reg = <2>; /* Chip select 2 */
90 + spi-max-frequency = <19200000>;
91 + spi-cpol;
92 + spi-cpha;
93 + };
94 +
95 + device@3 {
96 + compatible = "arm,pl022-dummy";
97 + #address-cells = <1>;
98 + #size-cells = <1>;
99 + reg = <3>; /* Chip select 3 */
100 + spi-max-frequency = <19200000>;
101 + spi-cpol;
102 + spi-cpha;
103 + spi-cs-high;
104 + };
105 + };