From patchwork Tue Apr 3 13:29:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10321089 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 172F760318 for ; Tue, 3 Apr 2018 13:30:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08DCA28BBF for ; Tue, 3 Apr 2018 13:30:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F184428862; Tue, 3 Apr 2018 13:30:42 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 700FD28BBB for ; Tue, 3 Apr 2018 13:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=TOL9dTPDOFpULx51yQtL9kEQXG+M6SAqZvrWrMZN9WU=; b=Bbxa9wGN7HpkeLY0BwD2Q5WOlq MXRzZKJgrPG8ixMjblC0h6XiLmCkJ8wrD0L4n6rVO+6E3YhLZIulZIjkHBqwBFCLSTaZVLzWZyFXm lMZvXJuH21U+Aqi81KS+Q1l8nVEMRFroJAb3pEjXTmNfkTzofOSmkleFFxeEP02W1eRIozfHeejrz ouIqLMp8RulJgDjZQm+78+4PQZroCTT7phMDnOMtRXBBDbNE1Z8zkF0GqhtT1YC52ThB5zZPqhCDr UvvcaHe1AVrXRIbLPZr72DGUYMlN+Q8mlezRhDz3ASmuXaJS0v9zTyfbTmMx/cqXzz83sT6fN5lLS e99lPEoQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3M18-0000lL-EL; Tue, 03 Apr 2018 13:30:30 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3M0b-0007MU-CA for linux-arm-kernel@lists.infradead.org; Tue, 03 Apr 2018 13:29:59 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 08A1720765; Tue, 3 Apr 2018 15:29:46 +0200 (CEST) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id E5D0D20879; Tue, 3 Apr 2018 15:29:22 +0200 (CEST) From: Maxime Ripard To: Mark Rutland , Rob Herring , Frank Rowand , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH 1/7] dt-bindings: Add a dma-parent property Date: Tue, 3 Apr 2018 15:29:14 +0200 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180403_062957_584885_887D7019 X-CRM114-Status: GOOD ( 15.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Thomas Petazzoni , Arnd Bergmann , dri-devel@lists.freedesktop.org, Paul Kocialkowski , Yong Deng , Robin Murphy , Dave Martin , 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 The current DT bindings assume that the DMA will be performed by the devices through their parent DT node, and rely on that assumption for the address translation using dma-ranges. However, some SoCs have devices that will perform DMA through another bus, with separate address translation rules. We therefore need to express that relationship, through the dma-parent property. Signed-off-by: Maxime Ripard --- Documentation/devicetree/booting-without-of.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt index e86bd2f64117..4a65c943c02d 100644 --- a/Documentation/devicetree/booting-without-of.txt +++ b/Documentation/devicetree/booting-without-of.txt @@ -1403,8 +1403,15 @@ In addition, each DMA master device on the DMA bus may or may not support coherent DMA operations. The "dma-coherent" property is intended to be used for identifying devices supported coherent DMA operations in DT. +Some devices will also perform DMA through another bus than their parent +control bus. In such a case, the "dma-parent" property is intended to express +that relationship to another device in DT that will be the DMA parent bus. + * DMA Bus master Optional property: +- #dma-parent-cells: + The #dma-parent-cells property defines the width of the cells used to + represent the DMA parent. - dma-ranges: encoded as arbitrary number of triplets of (child-bus-address, parent-bus-address, length). Each triplet specified describes a contiguous DMA address range. @@ -1420,6 +1427,9 @@ Optional property: - dma-ranges: value. if present - It means that DMA addresses translation has to be enabled for this device. - dma-coherent: Present if dma operations are coherent +- dma-parent: List of phandles and their optional arguments according to the + #dma-parent-cells from the provider. Expresses the routing of DMA if it + doesn't go through the parent node, but some other node in the device tree. Example: soc {