From patchwork Wed Aug 31 00:04:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9306191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6486A607F0 for ; Wed, 31 Aug 2016 00:07:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5490C28DCB for ; Wed, 31 Aug 2016 00:07:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4874F28DD3; Wed, 31 Aug 2016 00:07:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D5C4F28DCB for ; Wed, 31 Aug 2016 00:06:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bet1q-0007sf-1i; Wed, 31 Aug 2016 00:05:18 +0000 Received: from mail-qk0-f176.google.com ([209.85.220.176]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bet1X-0007Dq-Vx for linux-arm-kernel@lists.infradead.org; Wed, 31 Aug 2016 00:05:01 +0000 Received: by mail-qk0-f176.google.com with SMTP id z190so35992315qkc.0 for ; Tue, 30 Aug 2016 17:04:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w+j9RUv+sl0Yd2f+voYFFM5uEEqmUZdIrVW1++i+wUQ=; b=kewFPxYrFPqCj8khsdib8Pd02kQFPaSYeVJJQscdkqsjXO5Re4fGOdVKSLCHYrf2xs Wu5SdCCtih74POCqGROHHjdn5gd0TCHe3DN3Z+n7PYPYjW4WvipzGluzmhSoo2UzhWa9 clDcGyyyRKNF/qSAZkvTUD6Yjyi95egTR9taIqRW4om4aU71NdFJDHmW5VG5+05bcDX1 rzC1xT9tF+zw07O+3Q6svCZTIkkTD+4ikcube4mX/d4pjXABPITcey5OfQ0hzCdzAlfS 1KRGVdYvmpqIgblCBINhbtUK0+2QJTu25EiyVKCxteAbcgtRP8pwKO6IrL1DuUR0cVB7 sKqg== X-Gm-Message-State: AE9vXwObUOsTKtfkMjYpzh9gFw308fXEaSJfYyXexe1MXcacoj40qpLLD+M1Nb9wptzKsGvl X-Received: by 10.55.60.1 with SMTP id j1mr7412326qka.24.1472601878504; Tue, 30 Aug 2016 17:04:38 -0700 (PDT) Received: from labbott-redhat-machine.redhat.com ([2601:602:9800:177f::2946]) by smtp.gmail.com with ESMTPSA id w94sm23253705qte.40.2016.08.30.17.04.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Aug 2016 17:04:37 -0700 (PDT) From: Laura Abbott To: Rob Herring , Frank Rowand , Sumit Semwal , Andrew Andrianov , arve@android.com, Riley Andrews Subject: [PATCHv3 1/3] devicetree: bindings for Ion Date: Tue, 30 Aug 2016 17:04:27 -0700 Message-Id: <1472601869-19469-2-git-send-email-labbott@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472601869-19469-1-git-send-email-labbott@redhat.com> References: <1472601869-19469-1-git-send-email-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160830_170500_153280_D888D3FA X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org, Arnd Bergmann , Tom Gall , romlem@google.com, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Colin Cross , Bryan Huntsman , John Stultz , Chen Feng , Mark Rutland , Laura Abbott , mitchelh@codeaurora.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a base set of devicetree bindings for the Ion memory manager. This supports setting up the generic set of heaps and their properties. Signed-off-by: Laura Abbott --- drivers/staging/android/ion/devicetree.txt | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 drivers/staging/android/ion/devicetree.txt diff --git a/drivers/staging/android/ion/devicetree.txt b/drivers/staging/android/ion/devicetree.txt new file mode 100644 index 0000000..16871527 --- /dev/null +++ b/drivers/staging/android/ion/devicetree.txt @@ -0,0 +1,51 @@ +Ion Memory Manager + +Ion is a memory manager that allows for sharing of buffers via dma-buf. +Ion allows for different types of allocation via an abstraction called +a 'heap'. A heap represents a specific type of memory. Each heap has +a different type. There can be multiple instances of the same heap +type. + +Specific heap instances are tied to heap IDs. Heap IDs are not to be specified +in the devicetree. + +Required properties for Ion + +- compatible: "linux,ion" PLUS a compatible property for the device + +All child nodes of a linux,ion node are interpreted as heaps + +required properties for heaps + +- compatible: compatible string for a heap type PLUS a compatible property +for the specific instance of the heap. Current heap types +-- linux,ion-heap-system +-- linux,ion-heap-system-contig +-- linux,ion-heap-carveout +-- linux,ion-heap-chunk +-- linux,ion-heap-dma +-- linux,ion-heap-custom + +Optional properties +- memory-region: A phandle to a memory region. Required for DMA heap type +(see reserved-memory.txt for details on the reservation) + +Example: + + ion { + compatbile = "hisilicon,ion", "linux,ion"; + + ion-system-heap { + compatbile = "hisilicon,system-heap", "linux,ion-heap-system" + }; + + ion-camera-region { + compatible = "hisilicon,camera-heap", "linux,ion-heap-dma" + memory-region = <&camera_region>; + }; + + ion-fb-region { + compatbile = "hisilicon,fb-heap", "linux,ion-heap-dma" + memory-region = <&fb_region>; + }; + }