1# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 2# 3# (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved. 4# 5# This program is free software and is provided to you under the terms of the 6# GNU General Public License version 2 as published by the Free Software 7# Foundation, and any use by you of this program is subject to the terms 8# of such GNU license. 9# 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# GNU General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with this program; if not, you can access it online at 17# http://www.gnu.org/licenses/gpl-2.0.html. 18# 19# 20 21* Arm protected memory allocator for Mali GPU device drivers 22 23Required properties: 24 25- compatible: Must be "arm,protected-memory-allocator" 26 27The protected memory allocator manages allocation of physical pages of a 28reserved memory region of protected memory, therefore its device node shall 29reference a reserved memory region. 30 31In addition to that, the protected memory allocator shall be referenced 32by the GPU. 33 34A complete example configuration for the device tree: 35 36 reserved-memory { 37 #address-cells = <2>; 38 #size-cells = <2>; 39 ranges; 40 41 mali_protected: mali_protected@c0000000 { 42 compatible = "mali-reserved"; 43 reg = <0x0 0xc0000000 0x0 0x1000000>; 44 }; 45 }; 46 47 gpu_protected_memory_allocator: protected-memory-allocator { 48 compatible = "arm,protected-memory-allocator"; 49 memory-region = <&mali_protected>; 50 }; 51 52 gpu_fpga: gpu@0x6e000000 { 53 compatible = "arm,mali-midgard"; 54 reg = <0x0 0x6e000000 0x0 0x200000>; 55 interrupts = <0 168 4>, <0 168 4>, <0 168 4>; 56 interrupt-names = "JOB", "MMU", "GPU"; 57 clocks = <&scpi_dvfs 2>; 58 clock-names = "clk_mali"; 59 protected-memory-allocator = <&gpu_protected_memory_allocator>; 60 operating-points = < 61 /* KHz uV */ 62 50000 820000 63 >; 64 }; 65 66The protected memory allocator is gpu_protected_memory_allocator. 67It references the mali_protected reserved memory region and, in turn, 68it is referenced by the GPU as protected-memory-allocator. 69