Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mailbox/nvidia,tegra186-hsp.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NVIDIA Tegra Hardware Synchronization Primitives (HSP)
8
9maintainers:
10 - Thierry Reding <thierry.reding@gmail.com>
11 - Jon Hunter <jonathanh@nvidia.com>
12
13description: |
14 The HSP modules are used for the processors to share resources and
15 communicate together. It provides a set of hardware synchronization
16 primitives for interprocessor communication. So the interprocessor
17 communication (IPC) protocols can use hardware synchronization
18 primitives, when operating between two processors not in an SMP
19 relationship.
20
21 The features that HSP supported are shared mailboxes, shared
22 semaphores, arbitrated semaphores and doorbells.
23
24 The mbox specifier of the "mboxes" property in the client node should
25 contain two cells. The first cell determines the HSP type and the
26 second cell is used to identify the mailbox that the client is going
27 to use.
28
29 For shared mailboxes, the first cell composed of two fields:
30 - bits 15..8:
31 A bit mask of flags that further specifies the type of shared
32 mailbox to be used (based on the data size). If no flag is
33 specified then, 32-bit shared mailbox is used.
34 - bits 7..0:
35 Defines the type of the mailbox to be used. This field should be
36 TEGRA_HSP_MBOX_TYPE_SM for shared mailboxes.
37
38 For doorbells, the second cell specifies the index of the doorbell to
39 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
44 will be used. Valid flags are:
45 - bit 31:
46 Defines the direction of the mailbox. If set, the mailbox
47 will be used as a producer (i.e. used to send data). If
48 cleared, the mailbox is the consumer of data sent by a
49 producer.
50
51 - bits 23..0:
52 The index of the shared mailbox to use. The number of available
53 mailboxes may vary by instance of the HSP block and SoC
54 generation.
55
56 The following file contains definitions that can be used to
57 construct mailbox specifiers:
58
59 <dt-bindings/mailbox/tegra186-hsp.h>
60
61properties:
62 compatible:
63 oneOf:
64 - enum:
65 - nvidia,tegra186-hsp
66 - nvidia,tegra194-hsp
67 - nvidia,tegra264-hsp
68 - items:
69 - const: nvidia,tegra234-hsp
70 - const: nvidia,tegra194-hsp
71
72 reg:
73 maxItems: 1
74
75 interrupts:
76 minItems: 1
77 maxItems: 17
78
79 interrupt-names:
80 oneOf:
81 # shared interrupts are optional
82 - items:
83 - const: doorbell
84
85 - items:
86 - const: doorbell
87 - pattern: "^shared([0-9]|1[0-5])$"
88 - pattern: "^shared([0-9]|1[0-5])$"
89 - pattern: "^shared([0-9]|1[0-5])$"
90 - pattern: "^shared([0-9]|1[0-5])$"
91 - pattern: "^shared([0-9]|1[0-5])$"
92 - pattern: "^shared([0-9]|1[0-5])$"
93 - pattern: "^shared([0-9]|1[0-5])$"
94 - pattern: "^shared([0-9]|1[0-5])$"
95 - pattern: "^shared([0-9]|1[0-5])$"
96 - pattern: "^shared([0-9]|1[0-5])$"
97 - pattern: "^shared([0-9]|1[0-5])$"
98 - pattern: "^shared([0-9]|1[0-5])$"
99 - pattern: "^shared([0-9]|1[0-5])$"
100 - pattern: "^shared([0-9]|1[0-5])$"
101 - pattern: "^shared([0-9]|1[0-5])$"
102 - pattern: "^shared([0-9]|1[0-5])$"
103
104 - items:
105 - const: doorbell
106 - pattern: "^shared[0-7]$"
107 - pattern: "^shared[0-7]$"
108 - pattern: "^shared[0-7]$"
109 - pattern: "^shared[0-7]$"
110 - pattern: "^shared[0-7]$"
111 - pattern: "^shared[0-7]$"
112 - pattern: "^shared[0-7]$"
113 - pattern: "^shared[0-7]$"
114
115 - items:
116 - pattern: "^shared[0-7]$"
117 - pattern: "^shared[0-7]$"
118 - pattern: "^shared[0-7]$"
119 - pattern: "^shared[0-7]$"
120
121 "#mbox-cells":
122 const: 2
123
124additionalProperties: false
125
126examples:
127 - |
128 #include <dt-bindings/interrupt-controller/arm-gic.h>
129 #include <dt-bindings/mailbox/tegra186-hsp.h>
130
131 mailbox@3c00000 {
132 compatible = "nvidia,tegra186-hsp";
133 reg = <0x03c00000 0xa0000>;
134 interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
135 interrupt-names = "doorbell";
136 #mbox-cells = <2>;
137 };