NVIDIA Tegra Hardware Synchronization Primitives (HSP)
Schema identifier ($id): "http://devicetree.org/schemas/mailbox/nvidia,tegra186-hsp.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Thierry Reding <thierry.reding@gmail.com>", "Jon Hunter <jonathanh@nvidia.com>"
The HSP modules are used for the processors to share resources and communicate together. It provides a set of hardware synchronization primitives for interprocessor communication. So the interprocessor communication (IPC) protocols can use hardware synchronization primitives, when operating between two processors not in an SMP relationship.
The features that HSP supported are shared mailboxes, shared semaphores, arbitrated semaphores and doorbells.
The mbox specifier of the "mboxes" property in the client node should contain two cells. The first cell determines the HSP type and the second cell is used to identify the mailbox that the client is going to use.
For shared mailboxes, the first cell composed of two fields:
- bits 15..8:
A bit mask of flags that further specifies the type of shared
mailbox to be used (based on the data size). If no flag is
specified then, 32-bit shared mailbox is used.
- bits 7..0:
Defines the type of the mailbox to be used. This field should be
TEGRA_HSP_MBOX_TYPE_SM for shared mailboxes.
For doorbells, the second cell specifies the index of the doorbell to use.
For shared mailboxes, the second cell is composed of two fields:
- bits 31..24:
A bit mask of flags that further specify how the shared mailbox
will be used. Valid flags are:
- bit 31:
Defines the direction of the mailbox. If set, the mailbox
will be used as a producer (i.e. used to send data). If
cleared, the mailbox is the consumer of data sent by a
producer.
- bits 23..0:
The index of the shared mailbox to use. The number of available
mailboxes may vary by instance of the HSP block and SoC
generation.
The following file contains definitions that can be used to
construct mailbox specifiers:
<dt-bindings/mailbox/tegra186-hsp.h>
Properties and child nodes (properties) #
compatible — not listed as required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Allowed values (
enum):"nvidia,tegra186-hsp","nvidia,tegra194-hsp","nvidia,tegra264-hsp"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"nvidia,tegra234-hsp"Item 2
Exact value (
const):"nvidia,tegra194-hsp"
reg — not listed as required here #
Maximum number of items (maxItems): 1
interrupts — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 17
interrupt-names — not listed as required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Exact value (
const):"doorbell"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"doorbell"Item 2
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 3
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 4
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 5
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 6
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 7
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 8
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 9
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 10
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 11
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 12
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 13
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 14
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 15
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 16
String pattern (
pattern):"^shared([0-9]|1[0-5])$"Item 17
String pattern (
pattern):"^shared([0-9]|1[0-5])$"
Rule 3
Array item rules (
items)Item 1
Exact value (
const):"doorbell"Item 2
String pattern (
pattern):"^shared[0-7]$"Item 3
String pattern (
pattern):"^shared[0-7]$"Item 4
String pattern (
pattern):"^shared[0-7]$"Item 5
String pattern (
pattern):"^shared[0-7]$"Item 6
String pattern (
pattern):"^shared[0-7]$"Item 7
String pattern (
pattern):"^shared[0-7]$"Item 8
String pattern (
pattern):"^shared[0-7]$"Item 9
String pattern (
pattern):"^shared[0-7]$"
Rule 4
Array item rules (
items)Item 1
String pattern (
pattern):"^shared[0-7]$"Item 2
String pattern (
pattern):"^shared[0-7]$"Item 3
String pattern (
pattern):"^shared[0-7]$"Item 4
String pattern (
pattern):"^shared[0-7]$"
#mbox-cells — not listed as required here #
Exact value (const): 2
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/mailbox/tegra186-hsp.h>
mailbox@3c00000 {
compatible = "nvidia,tegra186-hsp";
reg = <0x03c00000 0xa0000>;
interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "doorbell";
#mbox-cells = <2>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 81: shared interrupts are optional