LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Chen-Yu Tsai <wens@csie.org>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"David S . Miller" <davem@davemloft.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>,
	Yannick Fertre <yannick.fertre@st.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Hugues Fruchet <hugues.fruchet@st.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	Florent Revest <florent.revest@free-electrons.com>,
	Tomasz Figa <tfiga@chromium.org>,
	Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>,
	Smitha T Murthy <smitha.t@samsung.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Randy Li <ayaka@soulik.info>
Subject: [PATCH v3 13/14] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes
Date: Mon,  7 May 2018 14:44:59 +0200	[thread overview]
Message-ID: <20180507124500.20434-14-paul.kocialkowski@bootlin.com> (raw)
In-Reply-To: <20180507124500.20434-1-paul.kocialkowski@bootlin.com>

This adds nodes for the Video Engine and the associated reserved memory
for the A20. Up to 96 MiB of memory are dedicated to the CMA pool.

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 <paul.kocialkowski@bootlin.com>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 9bb6c35fb850..5fccccff469b 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -161,6 +161,21 @@
 		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. */
+		cma_pool: cma@4a000000 {
+			compatible = "shared-dma-pool";
+			size = <0x6000000>;
+			alloc-ranges = <0x4a000000 0x6000000>;
+			reusable;
+			linux,cma-default;
+		};
+	};
+
 	timer {
 		compatible = "arm,armv7-timer";
 		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
@@ -463,6 +478,22 @@
 			};
 		};
 
+		vpu: video-codec@1c0e000 {
+			compatible = "allwinner,sun7i-a20-video-engine";
+			reg = <0x01c0e000 0x1000>;
+
+			clocks = <&ccu CLK_AHB_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_VE>;
+			interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+			allwinner,sram = <&ve_sram 1>;
+		};
+
 		mmc0: mmc@1c0f000 {
 			compatible = "allwinner,sun7i-a20-mmc";
 			reg = <0x01c0f000 0x1000>;
-- 
2.16.3

  parent reply	other threads:[~2018-05-07 12:44 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 12:44 [PATCH v3 00/14] Sunxi-Cedrus driver for the Allwinner Video Engine, using media requests Paul Kocialkowski
2018-05-07 12:44 ` [PATCH v3 01/14] drivers: soc: sunxi: Add support for the C1 SRAM region Paul Kocialkowski
2018-05-07 12:44 ` [PATCH v3 02/14] drivers: soc: sunxi: Add dedicated compatibles for the A13, A20 and A33 Paul Kocialkowski
2018-05-11  5:05   ` Chen-Yu Tsai
2018-05-11 10:20     ` Maxime Ripard
2018-06-14 13:02       ` Paul Kocialkowski
2018-05-07 12:44 ` [PATCH v3 03/14] ARM: dts: sun5i: Use dedicated SRAM controller compatible Paul Kocialkowski
2018-05-07 12:44 ` [PATCH v3 04/14] ARM: dts: sun7i-a20: " Paul Kocialkowski
2018-05-07 12:44 ` [PATCH v3 05/14] ARM: sun5i: Add support for the C1 SRAM region with the SRAM controller Paul Kocialkowski
2018-05-07 12:44 ` [PATCH v3 06/14] ARM: sun7i-a20: " Paul Kocialkowski
2018-05-07 12:44 ` [PATCH v3 07/14] ARM: sun8i-a33: Add SRAM controller node and C1 SRAM region Paul Kocialkowski
2018-05-07 12:44 ` [PATCH v3 08/14] media: v4l: Add definitions for MPEG2 frame format and header metadata Paul Kocialkowski
2018-05-07 13:49   ` Hans Verkuil
2018-05-07 13:52     ` Paul Kocialkowski
2018-05-17  4:00   ` kbuild test robot
2018-05-07 12:44 ` [PATCH v3 09/14] media: v4l: Add definition for Allwinner's MB32-tiled NV12 format Paul Kocialkowski
2018-05-07 13:50   ` Hans Verkuil
2018-05-07 12:44 ` [PATCH v3 10/14] dt-bindings: media: Document bindings for the Sunxi-Cedrus VPU driver Paul Kocialkowski
2018-05-07 14:18   ` Rob Herring
2018-05-07 12:44 ` [PATCH v3 11/14] media: platform: Add Sunxi-Cedrus VPU decoder driver Paul Kocialkowski
2018-05-07 14:02   ` Hans Verkuil
2018-06-14 15:47     ` Paul Kocialkowski
2018-05-07 15:42   ` Maxime Ripard
2018-06-14 15:39     ` Paul Kocialkowski
2018-05-07 18:03   ` kbuild test robot
2018-05-07 12:44 ` [PATCH v3 12/14] ARM: dts: sun5i: Add Video Engine and reserved memory nodes Paul Kocialkowski
2018-05-07 12:44 ` Paul Kocialkowski [this message]
2018-05-07 12:45 ` [PATCH v3 14/14] ARM: dts: sun8i-a33: " Paul Kocialkowski
2018-05-07 14:50 ` [PATCH v3 00/14] Sunxi-Cedrus driver for the Allwinner Video Engine, using media requests Paul Kocialkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180507124500.20434-14-paul.kocialkowski@bootlin.com \
    --to=paul.kocialkowski@bootlin.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=ayaka@soulik.info \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=florent.revest@free-electrons.com \
    --cc=gnurou@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hans.verkuil@cisco.com \
    --cc=hugues.fruchet@st.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=ramesh.shanmugasundaram@bp.renesas.com \
    --cc=rdunlap@infradead.org \
    --cc=ricardo.ribalda@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=smitha.t@samsung.com \
    --cc=stanimir.varbanov@linaro.org \
    --cc=tfiga@chromium.org \
    --cc=tglx@linutronix.de \
    --cc=wens@csie.org \
    --cc=yannick.fertre@st.com \
    --subject='Re: [PATCH v3 13/14] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).