Merge tag 'mailbox-v5.15' of git://git.linaro.org/landing-teams/working/fujitsu/integ...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / mailbox / nvidia,tegra186-hsp.txt
1 NVIDIA Tegra Hardware Synchronization Primitives (HSP)
2
3 The HSP modules are used for the processors to share resources and communicate
4 together. It provides a set of hardware synchronization primitives for
5 interprocessor communication. So the interprocessor communication (IPC)
6 protocols can use hardware synchronization primitives, when operating between
7 two processors not in an SMP relationship.
8
9 The features that HSP supported are shared mailboxes, shared semaphores,
10 arbitrated semaphores and doorbells.
11
12 Required properties:
13 - name : Should be hsp
14 - compatible
15     Array of strings.
16     one of:
17     - "nvidia,tegra186-hsp"
18     - "nvidia,tegra194-hsp", "nvidia,tegra186-hsp"
19 - reg : Offset and length of the register set for the device.
20 - interrupt-names
21     Array of strings.
22     Contains a list of names for the interrupts described by the interrupt
23     property. May contain the following entries, in any order:
24     - "doorbell"
25     - "sharedN", where 'N' is a number from zero up to the number of
26       external interrupts supported by the HSP instance minus one.
27     Users of this binding MUST look up entries in the interrupt property
28     by name, using this interrupt-names property to do so.
29 - interrupts
30     Array of interrupt specifiers.
31     Must contain one entry per entry in the interrupt-names property,
32     in a matching order.
33 - #mbox-cells : Should be 2.
34
35 The mbox specifier of the "mboxes" property in the client node should contain
36 two cells. The first cell determines the HSP type and the second cell is used
37 to identify the mailbox that the client is going to use.
38
39 For doorbells, the second cell specifies the index of the doorbell to use.
40
41 For shared mailboxes, the second cell is composed of two fields:
42 - bits 31..24:
43     A bit mask of flags that further specify how the shared mailbox will be
44     used. Valid flags are:
45     - bit 31:
46         Defines the direction of the mailbox. If set, the mailbox will be used
47         as a producer (i.e. used to send data). If cleared, the mailbox is the
48         consumer of data sent by a producer.
49
50 - bits 23.. 0:
51     The index of the shared mailbox to use. The number of available mailboxes
52     may vary by instance of the HSP block and SoC generation.
53
54 The following file contains definitions that can be used to construct mailbox
55 specifiers:
56
57     <dt-bindings/mailbox/tegra186-hsp.h>
58
59 Example:
60
61 hsp_top0: hsp@3c00000 {
62         compatible = "nvidia,tegra186-hsp";
63         reg = <0x0 0x03c00000 0x0 0xa0000>;
64         interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
65         interrupt-names = "doorbell";
66         #mbox-cells = <2>;
67 };
68
69 client {
70         ...
71         mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_XXX>;
72 };