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