devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joseph Lo <josephl@nvidia.com>
To: Stephen Warren <swarren@wwwdotorg.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Alexandre Courbot <gnurou@gmail.com>
Cc: linux-tegra@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Peter De Schrijver <pdeschrijver@nvidia.com>,
	Matthew Longnecker <MLongnecker@nvidia.com>,
	devicetree@vger.kernel.org, Jassi Brar <jassisinghbrar@gmail.com>,
	linux-kernel@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>, Joseph Lo <josephl@nvidia.com>
Subject: [PATCH 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox
Date: Mon, 27 Jun 2016 17:02:39 +0800	[thread overview]
Message-ID: <20160627090248.23621-2-josephl@nvidia.com> (raw)
In-Reply-To: <20160627090248.23621-1-josephl@nvidia.com>

Add DT binding for the Hardware Synchronization Primitives (HSP). The
HSP is designed 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 primitive, when operating
between two processors not in an SMP relationship.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
---
 .../bindings/mailbox/nvidia,tegra186-hsp.txt       | 42 ++++++++++++++++++++++
 include/dt-bindings/mailbox/tegra-hsp.h            | 20 +++++++++++
 2 files changed, 62 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt
 create mode 100644 include/dt-bindings/mailbox/tegra-hsp.h

diff --git a/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt
new file mode 100644
index 000000000000..ca07af2d951e
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt
@@ -0,0 +1,42 @@
+NVIDIA Tegra Hardware Synchronization Primitives (HSP)
+
+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.
+
+Required properties:
+- name : Should be hsp
+- compatible : Should be "nvidia,tegra<chip>-hsp"
+- reg : Offset and length of the register set for the device
+- interrupts : Should contain the HSP interrupts
+- interrupt-names: Should contain the names of the HSP interrupts that the
+		   client are using.
+		   "doorbell"
+- nvidia,hsp-function : Specifies one of the HSP functions that the HSP unit
+			will be supported. The function ID can be found in the
+			header file <dt-bindings/mailbox/tegra-hsp.h>.
+- #mbox-cells : Should be 1. Specifies the HSP master that will be enabled of
+		the HSP client. The master ID constants can be found in the
+		header file <dt-bindings/mailbox/tegra-hsp.h>.
+
+Example:
+
+hsp_top: hsp@3c00000 {
+	compatible = "nvidia,tegra186-hsp";
+	reg = <0x0 0x03c00000 0x0 0xa0000>;
+	interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+	interrupt-names = "doorbell";
+	nvidia,hsp-function = <HSP_DOORBELL>;
+	#mbox-cells = <1>;
+};
+
+bpmp@d0000000 {
+	...
+	mboxes = <&hsp_top HSP_DB_MASTER_BPMP>;
+	...
+};
diff --git a/include/dt-bindings/mailbox/tegra-hsp.h b/include/dt-bindings/mailbox/tegra-hsp.h
new file mode 100644
index 000000000000..720c66784b72
--- /dev/null
+++ b/include/dt-bindings/mailbox/tegra-hsp.h
@@ -0,0 +1,20 @@
+/*
+ * This header provides constants for binding nvidia,tegra<chip>-hsp.
+ *
+ * The number with HSP_DB_MASTER prefix indicates the bit that is
+ * associated with a master ID in the doorbell registers.
+ */
+
+
+#ifndef _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H
+#define _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H
+
+#define HSP_SHARED_MAILBOX		0
+#define HSP_SHARED_SEMAPHORE		1
+#define HSP_ARBITRATED_SEMAPHORE	2
+#define HSP_DOORBELL			3
+
+#define HSP_DB_MASTER_CCPLEX 17
+#define HSP_DB_MASTER_BPMP 19
+
+#endif	/* _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H */
-- 
2.9.0

  reply	other threads:[~2016-06-27  9:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27  9:02 [PATCH 00/10] arm64: tegra: add BPMP support Joseph Lo
2016-06-27  9:02 ` Joseph Lo [this message]
     [not found]   ` <20160627090248.23621-2-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-27 15:55     ` [PATCH 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox Stephen Warren
     [not found]       ` <57714C85.50802-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-06-28  9:15         ` Joseph Lo
     [not found]           ` <57724039.7080007-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-28 19:08             ` Stephen Warren
2016-06-29  5:56               ` Joseph Lo
2016-06-29 15:28                 ` Stephen Warren
2016-06-30  9:25                   ` Joseph Lo
     [not found]                     ` <5774E599.4000204-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-30 16:02                       ` Stephen Warren
     [not found]                         ` <5775427B.9040907-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-07-01  2:23                           ` Joseph Lo
2016-06-27  9:02 ` [PATCH 02/10] mailbox: tegra-hsp: Add HSP(Hardware Synchronization Primitives) driver Joseph Lo
2016-06-27  9:02 ` [PATCH 03/10] Documentation: dt-bindings: firmware: tegra: add bindings of the BPMP Joseph Lo
     [not found]   ` <20160627090248.23621-4-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-27 16:08     ` Stephen Warren
     [not found]       ` <57714F7D.1040301-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-06-28  9:16         ` Joseph Lo
2016-06-27  9:02 ` [PATCH 04/10] firmware: tegra: add IVC library Joseph Lo
2016-06-27  9:02 ` [PATCH 05/10] firmware: tegra: add BPMP support Joseph Lo
2016-06-27  9:02 ` [PATCH 06/10] soc/tegra: Add Tegra186 support Joseph Lo
2016-06-27  9:02 ` [PATCH 09/10] arm64: dts: tegra: Add NVIDIA Tegra186 P3310 main board support Joseph Lo
     [not found] ` <20160627090248.23621-1-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-27  9:02   ` [PATCH 07/10] arm64: defconfig: Enable Tegra186 SoC Joseph Lo
2016-06-27  9:02   ` [PATCH 08/10] arm64: dts: tegra: Add Tegra186 support Joseph Lo
2016-06-27  9:02   ` [PATCH 10/10] arm64: dts: tegra: Add NVIDIA P2771 board support Joseph Lo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160627090248.23621-2-josephl@nvidia.com \
    --to=josephl@nvidia.com \
    --cc=MLongnecker@nvidia.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gnurou@gmail.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=robh+dt@kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).