From patchwork Tue Jan 16 13:41:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devarsh Thakkar X-Patchwork-Id: 188527 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp262855dye; Tue, 16 Jan 2024 05:43:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYb9H7ZfW+g5NspZOvEP5t1f1cMkRDtjQBXcHcSkQPoanriHeOVFQ1FjtvlWi6d58hhut7 X-Received: by 2002:a17:906:3750:b0:a23:71ca:2bb4 with SMTP id e16-20020a170906375000b00a2371ca2bb4mr3471689ejc.144.1705412599937; Tue, 16 Jan 2024 05:43:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705412599; cv=none; d=google.com; s=arc-20160816; b=g2sO0osqQ78h512MWU5ENN5LIGcDJybiJnE377sjIoob3osrIP35I3gIPRuf2rwQoU uzyeLxAdkiHpmK1rd9S9B8Hdt4uJrKSqlHNfEogCQqodpOL9yCbzhOtVNsN0oqgyxqYU 3IvV3bFULwM9FIp3IB1WQo7YRRBhspV9Qazhbyn6OcGyshKJvbeYwAI6yGQ1rtgwGHwd sAbnRTgYGS7jpArvkiZdwaNH37tDMbk81pK+e480vMw4R+AbSXI/g9Q49gNk772YoTqk XuVYcvJ8oCxPbEKdNodfSdnVqWqrssuXmaCFN79h8FF9ZcfH/DtNGrJmrb7KikGKVUyh 7sLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=aZhgKfvmpDmT/vHDRDphJaSYdogh+5E+fwDnTAIZayE=; fh=bMKf9sP0kbB87X8/UkljJVrr5ldCqQ7RREn0nKqlnWo=; b=B/1qY6CcgfNdyOEeTKQzVjsFjJp0OAnPO0BGVAq+SFnfPPSxB4lHxn5ImcP9keodqv FplG1U6/qDtRyP2M1P//S1ZWtoQKfA//WiApzHaqDpKdnHO2fd0k+wcVfo/wpIn0ghKH EEAfoXci/8+Rhtx1Ku95IdS3U+2N0Ia5sbwUbHZ+Tcb2DFPcQSZM2PaJ400xeiR/jli1 blRkDIpnTcPb673r1I1HZMA3UdSFXC2Cf9f5QOY0X4O9HkLsTwKV6cw1qaJy9g7kFvC4 MqCXlX0P815IHtTzxwWa4dBNzGGAQFitugSRcG/SNTK4FKbcgdtDJ360xB7HjzrRUN6W mAqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Ce6j5P/j"; spf=pass (google.com: domain of linux-kernel+bounces-27428-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27428-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gw22-20020a170906f15600b00a27d968a6c7si4682664ejb.429.2024.01.16.05.43.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 05:43:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27428-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Ce6j5P/j"; spf=pass (google.com: domain of linux-kernel+bounces-27428-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27428-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8BB161F24166 for ; Tue, 16 Jan 2024 13:43:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D70C81BF59; Tue, 16 Jan 2024 13:42:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Ce6j5P/j" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B87EB1BF29; Tue, 16 Jan 2024 13:42:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40GDfn7v071425; Tue, 16 Jan 2024 07:41:49 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1705412509; bh=aZhgKfvmpDmT/vHDRDphJaSYdogh+5E+fwDnTAIZayE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ce6j5P/jyUuCFkwCdU7HutsJCyiCGK8AUBMRQaEtQ5Blj0HiFLNdWKEwtdblKOBSF IudktK+XbGQrTkw1NpBHyjWHGBjxK52Kb3BoYaImyxCFn5E0iAY8Kg+/NnOPo055XB D8Kur2Pwkx44nVk3T+yQTmPI+HaRU5RCnN1JUPA8= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40GDfnIA027046 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 16 Jan 2024 07:41:49 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 16 Jan 2024 07:41:48 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE111.ent.ti.com (157.170.170.22) 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; Tue, 16 Jan 2024 07:41:48 -0600 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 40GDfmRo063370; Tue, 16 Jan 2024 07:41:48 -0600 From: Devarsh Thakkar To: , , , , , , , , , , , , , , , , CC: , , , Subject: [RFC PATCH 3/3] arm64: dts: ti: k3-am62x: Add overlay to use DSS in display sharing mode Date: Tue, 16 Jan 2024 19:11:42 +0530 Message-ID: <20240116134142.2092483-4-devarsht@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240116134142.2092483-1-devarsht@ti.com> References: <20240116134142.2092483-1-devarsht@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788254722262358975 X-GMAIL-MSGID: 1788254722262358975 This overlay needs to be used with display sharing supported device manager firmware only. Remote core running this firmware has write access to "common" register space, VIDL pipeline, OVR1 overlay and VP1 videoport. The processing core running Linux is provided write access to VID pipeline and "common1" register space. The VP1 video port is shared between Linux and remote core with remote core configuring the overlay manager to set Zorder 1 for VID pipeline and Zorder 2 for VIDL pipeline. Add reserved memory region for framebuffer region used by remote core in dss shared mode overlay file so that Linux does not re-use the same while allocating memory. Also add a label for reserved memory region in base device-tree file so that it can be referred back in overlay file. Signed-off-by: Devarsh Thakkar --- arch/arm64/boot/dts/ti/Makefile | 1 + .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 2 +- .../dts/ti/k3-am62x-sk-dss-shared-mode.dtso | 33 +++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/ti/k3-am62x-sk-dss-shared-mode.dtso diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index 52c1dc910308..ff832741b367 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -35,6 +35,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-csi2-ov5640.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-csi2-tevi-ov5640.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-csi2-imx219.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-hdmi-audio.dtbo +dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-dss-shared-mode.dtbo # Boards with AM64x SoC dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi index 33768c02d8eb..8b55ca10102f 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi @@ -34,7 +34,7 @@ memory@80000000 { reg = <0x00000000 0x80000000 0x00000000 0x80000000>; }; - reserved-memory { + reserved_memory: reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-dss-shared-mode.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-dss-shared-mode.dtso new file mode 100644 index 000000000000..02153748a5c2 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-dss-shared-mode.dtso @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +/** + * DT overlay to enable display sharing mode for AM62P DSS0 + * This is compatible with custom AM62 Device Manager firmware + * + * Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include +#include + +&dss0 { + ti,dss-shared-mode; + ti,dss-shared-mode-vp = "vp1"; + ti,dss-shared-mode-vp-owned = <0>; + ti,dss-shared-mode-common = "common1"; + ti,dss-shared-mode-planes = "vid"; + ti,dss-shared-mode-plane-zorder = <0>; + interrupts = ; +}; + +&reserved_memory { + #address-cells = <2>; + #size-cells = <2>; + rtos_framebuffer_memory_region: rtos-framebuffer-memory@94800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x94800000 0x00 0x08000000>; + no-map; + }; +};