From patchwork Tue Apr 3 13:29:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10321101 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 08C1C60532 for ; Tue, 3 Apr 2018 13:34:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDACE28971 for ; Tue, 3 Apr 2018 13:34:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1A0F28AD4; Tue, 3 Apr 2018 13:34:20 +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 530A428971 for ; Tue, 3 Apr 2018 13:34:20 +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=+YBLtMg0FG9dptPAKWMaQuEifOucT86nJPHarfUb1Tg=; b=cIBADNrIerJw/vAGHUTw0g6UJi HmaR2LqCn+saK2cYt9ZecR6A3HLrzyaz347+hpQy7cVRX/+rEWh5snkHxvrbwrtsSNkHO3EspNdCW 2U1MVyJh8BIBqiLaTyZ2Q/v44R9htszjTRhqfuhT/iqZKRjEqTsWSdwloY/vBXyi1Q0/4lSBd1W4h IDB/rIZbp+1Z3gM/2VviUrUGJNfGmNPlqGe8ii3ZtzfhKBZbozH8qGAwItuSoIBaKNpLlr7EYDOj1 3qO2R05TE3q5yPa+xQlGJb6/+jNVff/0yGbASfLC4aD7qoGHh7l1TJkJ3Z3+U5tccJv0wJpVWUAZ9 mM5mM3hQ==; 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 1f3M4f-0002w5-1q; Tue, 03 Apr 2018 13:34:09 +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 1f3M0o-0007OL-0K for linux-arm-kernel@lists.infradead.org; Tue, 03 Apr 2018 13:30:13 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id A6B0D208A8; Tue, 3 Apr 2018 15:29:56 +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 4EA03208B0; Tue, 3 Apr 2018 15:29:25 +0200 (CEST) From: Maxime Ripard To: Mark Rutland , Rob Herring , Frank Rowand , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH 7/7] ARM: dts: sun5i: Add the MBUS controller Date: Tue, 3 Apr 2018 15:29:20 +0200 Message-Id: <986c038c8ad248fdce8a7f7d514e0b8411ccd0cc.1522761929.git-series.maxime.ripard@bootlin.com> 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_063010_232532_4F0E76D4 X-CRM114-Status: GOOD ( 12.97 ) 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 MBUS (and its associated controller) is the bus in the Allwinner SoCs that DMA devices use in the system to access the memory. Among other things (and depending on the SoC generation), it can also enforce priorities or report bandwidth usages on a per-master basis. One of the most notable thing is that instead of having the same mapping for the RAM than the CPU, it maps it at address 0, which means we'll have to do address translation thanks to the dma-ranges property. Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun5i.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi index 07f2248ed5f8..acb24e537e0b 100644 --- a/arch/arm/boot/dts/sun5i.dtsi +++ b/arch/arm/boot/dts/sun5i.dtsi @@ -112,6 +112,7 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; + dma-ranges; ranges; sram-controller@1c00000 { @@ -150,6 +151,14 @@ }; }; + mbus: dram-controller@1c01000 { + compatible = "allwinner,sun5i-a13-mbus"; + reg = <0x01c01000 0x1000>; + clocks = <&ccu CLK_MBUS>; + dma-ranges = <0x00000000 0x40000000 0x20000000>; + #dma-parent-cells = <1>; + }; + dma: dma-controller@1c02000 { compatible = "allwinner,sun4i-a10-dma"; reg = <0x01c02000 0x1000>; @@ -677,6 +686,7 @@ clock-names = "ahb", "mod", "ram"; resets = <&ccu RST_DE_FE>; + dma-parent = <&mbus 19>; status = "disabled"; ports { @@ -705,6 +715,7 @@ clock-names = "ahb", "mod", "ram"; resets = <&ccu RST_DE_BE>; + dma-parent = <&mbus 18>; status = "disabled"; assigned-clocks = <&ccu CLK_DE_BE>;