From patchwork Tue Mar 3 10:41:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 45345 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3146121429 for ; Tue, 3 Mar 2015 10:41:46 +0000 (UTC) Received: by wghb13 with SMTP id b13sf28060272wgh.2 for ; Tue, 03 Mar 2015 02:41:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=/dk0eAD1rOSgwzjY56Tho1l8oyEnhrdQEXayixctD+M=; b=PLPIN8oXDfHFdMdWX8vcWFoz+jixcQ/GeFo+XmeCT/eJVtR8pgNe7PNvHi5Dc/VyvC wYusnHTqdhSdJiVA2cY9uDunAhGlvDDoPwO6WhBxnAEihc+liCGThBnWrKgEDpb/ksCS kJVW+ufu+Gc2OWTZtxwoSrjCQO18SHFMfsPKCZv3L+VaeTz+K/0Tg7OqYrDhews0qiNx UsOMM3AfdM/pblZYLvVVZz+Y9OC1U0ME9CLGFjyTZ27TWGrZUp4Eye39M5/6ngprxGJB i6tORaPMqtaW/PfnM+An6WT50NafZ75IOUNNS4ZGd2+PPNKAb7EffWv/hSOsYVTipxCl geyg== X-Gm-Message-State: ALoCoQl9NMv9/raDTfK/sKf5Eks0tBNenMQlHodpoEtZS6cLGsJNffXGcl+yvulSD7UX4ZzTyA5j X-Received: by 10.112.219.102 with SMTP id pn6mr4394825lbc.12.1425379305394; Tue, 03 Mar 2015 02:41:45 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.98 with SMTP id bf2ls22576lab.70.gmail; Tue, 03 Mar 2015 02:41:45 -0800 (PST) X-Received: by 10.152.170.233 with SMTP id ap9mr27382369lac.47.1425379305222; Tue, 03 Mar 2015 02:41:45 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id c7si178878lah.173.2015.03.03.02.41.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Mar 2015 02:41:45 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by lams18 with SMTP id s18so36417769lam.11 for ; Tue, 03 Mar 2015 02:41:45 -0800 (PST) X-Received: by 10.112.37.198 with SMTP id a6mr14338342lbk.86.1425379305130; Tue, 03 Mar 2015 02:41:45 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp477159lbj; Tue, 3 Mar 2015 02:41:43 -0800 (PST) X-Received: by 10.66.65.234 with SMTP id a10mr55832503pat.120.1425379302137; Tue, 03 Mar 2015 02:41:42 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lw6si352824pdb.189.2015.03.03.02.41.40; Tue, 03 Mar 2015 02:41:42 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756180AbbCCKlh (ORCPT + 28 others); Tue, 3 Mar 2015 05:41:37 -0500 Received: from mail-we0-f180.google.com ([74.125.82.180]:33877 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755909AbbCCKle (ORCPT ); Tue, 3 Mar 2015 05:41:34 -0500 Received: by wesq59 with SMTP id q59so38983440wes.1 for ; Tue, 03 Mar 2015 02:41:33 -0800 (PST) X-Received: by 10.180.85.39 with SMTP id e7mr1480333wiz.90.1425379293525; Tue, 03 Mar 2015 02:41:33 -0800 (PST) Received: from localhost.localdomain (host81-134-89-90.in-addr.btopenworld.com. [81.134.89.90]) by mx.google.com with ESMTPSA id a13sm702429wjx.30.2015.03.03.02.41.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Mar 2015 02:41:32 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: lee.jones@linaro.org, kernel@stlinux.com, jassisinghbrar@gmail.com, devicetree@vger.kernel.org Subject: [PATCH 2/3] mailbox: dt: Supply bindings for ST's Mailbox IP Date: Tue, 3 Mar 2015 10:41:22 +0000 Message-Id: <1425379283-1567-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425379283-1567-1-git-send-email-lee.jones@linaro.org> References: <1425379283-1567-1-git-send-email-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Lee Jones --- .../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@0 { + compatible = "st,stih407-mailbox"; + #address-cells = <1>; + #size-cells = <1>; + #mbox-cells = <1>; + reg = <0x8f00000 0x1000>; + reg-names = "mbox-reg"; + interrupts = ; + interrupt-names = "mb0_irq"; + st,name = "a9"; + st,mbox-rx; + st,mbox-rx-id = <0>; + st,mbox-chans = <0 1 0 1>; +}; + +mailbox3: mailbox@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.