From patchwork Thu Jun 13 15:09:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devarsh Thakkar X-Patchwork-Id: 13696950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B840AC27C4F for ; Thu, 13 Jun 2024 15:09:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=z3xwUJd1/KvLc1DEmjhfHhBuoHwF+UuatILAA85VS3E=; b=Qx+/uHxhyj/CW8yMlwB+xsBXS7 o8FeLKn+16URAzQy8uG6xLTSEaftXaz3SxnLI7tdauY/gS5tE/CPp3sCvInxLpNK6VWnY2D+3FXHm RUrsCAvJTFQYnhL1SYkEOcbILYupV1z/x94Wwvnn2EINn0vCmhpuaYuLgw8mXCRmxDyjDCX16KeuY Oi7G4esB9BBtrG7oBQn79cDv8YuZZCZR6hh+jg2NflcG5Eygwfi31Rstin3KOuR1/RR/8HIslBKlc u2mN42a0l5MPdscwVEBC8SQUqNDQWTuQtS2gYdb1kTfTL30bVsIbQpuZQ9wIffFc/YfskS4XE+AeW llynW0uw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHm4n-0000000H5h4-2s3w; Thu, 13 Jun 2024 15:09:21 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHm4e-0000000H5eN-0eOD for linux-arm-kernel@lists.infradead.org; Thu, 13 Jun 2024 15:09:13 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45DF97tc109712; Thu, 13 Jun 2024 10:09:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718291347; bh=z3xwUJd1/KvLc1DEmjhfHhBuoHwF+UuatILAA85VS3E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=VRm0sqNobJDAspZjsO8gg/HB3346ZnoGS5LPi9ThRPojJq1ZTqbpJQaE1pkKnjILv aSCBqTQJ74ETvUqYNsO5YvOc89xAAWw9k3VeywqNG5LRSVK0SzSPffgxnQBxvfaKmV IAWmwIoYAyiisuHpm+o60pPrPVjfGk+qWYueAXJY= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45DF979t044626 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Jun 2024 10:09:07 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 13 Jun 2024 10:09:06 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 13 Jun 2024 10:09:07 -0500 Received: from localhost (ti.dhcp.ti.com [172.24.227.95] (may be forged)) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 45DF96ES020847; Thu, 13 Jun 2024 10:09:06 -0500 From: Devarsh Thakkar To: , , , , , , , , CC: , , , , , , , Subject: [PATCH 2/3] arm64: dts: ti: k3-am62a7-sk: Reserve 576MiB of global CMA Date: Thu, 13 Jun 2024 20:39:01 +0530 Message-ID: <20240613150902.2173582-3-devarsht@ti.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240613150902.2173582-1-devarsht@ti.com> References: <20240613150902.2173582-1-devarsht@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240613_080912_356410_E7BC8C56 X-CRM114-Status: GOOD ( 10.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Reserve 576MiB of CMA as global CMA pool starting after initial 1GiB of DDR. AM62ax has different multimedia components such as Camera, Display, H.264 VPU and JPEG Encoder which use CMA for buffer allocations. The 12x 720x480 realtime VPU decode use-case requires 544MiB of CMA, additional 32MiB is kept as buffer in case some other peripheral also require it while VPU is running. The reason to choose latter 1GiB is to not overlap with existing memory map which is utilizing initial 1GiB for remoteproc firmwares as shared here [1]. Also some drivers such as JPEG require 32bit addressing so not allocating from higher DDR address. Link: https://lore.kernel.org/all/20240605124859.3034-5-hnagalla@ti.com [1] Signed-off-by: Devarsh Thakkar Tested-by: Brandon Brnich --- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts index e026f65738b3..67faf46d7a35 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -40,6 +40,15 @@ reserved-memory { #size-cells = <2>; ranges; + /* global cma region */ + linux,cma { + compatible = "shared-dma-pool"; + reusable; + size = <0x00 0x24000000>; + alloc-ranges = <0x00 0xc0000000 0x00 0x24000000>; + linux,cma-default; + }; + secure_tfa_ddr: tfa@9e780000 { reg = <0x00 0x9e780000 0x00 0x80000>; alignment = <0x1000>;