Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mailbox: Add Tegra HSP binding

Add DT binding for the Hardware Synchronization Primitives (HSP). The
HSP is designed for the processors to share resources and communicate
with one another. A set of hardware synchronization primitives for
interprocessor communication (IPC) is provided. IPC protocols can use
use these hardware synchronization primitives when operating between
processors in an AMP configuration.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Joseph Lo and committed by
Thierry Reding
e9839402 15326c1a

+76
+52
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 + - reg : Offset and length of the register set for the device. 19 + - interrupt-names 20 + Array of strings. 21 + Contains a list of names for the interrupts described by the interrupt 22 + property. May contain the following entries, in any order: 23 + - "doorbell" 24 + Users of this binding MUST look up entries in the interrupt property 25 + by name, using this interrupt-names property to do so. 26 + - interrupts 27 + Array of interrupt specifiers. 28 + Must contain one entry per entry in the interrupt-names property, 29 + in a matching order. 30 + - #mbox-cells : Should be 2. 31 + 32 + The mbox specifier of the "mboxes" property in the client node should 33 + contain two data. The first one should be the HSP type and the second 34 + one should be the ID that the client is going to use. Those information 35 + can be found in the following file. 36 + 37 + - <dt-bindings/mailbox/tegra186-hsp.h>. 38 + 39 + Example: 40 + 41 + hsp_top0: hsp@3c00000 { 42 + compatible = "nvidia,tegra186-hsp"; 43 + reg = <0x0 0x03c00000 0x0 0xa0000>; 44 + interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>; 45 + interrupt-names = "doorbell"; 46 + #mbox-cells = <2>; 47 + }; 48 + 49 + client { 50 + ... 51 + mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_XXX>; 52 + };
+24
include/dt-bindings/mailbox/tegra186-hsp.h
··· 1 + /* 2 + * This header provides constants for binding nvidia,tegra186-hsp. 3 + */ 4 + 5 + #ifndef _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H 6 + #define _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H 7 + 8 + /* 9 + * These define the type of mailbox that is to be used (doorbell, shared 10 + * mailbox, shared semaphore or arbitrated semaphore). 11 + */ 12 + #define TEGRA_HSP_MBOX_TYPE_DB 0x0 13 + #define TEGRA_HSP_MBOX_TYPE_SM 0x1 14 + #define TEGRA_HSP_MBOX_TYPE_SS 0x2 15 + #define TEGRA_HSP_MBOX_TYPE_AS 0x3 16 + 17 + /* 18 + * These defines represent the bit associated with the given master ID in the 19 + * doorbell registers. 20 + */ 21 + #define TEGRA_HSP_DB_MASTER_CCPLEX 17 22 + #define TEGRA_HSP_DB_MASTER_BPMP 19 23 + 24 + #endif