From patchwork Thu Apr 19 15:45:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10351135 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 1D0DA602B7 for ; Thu, 19 Apr 2018 15:54:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DC8C28A2E for ; Thu, 19 Apr 2018 15:54:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 024EE28A3E; Thu, 19 Apr 2018 15:54: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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable 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 5214128A40 for ; Thu, 19 Apr 2018 15:54:00 +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=+kEbWV/rCbZWD1nSZJjjWBXXS2e86vqOvLO0erBX+GI=; b=rJjKhIHwq1cl0AepdGvG7RJ1MF 0R5fGy24pCCIQLgnugx89XSfA8xOpBcqAp1u7fNWz2KFZbRDrJgS2weHayk10CU+ai6l449ge3O2r nLYlT2wXyLEjnM5Vad39BXCexRdiKs6eOuV75PfDuzeZPMUOOttQO+jtp6KpOoEHQP7RBVVceQ713 QeBycBpkHi5JeoDQzfvA5AIhqqzS+3NPDH4WupqY+QDPjw0uhV6+MTLd6guIT9bXlow0Nz3Wwp9C3 e+MqsUg35d7xNpMOduX5DUVAUNRN4Q3k9FlvY+U4EeJMnQ5eSn/WsNGtLbH6/H5C2pbPttG+OiYUK yq2OGZ3A==; 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 1f9BsZ-00040t-4q; Thu, 19 Apr 2018 15:53:47 +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 1f9BmT-0000Bh-NV for linux-arm-kernel@lists.infradead.org; Thu, 19 Apr 2018 15:47:46 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 69F84208C0; Thu, 19 Apr 2018 17:46:57 +0200 (CEST) Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id EEB7320894; Thu, 19 Apr 2018 17:46:56 +0200 (CEST) From: Paul Kocialkowski To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v2 10/10] ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes Date: Thu, 19 Apr 2018 17:45:36 +0200 Message-Id: <20180419154536.17846-6-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180419154124.17512-1-paul.kocialkowski@bootlin.com> References: <20180419154124.17512-1-paul.kocialkowski@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180419_084729_980508_FFED9060 X-CRM114-Status: GOOD ( 15.05 ) 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: Mark Rutland , Philipp Zabel , Pawel Osciak , Maxime Ripard , Kyungmin Park , Tomasz Figa , Paul Kocialkowski , Chen-Yu Tsai , Rob Herring , Hans Verkuil , Alexandre Courbot , Sakari Ailus , Mauro Carvalho Chehab , Arnd Bergmann , Marek Szyprowski 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 nodes for the Video Engine and the associated reserved memory for the Allwinner A33. Up to 96 MiB of memory are dedicated to the VPU. The VPU can only map the first 256 MiB of DRAM, so the reserved memory pool has to be located in that area. Following Allwinner's decision in downstream software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun8i-a33.dtsi | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi index a21f2ed07a52..308b532aee1d 100644 --- a/arch/arm/boot/dts/sun8i-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a33.dtsi @@ -181,6 +181,20 @@ reg = <0x40000000 0x80000000>; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + /* Address must be kept in the lower 256 MiBs of DRAM for VE. */ + ve_memory: cma@4a000000 { + compatible = "shared-dma-pool"; + reg = <0x4a000000 0x6000000>; + no-map; + linux,cma-default; + }; + }; + sound: sound { compatible = "simple-audio-card"; simple-audio-card,name = "sun8i-a33-audio"; @@ -204,6 +218,11 @@ }; soc@1c00000 { + syscon: system-controller@01c00000 { + compatible = "allwinner,sun8i-a33-syscon", "syscon"; + reg = <0x01c00000 0x1000>; + }; + tcon0: lcd-controller@1c0c000 { compatible = "allwinner,sun8i-a33-tcon"; reg = <0x01c0c000 0x1000>; @@ -240,6 +259,25 @@ }; }; + ve: video-engine@01c0e000 { + compatible = "allwinner,sun4i-a10-video-engine"; + memory-region = <&ve_memory>; + syscon = <&syscon>; + + clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>, + <&ccu CLK_DRAM_VE>; + clock-names = "ahb", "mod", "ram"; + + assigned-clocks = <&ccu CLK_VE>; + assigned-clock-rates = <320000000>; + + resets = <&ccu RST_BUS_VE>; + + interrupts = ; + + reg = <0x01c0e000 0x1000>; + }; + crypto: crypto-engine@1c15000 { compatible = "allwinner,sun4i-a10-crypto"; reg = <0x01c15000 0x1000>;