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

Commit a1ee786c authored by Vijayanand Jitta's avatar Vijayanand Jitta Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Add memory map and ion heap changes for sdm670



Add carveout memory regions for other processors as well as for
CMA and other contiguous memory usecases and add ion heaps to
allow clients to allocate memory from ion.

Change-Id: Id4cf670f9ae12e38a83e58f17a597cd243cd4f77
Signed-off-by: default avatarVijayanand Jitta <vjitta@codeaurora.org>
parent 3ff1b082
Loading
Loading
Loading
Loading
+53 −0
Original line number Diff line number Diff line
/* Copyright (c) 2017, 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,ion {
		compatible = "qcom,msm-ion";
		#address-cells = <1>;
		#size-cells = <0>;

		system_heap: qcom,ion-heap@25 {
			reg = <25>;
			qcom,ion-heap-type = "SYSTEM";
		};

		qcom,ion-heap@22 { /* ADSP HEAP */
			reg = <22>;
			memory-region = <&adsp_mem>;
			qcom,ion-heap-type = "DMA";
		};

		qcom,ion-heap@27 { /* QSEECOM HEAP */
			reg = <27>;
			memory-region = <&qseecom_mem>;
			qcom,ion-heap-type = "DMA";
		};

		qcom,ion-heap@13 { /* SPSS HEAP */
			reg = <13>;
			memory-region = <&sp_mem>;
			qcom,ion-heap-type = "DMA";
		};

		qcom,ion-heap@10 { /* SECURE DISPLAY HEAP */
			reg = <10>;
			memory-region = <&secure_display_memory>;
			qcom,ion-heap-type = "HYP_CMA";
		};

		qcom,ion-heap@9 {
			reg = <9>;
			qcom,ion-heap-type = "SYSTEM_SECURE";
		};
	};
};
+104 −0
Original line number Diff line number Diff line
@@ -279,9 +279,113 @@
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		removed_regions: removed_regions@85700000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x85700000 0 0x3800000>;
		};

		pil_camera_mem: camera_region@8ab00000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x8ab00000 0 0x500000>;
		};

		pil_modem_mem: modem_region@8b000000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x8b000000 0 0x7e00000>;
		};

		pil_video_mem: pil_video_region@92e00000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x92e00000 0 0x500000>;
		};

		pil_cdsp_mem: cdsp_regions@93300000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x93300000 0 0x600000>;
		};

		pil_mba_mem: pil_mba_region@0x93900000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x93900000 0 0x200000>;
		};

		pil_adsp_mem: pil_adsp_region@93b00000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x93b00000 0 0x1e00000>;
		};

		pil_ipa_fw_mem: pil_ipa_fw_region@95900000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x95900000 0 0x10000>;
		};

		pil_ipa_gsi_mem: pil_ipa_gsi_region@95910000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x95910000 0 0x5000>;
		};

		pil_gpu_mem: pil_gpu_region@95915000 {
			compatible = "removed-dma-pool";
			no-map;
			reg = <0 0x95915000 0 0x1000>;
		};

		adsp_mem: adsp_region {
			compatible = "shared-dma-pool";
			alloc-ranges = <0 0x00000000 0 0xffffffff>;
			reusable;
			alignment = <0 0x400000>;
			size = <0 0xc00000>;
		};

		qseecom_mem: qseecom_region {
			compatible = "shared-dma-pool";
			alloc-ranges = <0 0x00000000 0 0xffffffff>;
			reusable;
			alignment = <0 0x400000>;
			size = <0 0x1400000>;
		};

		sp_mem: sp_region {  /* SPSS-HLOS ION shared mem */
			compatible = "shared-dma-pool";
			alloc-ranges = <0 0x00000000 0 0xffffffff>; /* 32-bit */
			reusable;
			alignment = <0 0x400000>;
			size = <0 0x800000>;
		};

		secure_display_memory: secure_display_region {
			compatible = "shared-dma-pool";
			alloc-ranges = <0 0x00000000 0 0xffffffff>;
			reusable;
			alignment = <0 0x400000>;
			size = <0 0x5c00000>;
		};

		/* global autoconfigured region for contiguous allocations */
		linux,cma {
			compatible = "shared-dma-pool";
			alloc-ranges = <0 0x00000000 0 0xffffffff>;
			reusable;
			alignment = <0 0x400000>;
			size = <0 0x2000000>;
			linux,cma-default;
		};
	};
};

#include "sdm670-ion.dtsi"

&soc {
	#address-cells = <1>;
	#size-cells = <1>;