xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunQualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI)
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThe QUP core is an AHB slave that provides a common data path (an output FIFO
4*4882a593Smuzhiyunand an input FIFO) for serial peripheral interface (SPI) mini-core.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunSPI in master mode supports up to 50MHz, up to four chip selects, programmable
7*4882a593Smuzhiyundata path from 4 bits to 32 bits and numerous protocol variants.
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunRequired properties:
10*4882a593Smuzhiyun- compatible:     Should contain:
11*4882a593Smuzhiyun		  "qcom,spi-qup-v1.1.1" for 8660, 8960 and 8064.
12*4882a593Smuzhiyun		  "qcom,spi-qup-v2.1.1" for 8974 and later
13*4882a593Smuzhiyun		  "qcom,spi-qup-v2.2.1" for 8974 v2 and later.
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun- reg:            Should contain base register location and length
16*4882a593Smuzhiyun- interrupts:     Interrupt number used by this controller
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun- clocks:         Should contain the core clock and the AHB clock.
19*4882a593Smuzhiyun- clock-names:    Should be "core" for the core clock and "iface" for the
20*4882a593Smuzhiyun                  AHB clock.
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun- #address-cells: Number of cells required to define a chip select
23*4882a593Smuzhiyun                  address on the SPI bus. Should be set to 1.
24*4882a593Smuzhiyun- #size-cells:    Should be zero.
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunOptional properties:
27*4882a593Smuzhiyun- spi-max-frequency: Specifies maximum SPI clock frequency,
28*4882a593Smuzhiyun                     Units - Hz. Definition as per
29*4882a593Smuzhiyun                     Documentation/devicetree/bindings/spi/spi-bus.txt
30*4882a593Smuzhiyun- num-cs:	total number of chipselects
31*4882a593Smuzhiyun- cs-gpios:	should specify GPIOs used for chipselects.
32*4882a593Smuzhiyun		The gpios will be referred to as reg = <index> in the SPI child
33*4882a593Smuzhiyun		nodes.  If unspecified, a single SPI device without a chip
34*4882a593Smuzhiyun		select can be used.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun- dmas:         Two DMA channel specifiers following the convention outlined
37*4882a593Smuzhiyun                in bindings/dma/dma.txt
38*4882a593Smuzhiyun- dma-names:    Names for the dma channels, if present. There must be at
39*4882a593Smuzhiyun                least one channel named "tx" for transmit and named "rx" for
40*4882a593Smuzhiyun                receive.
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunSPI slave nodes must be children of the SPI master node and can contain
43*4882a593Smuzhiyunproperties described in Documentation/devicetree/bindings/spi/spi-bus.txt
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunExample:
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun	spi_8: spi@f9964000 { /* BLSP2 QUP2 */
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun		compatible = "qcom,spi-qup-v2";
50*4882a593Smuzhiyun		#address-cells = <1>;
51*4882a593Smuzhiyun		#size-cells = <0>;
52*4882a593Smuzhiyun		reg = <0xf9964000 0x1000>;
53*4882a593Smuzhiyun		interrupts = <0 102 0>;
54*4882a593Smuzhiyun		spi-max-frequency = <19200000>;
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun		clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>;
57*4882a593Smuzhiyun		clock-names = "core", "iface";
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun		dmas = <&blsp1_bam 13>, <&blsp1_bam 12>;
60*4882a593Smuzhiyun		dma-names = "rx", "tx";
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun		pinctrl-names = "default";
63*4882a593Smuzhiyun		pinctrl-0 = <&spi8_default>;
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun		device@0 {
66*4882a593Smuzhiyun			compatible = "arm,pl022-dummy";
67*4882a593Smuzhiyun			#address-cells = <1>;
68*4882a593Smuzhiyun			#size-cells = <1>;
69*4882a593Smuzhiyun			reg = <0>; /* Chip select 0 */
70*4882a593Smuzhiyun			spi-max-frequency = <19200000>;
71*4882a593Smuzhiyun			spi-cpol;
72*4882a593Smuzhiyun		};
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun		device@1 {
75*4882a593Smuzhiyun			compatible = "arm,pl022-dummy";
76*4882a593Smuzhiyun			#address-cells = <1>;
77*4882a593Smuzhiyun			#size-cells = <1>;
78*4882a593Smuzhiyun			reg = <1>; /* Chip select 1 */
79*4882a593Smuzhiyun			spi-max-frequency = <9600000>;
80*4882a593Smuzhiyun			spi-cpha;
81*4882a593Smuzhiyun		};
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun		device@2 {
84*4882a593Smuzhiyun			compatible = "arm,pl022-dummy";
85*4882a593Smuzhiyun			#address-cells = <1>;
86*4882a593Smuzhiyun			#size-cells = <1>;
87*4882a593Smuzhiyun			reg = <2>; /* Chip select 2 */
88*4882a593Smuzhiyun			spi-max-frequency = <19200000>;
89*4882a593Smuzhiyun			spi-cpol;
90*4882a593Smuzhiyun			spi-cpha;
91*4882a593Smuzhiyun		};
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun		device@3 {
94*4882a593Smuzhiyun			compatible = "arm,pl022-dummy";
95*4882a593Smuzhiyun			#address-cells = <1>;
96*4882a593Smuzhiyun			#size-cells = <1>;
97*4882a593Smuzhiyun			reg = <3>; /* Chip select 3 */
98*4882a593Smuzhiyun			spi-max-frequency = <19200000>;
99*4882a593Smuzhiyun			spi-cpol;
100*4882a593Smuzhiyun			spi-cpha;
101*4882a593Smuzhiyun			spi-cs-high;
102*4882a593Smuzhiyun		};
103*4882a593Smuzhiyun	};
104