xref: /freebsd/sys/contrib/device-tree/Bindings/spi/nvidia,tegra114-spi.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotNVIDIA Tegra114 SPI controller.
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible : For Tegra114, must contain "nvidia,tegra114-spi".
5*c66ec88fSEmmanuel Vadot  Otherwise, must contain '"nvidia,<chip>-spi", "nvidia,tegra114-spi"' where
6*c66ec88fSEmmanuel Vadot  <chip> is tegra124, tegra132, or tegra210.
7*c66ec88fSEmmanuel Vadot- reg: Should contain SPI registers location and length.
8*c66ec88fSEmmanuel Vadot- interrupts: Should contain SPI interrupts.
9*c66ec88fSEmmanuel Vadot- clock-names : Must include the following entries:
10*c66ec88fSEmmanuel Vadot  - spi
11*c66ec88fSEmmanuel Vadot- resets : Must contain an entry for each entry in reset-names.
12*c66ec88fSEmmanuel Vadot  See ../reset/reset.txt for details.
13*c66ec88fSEmmanuel Vadot- reset-names : Must include the following entries:
14*c66ec88fSEmmanuel Vadot  - spi
15*c66ec88fSEmmanuel Vadot- dmas : Must contain an entry for each entry in clock-names.
16*c66ec88fSEmmanuel Vadot  See ../dma/dma.txt for details.
17*c66ec88fSEmmanuel Vadot- dma-names : Must include the following entries:
18*c66ec88fSEmmanuel Vadot  - rx
19*c66ec88fSEmmanuel Vadot  - tx
20*c66ec88fSEmmanuel Vadot- clocks : Must contain an entry for each entry in clock-names.
21*c66ec88fSEmmanuel Vadot  See ../clocks/clock-bindings.txt for details.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel VadotRecommended properties:
24*c66ec88fSEmmanuel Vadot- spi-max-frequency: Definition as per
25*c66ec88fSEmmanuel Vadot                     Documentation/devicetree/bindings/spi/spi-bus.txt
26*c66ec88fSEmmanuel VadotOptional properties:
27*c66ec88fSEmmanuel Vadot- nvidia,tx-clk-tap-delay: Delays the clock going out to the external device
28*c66ec88fSEmmanuel Vadot  with this tap value. This property is used to tune the outgoing data from
29*c66ec88fSEmmanuel Vadot  Tegra SPI master with respect to outgoing Tegra SPI master clock.
30*c66ec88fSEmmanuel Vadot  Tap values vary based on the platform design trace lengths from Tegra SPI
31*c66ec88fSEmmanuel Vadot  to corresponding slave devices. Valid tap values are from 0 thru 63.
32*c66ec88fSEmmanuel Vadot- nvidia,rx-clk-tap-delay: Delays the clock coming in from the external device
33*c66ec88fSEmmanuel Vadot  with this tap value. This property is used to adjust the Tegra SPI master
34*c66ec88fSEmmanuel Vadot  clock with respect to the data from the SPI slave device.
35*c66ec88fSEmmanuel Vadot  Tap values vary based on the platform design trace lengths from Tegra SPI
36*c66ec88fSEmmanuel Vadot  to corresponding slave devices. Valid tap values are from 0 thru 63.
37*c66ec88fSEmmanuel Vadot
38*c66ec88fSEmmanuel VadotExample:
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel Vadotspi@7000d600 {
41*c66ec88fSEmmanuel Vadot	compatible = "nvidia,tegra114-spi";
42*c66ec88fSEmmanuel Vadot	reg = <0x7000d600 0x200>;
43*c66ec88fSEmmanuel Vadot	interrupts = <0 82 0x04>;
44*c66ec88fSEmmanuel Vadot	spi-max-frequency = <25000000>;
45*c66ec88fSEmmanuel Vadot	#address-cells = <1>;
46*c66ec88fSEmmanuel Vadot	#size-cells = <0>;
47*c66ec88fSEmmanuel Vadot	clocks = <&tegra_car 44>;
48*c66ec88fSEmmanuel Vadot	clock-names = "spi";
49*c66ec88fSEmmanuel Vadot	resets = <&tegra_car 44>;
50*c66ec88fSEmmanuel Vadot	reset-names = "spi";
51*c66ec88fSEmmanuel Vadot	dmas = <&apbdma 16>, <&apbdma 16>;
52*c66ec88fSEmmanuel Vadot	dma-names = "rx", "tx";
53*c66ec88fSEmmanuel Vadot	<spi-client>@<bus_num> {
54*c66ec88fSEmmanuel Vadot		...
55*c66ec88fSEmmanuel Vadot		...
56*c66ec88fSEmmanuel Vadot		nvidia,rx-clk-tap-delay = <0>;
57*c66ec88fSEmmanuel Vadot		nvidia,tx-clk-tap-delay = <16>;
58*c66ec88fSEmmanuel Vadot		...
59*c66ec88fSEmmanuel Vadot	};
60*c66ec88fSEmmanuel Vadot
61*c66ec88fSEmmanuel Vadot};
62