From patchwork Mon Feb 12 18:45:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 128147 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3485187ljc; Mon, 12 Feb 2018 10:45:54 -0800 (PST) X-Google-Smtp-Source: AH8x227nkH1T7h8rrxINk9/BvJwZ8whCw0B34S4kg67t0x5K+gCL7QqFa3YzymMsGVIWySYVK7XZ X-Received: by 2002:a17:902:5305:: with SMTP id b5-v6mr11280150pli.61.1518461154226; Mon, 12 Feb 2018 10:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518461154; cv=none; d=google.com; s=arc-20160816; b=RI5ox+cw5lZGKvXmEbKGiruDW7AZfoUOK+BSjT67NTqU8h5JpwBhCRTa5/YeBzVn4K FOjr9CpDj2ff94HpU6M/41gfTdaDxNxRWmfIv1SIQn6HQN2V5/78CjxGNclVOeZXbZ3V rzRuVMb1tBwlHm3ahPDrssDljj/L5FBQgDK7nSvLlfCHj6x+bvbpd4al2tR6Vs4eX6Tu rwOGnLN/F6HaukNKfFQszSkkPnO0rIJ+e/+65TRmhHG4vt1cHZE600PQHku4RHKRoY46 x/8nGO1xnggy1y04pvwOyrzCUvuMEqaYFsgVyuxblpeYEEV2Tfvf8n6Lvk1BqzQWKAcd jcfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=q3UXyp+tnqviAHY2DeuyyRpdyMaApC+pjq/q5ocp9lw=; b=kVduTnt2UxRm+E7KOxoUMmUnI4BElTzxu7MBaAycxYQ8N51whffb1PtuW9X1qBmdwv XZHYfDBBbuZz2ncQSos8FxCt42BmNRoupoXSREvDHuL+XlehFgc1lrvzI8V7N27/LLJf 9H7V8DIH+a7WDBf4Mc3vqZu1XLIxtsdQgCyTvLS5WkLsAcn79wkWKwpqfo9t4TzaaN16 AThWytrLVaSeKoNEHGz2QJ04mf1MFFpS7FpKgE9l3YZ7jXZ9+kNy/a27O6XX8c2076og znWlUY65nB+T3k0zNnM821oZwQE8S9iySDagJdvKDGhm2ZjMIUPIZ0EkMI18sO48/Kwp v2nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q73si4808976pfj.270.2018.02.12.10.45.53; Mon, 12 Feb 2018 10:45:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753971AbeBLSpq (ORCPT + 26 others); Mon, 12 Feb 2018 13:45:46 -0500 Received: from foss.arm.com ([217.140.101.70]:47106 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753588AbeBLSpo (ORCPT ); Mon, 12 Feb 2018 13:45:44 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B7E5E164F; Mon, 12 Feb 2018 10:45:43 -0800 (PST) Received: from e107155-lin.cambridge.arm.com (e107155-lin.cambridge.arm.com [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3ED713F24D; Mon, 12 Feb 2018 10:45:42 -0800 (PST) From: Sudeep Holla To: ALKML , LKML , DTML Cc: Sudeep Holla , Greg Kroah-Hartman , Arnd Bergmann , Alexey Klimov , Mark Rutland Subject: [PATCH v5 01/20] dt-bindings: mailbox: add support for mailbox client shared memory Date: Mon, 12 Feb 2018 18:45:05 +0000 Message-Id: <1518461124-17371-2-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518461124-17371-1-git-send-email-sudeep.holla@arm.com> References: <1518461124-17371-1-git-send-email-sudeep.holla@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Many users of the mailbox controllers depend on the shared memory between the two end points to exchange the main data while using simple doorbell mechanism to alert the end points of the presence of a message. This patch defines device tree bindings to represent such shared memory in a generic way. Cc: Mark Rutland Acked-by: Rob Herring Signed-off-by: Sudeep Holla --- .../devicetree/bindings/mailbox/mailbox.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) -- 2.7.4 diff --git a/Documentation/devicetree/bindings/mailbox/mailbox.txt b/Documentation/devicetree/bindings/mailbox/mailbox.txt index be05b9746c69..af8ecee2ac68 100644 --- a/Documentation/devicetree/bindings/mailbox/mailbox.txt +++ b/Documentation/devicetree/bindings/mailbox/mailbox.txt @@ -23,6 +23,11 @@ assign appropriate mailbox channel to client drivers. Optional property: - mbox-names: List of identifier strings for each mailbox channel. +- shmem : List of phandle pointing to the shared memory(SHM) area between the + users of these mailboxes for IPC, one for each mailbox. This shared + memory can be part of any memory reserved for the purpose of this + communication between the mailbox client and the remote. + Example: pwr_cntrl: power { @@ -30,3 +35,26 @@ assign appropriate mailbox channel to client drivers. mbox-names = "pwr-ctrl", "rpc"; mboxes = <&mailbox 0 &mailbox 1>; }; + +Example with shared memory(shmem): + + sram: sram@50000000 { + compatible = "mmio-sram"; + reg = <0x50000000 0x10000>; + + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x50000000 0x10000>; + + cl_shmem: shmem@0 { + compatible = "client-shmem"; + reg = <0x0 0x200>; + }; + }; + + client@2e000000 { + ... + mboxes = <&mailbox 0>; + shmem = <&cl_shmem>; + .. + };