Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76112dd4 authored by Sachin Shah's avatar Sachin Shah
Browse files

ARM: dts: msm: Add video device and iommu domains for msm8909



Video driver needs this information to work correctly.
Add venus iommu domains which allows both iommu and
venus driver to access shared domain info.

Change-Id: I708b6e93bd5d2382469632a61364b4bc2cb13e33
Signed-off-by: default avatarSachin Shah <sachins@codeaurora.org>
parent c5564588
Loading
Loading
Loading
Loading
+53 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

&soc {
	qcom,iommu-domains {
		compatible = "qcom,iommu-domains";

		/*
		 * non-secure addr pool from 1500 MB to 3532 MB
		 *                           3532 MB to 3548 MB
		 */
		venus_domain_ns: qcom,iommu-domain1 {
			label = "venus_ns";
			qcom,iommu-contexts = <&venus_ns>;
			qcom,virtual-addr-pool = <0x5dc00000 0x7f000000
						  0xdcc00000 0x1000000>;
		};

		/* secure bitstream addr pool from 1200 MB to 1500 MB */
		venus_domain_sec_bitstream: qcom,iommu-domain2 {
			label = "venus_sec_bitstream";
			qcom,iommu-contexts = <&venus_sec_bitstream>;
			qcom,virtual-addr-pool = <0x4b000000 0x12c00000>;
			qcom,secure-domain;
		};

		/* secure pixel addr pool from 616 MB to 1200 MB */
		venus_domain_sec_pixel: qcom,iommu-domain3 {
			label = "venus_sec_pixel";
			qcom,iommu-contexts = <&venus_sec_pixel>;
			qcom,virtual-addr-pool = <0x25800000 0x25800000>;
			qcom,secure-domain;
		};

		/* secure non-pixel addr pool from 16 MB to 616 MB */
		venus_domain_sec_non_pixel: qcom,iommu-domain4 {
			label = "venus_sec_non_pixel";
			qcom,iommu-contexts = <&venus_sec_non_pixel>;
			qcom,virtual-addr-pool = <0x1000000 0x24800000>;
			qcom,secure-domain;
		};

	};
};
+46 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@
#include "msm8909-ipcrouter.dtsi"
#include "msm-gdsc-8916.dtsi"
#include "msm8909-iommu.dtsi"
#include "msm8909-iommu-domains.dtsi"
#include "msm8909-gpu.dtsi"
#include "msm8909-coresight.dtsi"
#include "msm8909-bus.dtsi"
@@ -399,6 +400,51 @@
		qcom,num-locks = <8>;
	};

	msm_vidc: qcom,vidc@1d00000 {
		compatible = "qcom,msm-vidc";
		reg = <0x01d00000 0xff000>;
		interrupts = <0 44 0>;
		venus-supply = <&gdsc_venus>;
		clocks = <&clock_gcc clk_gcc_venus0_vcodec0_clk>,
			 <&clock_gcc clk_gcc_venus0_ahb_clk>,
			 <&clock_gcc clk_gcc_venus0_axi_clk>;
		clock-names = "core_clk", "iface_clk", "bus_clk";
		qcom,clock-names = "core_clk", "iface_clk", "bus_clk";
		qcom,clock-configs = <0x1 0x0 0x0>;
		qcom,sw-power-collapse;
		qcom,load-freq-tbl =
			<244800 266670000 0xffffffff>, /* 1080p@30 Decode */
			<244800 300000000 0x55555555>, /* 1080p@30 Encode */
			<144000 266670000 0x55555555>, /* VGA@60 X 2 */
			<108000 133330000 0xffffffff>, /* 720p@30 Decode */
			<54000 133330000 0x55555555>; /* HVGA@90 Encode */
		qcom,hfi = "venus";
		qcom,reg-presets = <0x80124 0x00000003>;
		qcom,buffer-type-tz-usage-table = <0x241 0x1>,
			<0x106 0x2>,
			<0x480 0x3>;
		qcom,max-hw-load = <244800>; /* 1080p @ 30 */
		qcom,vidc-iommu-domains {
			qcom,domain-ns {
				qcom,vidc-domain-phandle = <&venus_domain_ns>;
				qcom,vidc-partition-buffer-types = <0x7ff>,
							<0x800>;
			};
			qcom,domain-sec-bs {
				qcom,vidc-domain-phandle = <&venus_domain_sec_bitstream>;
				qcom,vidc-partition-buffer-types = <0x241>;
			};
			qcom,domain-sec-px {
				qcom,vidc-domain-phandle = <&venus_domain_sec_pixel>;
				qcom,vidc-partition-buffer-types = <0x106>;
			};
			qcom,domain-sec-np {
				qcom,vidc-domain-phandle = <&venus_domain_sec_non_pixel>;
				qcom,vidc-partition-buffer-types = <0x480>;
			};
		};
	};

	qcom,smem@86300000 {
		compatible = "qcom,smem";
		reg = <0x86300000 0x100000>,