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