xref: /freebsd/sys/contrib/device-tree/Bindings/mailbox/brcm,iproc-flexrm-mbox.txt (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1*c66ec88fSEmmanuel VadotBroadcom FlexRM Ring Manager
2*c66ec88fSEmmanuel Vadot============================
3*c66ec88fSEmmanuel VadotThe Broadcom FlexRM ring manager provides a set of rings which can be
4*c66ec88fSEmmanuel Vadotused to submit work to offload engines. An SoC may have multiple FlexRM
5*c66ec88fSEmmanuel Vadothardware blocks. There is one device tree entry per FlexRM block. The
6*c66ec88fSEmmanuel VadotFlexRM driver will create a mailbox-controller instance for given FlexRM
7*c66ec88fSEmmanuel Vadothardware block where each mailbox channel is a separate FlexRM ring.
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel VadotRequired properties:
10*c66ec88fSEmmanuel Vadot--------------------
11*c66ec88fSEmmanuel Vadot- compatible:	Should be "brcm,iproc-flexrm-mbox"
12*c66ec88fSEmmanuel Vadot- reg:		Specifies base physical address and size of the FlexRM
13*c66ec88fSEmmanuel Vadot		ring registers
14*c66ec88fSEmmanuel Vadot- msi-parent:	Phandles (and potential Device IDs) to MSI controllers
15*c66ec88fSEmmanuel Vadot		The FlexRM engine will send MSIs (instead of wired
16*c66ec88fSEmmanuel Vadot		interrupts) to CPU. There is one MSI for each FlexRM ring.
17*c66ec88fSEmmanuel Vadot		Refer devicetree/bindings/interrupt-controller/msi.txt
18*c66ec88fSEmmanuel Vadot- #mbox-cells:	Specifies the number of cells needed to encode a mailbox
19*c66ec88fSEmmanuel Vadot		channel. This should be 3.
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel Vadot		The 1st cell is the mailbox channel number.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel Vadot		The 2nd cell contains MSI completion threshold. This is the
24*c66ec88fSEmmanuel Vadot		number of completion messages for which FlexRM will inject
25*c66ec88fSEmmanuel Vadot		one MSI interrupt to CPU.
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel Vadot		The 3nd cell contains MSI timer value representing time for
28*c66ec88fSEmmanuel Vadot		which FlexRM will wait to accumulate N completion messages
29*c66ec88fSEmmanuel Vadot		where N is the value specified by 2nd cell above. If FlexRM
30*c66ec88fSEmmanuel Vadot		does not get required number of completion messages in time
31*c66ec88fSEmmanuel Vadot		specified by this cell then it will inject one MSI interrupt
32*c66ec88fSEmmanuel Vadot		to CPU provided at least one completion message is available.
33*c66ec88fSEmmanuel Vadot
34*c66ec88fSEmmanuel VadotOptional properties:
35*c66ec88fSEmmanuel Vadot--------------------
36*c66ec88fSEmmanuel Vadot- dma-coherent:	Present if DMA operations made by the FlexRM engine (such
37*c66ec88fSEmmanuel Vadot		as DMA descriptor access, access to buffers pointed by DMA
38*c66ec88fSEmmanuel Vadot		descriptors and read/write pointer updates to DDR) are
39*c66ec88fSEmmanuel Vadot		cache coherent with the CPU.
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel VadotExample:
42*c66ec88fSEmmanuel Vadot--------
43*c66ec88fSEmmanuel Vadotcrypto_mbox: mbox@67000000 {
44*c66ec88fSEmmanuel Vadot	compatible = "brcm,iproc-flexrm-mbox";
45*c66ec88fSEmmanuel Vadot	reg = <0x67000000 0x200000>;
46*c66ec88fSEmmanuel Vadot	msi-parent = <&gic_its 0x7f00>;
47*c66ec88fSEmmanuel Vadot	#mbox-cells = <3>;
48*c66ec88fSEmmanuel Vadot};
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel Vadotcrypto@672c0000 {
51*c66ec88fSEmmanuel Vadot	compatible = "brcm,spu2-v2-crypto";
52*c66ec88fSEmmanuel Vadot	reg = <0x672c0000 0x1000>;
53*c66ec88fSEmmanuel Vadot	mboxes = <&crypto_mbox 0 0x1 0xffff>,
54*c66ec88fSEmmanuel Vadot		 <&crypto_mbox 1 0x1 0xffff>,
55*c66ec88fSEmmanuel Vadot		 <&crypto_mbox 16 0x1 0xffff>,
56*c66ec88fSEmmanuel Vadot		 <&crypto_mbox 17 0x1 0xffff>,
57*c66ec88fSEmmanuel Vadot		 <&crypto_mbox 30 0x1 0xffff>,
58*c66ec88fSEmmanuel Vadot		 <&crypto_mbox 31 0x1 0xffff>;
59*c66ec88fSEmmanuel Vadot};
60