18c2ecf20Sopenharmony_ciBroadcom FlexRM Ring Manager
28c2ecf20Sopenharmony_ci============================
38c2ecf20Sopenharmony_ciThe Broadcom FlexRM ring manager provides a set of rings which can be
48c2ecf20Sopenharmony_ciused to submit work to offload engines. An SoC may have multiple FlexRM
58c2ecf20Sopenharmony_cihardware blocks. There is one device tree entry per FlexRM block. The
68c2ecf20Sopenharmony_ciFlexRM driver will create a mailbox-controller instance for given FlexRM
78c2ecf20Sopenharmony_cihardware block where each mailbox channel is a separate FlexRM ring.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciRequired properties:
108c2ecf20Sopenharmony_ci--------------------
118c2ecf20Sopenharmony_ci- compatible:	Should be "brcm,iproc-flexrm-mbox"
128c2ecf20Sopenharmony_ci- reg:		Specifies base physical address and size of the FlexRM
138c2ecf20Sopenharmony_ci		ring registers
148c2ecf20Sopenharmony_ci- msi-parent:	Phandles (and potential Device IDs) to MSI controllers
158c2ecf20Sopenharmony_ci		The FlexRM engine will send MSIs (instead of wired
168c2ecf20Sopenharmony_ci		interrupts) to CPU. There is one MSI for each FlexRM ring.
178c2ecf20Sopenharmony_ci		Refer devicetree/bindings/interrupt-controller/msi.txt
188c2ecf20Sopenharmony_ci- #mbox-cells:	Specifies the number of cells needed to encode a mailbox
198c2ecf20Sopenharmony_ci		channel. This should be 3.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci		The 1st cell is the mailbox channel number.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci		The 2nd cell contains MSI completion threshold. This is the
248c2ecf20Sopenharmony_ci		number of completion messages for which FlexRM will inject
258c2ecf20Sopenharmony_ci		one MSI interrupt to CPU.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci		The 3nd cell contains MSI timer value representing time for
288c2ecf20Sopenharmony_ci		which FlexRM will wait to accumulate N completion messages
298c2ecf20Sopenharmony_ci		where N is the value specified by 2nd cell above. If FlexRM
308c2ecf20Sopenharmony_ci		does not get required number of completion messages in time
318c2ecf20Sopenharmony_ci		specified by this cell then it will inject one MSI interrupt
328c2ecf20Sopenharmony_ci		to CPU provided atleast one completion message is available.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciOptional properties:
358c2ecf20Sopenharmony_ci--------------------
368c2ecf20Sopenharmony_ci- dma-coherent:	Present if DMA operations made by the FlexRM engine (such
378c2ecf20Sopenharmony_ci		as DMA descriptor access, access to buffers pointed by DMA
388c2ecf20Sopenharmony_ci		descriptors and read/write pointer updates to DDR) are
398c2ecf20Sopenharmony_ci		cache coherent with the CPU.
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciExample:
428c2ecf20Sopenharmony_ci--------
438c2ecf20Sopenharmony_cicrypto_mbox: mbox@67000000 {
448c2ecf20Sopenharmony_ci	compatible = "brcm,iproc-flexrm-mbox";
458c2ecf20Sopenharmony_ci	reg = <0x67000000 0x200000>;
468c2ecf20Sopenharmony_ci	msi-parent = <&gic_its 0x7f00>;
478c2ecf20Sopenharmony_ci	#mbox-cells = <3>;
488c2ecf20Sopenharmony_ci};
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_cicrypto@672c0000 {
518c2ecf20Sopenharmony_ci	compatible = "brcm,spu2-v2-crypto";
528c2ecf20Sopenharmony_ci	reg = <0x672c0000 0x1000>;
538c2ecf20Sopenharmony_ci	mboxes = <&crypto_mbox 0 0x1 0xffff>,
548c2ecf20Sopenharmony_ci		 <&crypto_mbox 1 0x1 0xffff>,
558c2ecf20Sopenharmony_ci		 <&crypto_mbox 16 0x1 0xffff>,
568c2ecf20Sopenharmony_ci		 <&crypto_mbox 17 0x1 0xffff>,
578c2ecf20Sopenharmony_ci		 <&crypto_mbox 30 0x1 0xffff>,
588c2ecf20Sopenharmony_ci		 <&crypto_mbox 31 0x1 0xffff>;
598c2ecf20Sopenharmony_ci};
60