xref: /freebsd/sys/contrib/device-tree/Bindings/mtd/cadence-quadspi.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Cadence Quad SPI controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible : should be one of the following:
5*c66ec88fSEmmanuel Vadot	Generic default - "cdns,qspi-nor".
6*c66ec88fSEmmanuel Vadot	For TI 66AK2G SoC - "ti,k2g-qspi", "cdns,qspi-nor".
7*c66ec88fSEmmanuel Vadot	For TI AM654 SoC  - "ti,am654-ospi", "cdns,qspi-nor".
8*c66ec88fSEmmanuel Vadot- reg : Contains two entries, each of which is a tuple consisting of a
9*c66ec88fSEmmanuel Vadot	physical address and length. The first entry is the address and
10*c66ec88fSEmmanuel Vadot	length of the controller register set. The second entry is the
11*c66ec88fSEmmanuel Vadot	address and length of the QSPI Controller data area.
12*c66ec88fSEmmanuel Vadot- interrupts : Unit interrupt specifier for the controller interrupt.
13*c66ec88fSEmmanuel Vadot- clocks : phandle to the Quad SPI clock.
14*c66ec88fSEmmanuel Vadot- cdns,fifo-depth : Size of the data FIFO in words.
15*c66ec88fSEmmanuel Vadot- cdns,fifo-width : Bus width of the data FIFO in bytes.
16*c66ec88fSEmmanuel Vadot- cdns,trigger-address : 32-bit indirect AHB trigger address.
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel VadotOptional properties:
19*c66ec88fSEmmanuel Vadot- cdns,is-decoded-cs : Flag to indicate whether decoder is used or not.
20*c66ec88fSEmmanuel Vadot- cdns,rclk-en : Flag to indicate that QSPI return clock is used to latch
21*c66ec88fSEmmanuel Vadot  the read data rather than the QSPI clock. Make sure that QSPI return
22*c66ec88fSEmmanuel Vadot  clock is populated on the board before using this property.
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel VadotOptional subnodes:
25*c66ec88fSEmmanuel VadotSubnodes of the Cadence Quad SPI controller are spi slave nodes with additional
26*c66ec88fSEmmanuel Vadotcustom properties:
27*c66ec88fSEmmanuel Vadot- cdns,read-delay : Delay for read capture logic, in clock cycles
28*c66ec88fSEmmanuel Vadot- cdns,tshsl-ns : Delay in nanoseconds for the length that the master
29*c66ec88fSEmmanuel Vadot                  mode chip select outputs are de-asserted between
30*c66ec88fSEmmanuel Vadot		  transactions.
31*c66ec88fSEmmanuel Vadot- cdns,tsd2d-ns : Delay in nanoseconds between one chip select being
32*c66ec88fSEmmanuel Vadot                  de-activated and the activation of another.
33*c66ec88fSEmmanuel Vadot- cdns,tchsh-ns : Delay in nanoseconds between last bit of current
34*c66ec88fSEmmanuel Vadot                  transaction and deasserting the device chip select
35*c66ec88fSEmmanuel Vadot		  (qspi_n_ss_out).
36*c66ec88fSEmmanuel Vadot- cdns,tslch-ns : Delay in nanoseconds between setting qspi_n_ss_out low
37*c66ec88fSEmmanuel Vadot                  and first bit transfer.
38*c66ec88fSEmmanuel Vadot- resets	: Must contain an entry for each entry in reset-names.
39*c66ec88fSEmmanuel Vadot		  See ../reset/reset.txt for details.
40*c66ec88fSEmmanuel Vadot- reset-names	: Must include either "qspi" and/or "qspi-ocp".
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel VadotExample:
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel Vadot	qspi: spi@ff705000 {
45*c66ec88fSEmmanuel Vadot		compatible = "cdns,qspi-nor";
46*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
47*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
48*c66ec88fSEmmanuel Vadot		reg = <0xff705000 0x1000>,
49*c66ec88fSEmmanuel Vadot		      <0xffa00000 0x1000>;
50*c66ec88fSEmmanuel Vadot		interrupts = <0 151 4>;
51*c66ec88fSEmmanuel Vadot		clocks = <&qspi_clk>;
52*c66ec88fSEmmanuel Vadot		cdns,is-decoded-cs;
53*c66ec88fSEmmanuel Vadot		cdns,fifo-depth = <128>;
54*c66ec88fSEmmanuel Vadot		cdns,fifo-width = <4>;
55*c66ec88fSEmmanuel Vadot		cdns,trigger-address = <0x00000000>;
56*c66ec88fSEmmanuel Vadot		resets = <&rst QSPI_RESET>, <&rst QSPI_OCP_RESET>;
57*c66ec88fSEmmanuel Vadot		reset-names = "qspi", "qspi-ocp";
58*c66ec88fSEmmanuel Vadot
59*c66ec88fSEmmanuel Vadot		flash0: n25q00@0 {
60*c66ec88fSEmmanuel Vadot			...
61*c66ec88fSEmmanuel Vadot			cdns,read-delay = <4>;
62*c66ec88fSEmmanuel Vadot			cdns,tshsl-ns = <50>;
63*c66ec88fSEmmanuel Vadot			cdns,tsd2d-ns = <50>;
64*c66ec88fSEmmanuel Vadot			cdns,tchsh-ns = <4>;
65*c66ec88fSEmmanuel Vadot			cdns,tslch-ns = <4>;
66*c66ec88fSEmmanuel Vadot		};
67*c66ec88fSEmmanuel Vadot	};
68