linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] mailbox: dt: Supply bindings for ST's Mailbox IP
Date: Tue,  3 Mar 2015 10:41:22 +0000	[thread overview]
Message-ID: <1425379283-1567-3-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1425379283-1567-1-git-send-email-lee.jones@linaro.org>

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../devicetree/bindings/mailbox/sti-mailbox.txt    | 66 ++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mailbox/sti-mailbox.txt

diff --git a/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt b/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt
new file mode 100644
index 0000000..c965c13
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt
@@ -0,0 +1,66 @@
+ST Microelectronics Mailbox Driver
+
+Required properties:
+- compatible		: Should be "st,stih407-mailbox"
+- reg			: Offset and length of the register set for the device
+- reg-names		: Should contain the reg name "mbox-reg".
+- st,name		: Name of the mailbox
+- st,mbox-chans		: Mbox/channels descriptor data private to each channel.
+			  The 4 cells represent the following data:
+				Cell #1 (rx_id) - rx mbox num in an instance.
+				Cell #2 (rx_inst) - rx mbox instance num.
+				Cell #3 (tx_id) - tx mbox num in an instance.
+				Cell #4 (tx_inst) - tx mbox instance num.
+
+			  Note that an IP Mailbox is composed by 4 instances and
+			  each instance is composed by 32 mailboxes.
+			  You define here the configuration of a channel (at
+			  framework level).
+
+Optional properties
+- st,mbox-rx		: Indicaties if the mailbox can be used as Rx mailbox.
+- st,mbox-rx-id		: If a Rx mailbox is affected to a Tx mailbox (to have
+			  full-duplex channel), this field indiactes the Id of
+			  the Rx mailbox to use.
+- interrupts		: Contains the IRQ line for a RX mailbox.
+- interrupt-names	: Should contain the interrupt name.
+
+Examples:
+
+mailbox0: mailbox at 0 {
+	compatible = "st,stih407-mailbox";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	#mbox-cells = <1>;
+	reg = <0x8f00000 0x1000>;
+	reg-names = "mbox-reg";
+	interrupts = <GIC_SPI 1 IRQ_TYPE_NONE>;
+	interrupt-names = "mb0_irq";
+	st,name = "a9";
+	st,mbox-rx;
+	st,mbox-rx-id = <0>;
+	st,mbox-chans = <0 1 0 1>;
+};
+
+mailbox3: mailbox at 3 {
+	compatible = "st,stih407-mailbox";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	#mbox-cells = <1>;
+	reg = <0x8f03000 0x100>;
+	reg-names = "mbox-reg";
+	st,name = "st231_video";
+	st,mbox-rx-id = <0>;
+	st,mbox-chans = <2 1 2 1>;
+};
+
+In this configuration, if you use channel 0 you will have the following
+configuration:
+- "chan0_video" will use mailbox0 as Rx mailbox.
+- "chan0_video" will use instance 1, bit 2 in mailbox0 for rx.
+- "chan0_video" will use instance 1, bit 2 in mailbox3 for tx.
+
+If you declare a channel only for Rx, you have to set magic number 0xff
+for tx_id and tx_instance.
+If you declare a channel only for Tx, you have to set magic number 0xff
+for rx_id and rx_instance.
-- 
1.9.1

  parent reply	other threads:[~2015-03-03 10:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 10:41 [PATCH 0/3] mailbox: New mailbox driver for ST Lee Jones
2015-03-03 10:41 ` [PATCH 1/3] ARM: STi: stih407-family: Add nodes for Mailbox Lee Jones
2015-03-03 10:41 ` Lee Jones [this message]
2015-03-04 13:31   ` [PATCH 2/3] mailbox: dt: Supply bindings for ST's Mailbox IP Jassi Brar
2015-03-03 10:41 ` [PATCH 3/3] mailbox: Add support " Lee Jones
2015-03-03 11:34   ` Arnd Bergmann
2015-03-03 15:18     ` Jassi Brar
2015-03-18 13:17       ` Lee Jones
2015-03-18 13:53         ` Jassi Brar
2015-03-18 15:34           ` Lee Jones
2015-03-19  5:50             ` Jassi Brar
2015-03-19  9:17               ` Lee Jones
2015-03-19 12:41                 ` Jassi Brar
2015-03-23 15:06                   ` Lee Jones
2015-03-04 13:27   ` Jassi Brar
2015-03-18 13:12     ` Lee Jones
2015-03-18 13:32       ` Jassi Brar
2015-03-18 15:26         ` Lee Jones
2015-03-19  5:13           ` Jassi Brar
2015-03-19  9:57             ` Lee Jones
2015-03-19 12:43               ` Jassi Brar

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=1425379283-1567-3-git-send-email-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).