From patchwork Thu Oct 3 06:59:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fei Shao X-Patchwork-Id: 13820696 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 333F6CF855A for ; Thu, 3 Oct 2024 07:08:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:To:From:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x3JpBIk+dizy5e9goqMv92qE1UL5hLhhWiLghC/pf7k=; b=O700UHo8d73uyX 2HySkybKzbpVL2hQ34eswjhxAhp3B5apnD7Ddjkd1PDD9bokQ3Ir0UF7rndC3y5ICAfOyqLboYk+9 M0+xmMEva2AcqPnubioz/YetLhef7qa2/209U4vAj3af9cGlusy53KIfExrlxXnjQKeG5rZeHnZv0 tI08TKyez1ZRLrqkm54rTVwioh1Dr/hyl+6mLxD6i1OrPcoSFhG62t8frFvzWMJ9mXejctPvj04+7 fRJScGUjBEwCfonPED6H+o2nLJrnmTc7+gd9D87vW1MANmncOqR8x25518GHvbFWZoJF6IEazp99z zBIC9ZiQxsKSeh5U3eKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swFwQ-00000008Ldj-3o20; Thu, 03 Oct 2024 07:08:02 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1swFqY-00000008KUG-1pRx for linux-mediatek@lists.infradead.org; Thu, 03 Oct 2024 07:01:59 +0000 Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-710daaadd9bso323526a34.2 for ; Thu, 03 Oct 2024 00:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727938917; x=1728543717; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x3JpBIk+dizy5e9goqMv92qE1UL5hLhhWiLghC/pf7k=; b=mEPWDg/Z+9jkcCTHw94wxnL5IvQXydDjtmY/tNQ1vXy65I7eL6h2H/fmA5IsBEczck zImZKclv5TpO1mYCWPvVMRO4LMSUwmKWeHXS8bgCZfApNP4ZsoiFXH5cWPMlfj2vm608 ohHJi1QJ3GlfoUPHfIQ3bycPd6c4SyPGSZoBY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727938917; x=1728543717; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x3JpBIk+dizy5e9goqMv92qE1UL5hLhhWiLghC/pf7k=; b=uviHiGZ8L8hbZpMMz06Cy7zvLkLr+MvN7o5p7f8mTrZknzSsxeZ3T75iAEqtM5Z8A3 rjmWNqezqOkZHWHcQKtchwmw432LqqBX15WV+uXG3+rfDaBdeqmVRRFbdbHtTIsRcvEq gRcUIcuu6gnMUYoXYDiAIKnCRDs5fTMfUluu8k4ukTv4GyaZYHT2smuAqQtxitwoAlsI 3AeC8MhFfbiQl6hNYM/TyC5XbCDg9xOTyDq815qrjx1hYTAqd6Gedc5pgpPKh8PoGedJ fUUcRF1WexROIkqmpa8933u8f7qzRZcvmz5E/s+x7MWhtytlJLR3z9SOQCYdI0dmPBdD dn2g== X-Forwarded-Encrypted: i=1; AJvYcCVcmCvE0UaS9neuIxzgiEP30Y4qDmZw5VGFA30/8Ci4cOyNMz8u2q0g/euD9E8ufZZ8pHoUd0PfHZuWgIMkVA==@lists.infradead.org X-Gm-Message-State: AOJu0YxtM20T7rndmxdw5q5BTlL2O6qh4kqdR7wT4lGgoBNaqCfY91E5 Y8E9q3/3QjBl3mmEU+taR54DuJwDGjxZPCYUKriTSQjioJ1ud3dP0P0cPYjnsw== X-Google-Smtp-Source: AGHT+IFha9Fj/OXST1rmXZUQpjR/6jvkkRdPdpqAlTCawnloKZPpCJkNTYsOHYUG1EKOL7N+SHqhUg== X-Received: by 2002:a05:6808:13c3:b0:3e3:9f31:c8cc with SMTP id 5614622812f47-3e3b4181612mr4830531b6e.47.1727938917115; Thu, 03 Oct 2024 00:01:57 -0700 (PDT) Received: from fshao-p620.tpe.corp.google.com ([2401:fa00:1:10:3bd0:d371:4a25:3576]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71dd9d8e473sm633782b3a.81.2024.10.03.00.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 00:01:56 -0700 (PDT) From: Fei Shao To: AngeloGioacchino Del Regno , Matthias Brugger Subject: [PATCH v2 4/9] arm64: dts: mediatek: mt8188: Add video decoder and encoder nodes Date: Thu, 3 Oct 2024 14:59:58 +0800 Message-ID: <20241003070139.1461472-5-fshao@chromium.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20241003070139.1461472-1-fshao@chromium.org> References: <20241003070139.1461472-1-fshao@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241003_000158_487111_DCB65C9B X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add video decoder and encoder nodes for hardware-accelerated video decoding and encoding support. Signed-off-by: Fei Shao --- (no changes since v1) arch/arm64/boot/dts/mediatek/mt8188.dtsi | 83 ++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts/mediatek/mt8188.dtsi index 719d2409a7db..49d4180595a9 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi @@ -2183,6 +2183,64 @@ ccusys: clock-controller@17200000 { #clock-cells = <1>; }; + video_decoder: video-decoder@18000000 { + compatible = "mediatek,mt8188-vcodec-dec"; + reg = <0 0x18000000 0 0x1000>, <0 0x18004000 0 0x1000>; + ranges = <0 0 0 0x18000000 0 0x26000>; + iommus = <&vpp_iommu M4U_PORT_L23_HW_VDEC_UFO_ENC_EXT>; + #address-cells = <2>; + #size-cells = <2>; + mediatek,scp = <&scp>; + + video-codec@10000 { + compatible = "mediatek,mtk-vcodec-lat"; + reg = <0 0x10000 0 0x800>; + assigned-clocks = <&topckgen CLK_TOP_VDEC>; + assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D6>; + clocks = <&topckgen CLK_TOP_VDEC>, + <&vdecsys_soc CLK_VDEC1_SOC_VDEC>, + <&vdecsys_soc CLK_VDEC1_SOC_LAT>, + <&topckgen CLK_TOP_UNIVPLL_D6>; + clock-names = "sel", "vdec", "lat", "top"; + interrupts = ; + iommus = <&vpp_iommu M4U_PORT_L23_HW_VDEC_LAT0_VLD_EXT>, + <&vpp_iommu M4U_PORT_L23_HW_VDEC_LAT0_VLD2_EXT>, + <&vpp_iommu M4U_PORT_L23_HW_VDEC_LAT0_AVC_MV_EXT>, + <&vpp_iommu M4U_PORT_L23_HW_VDEC_LAT0_PRED_RD_EXT>, + <&vpp_iommu M4U_PORT_L23_HW_VDEC_LAT0_TILE_EXT>, + <&vpp_iommu M4U_PORT_L23_HW_VDEC_LAT0_WDMA_EXT>, + <&vpp_iommu M4U_PORT_L23_HW_VDEC_UFO_ENC_EXT>, + <&vpp_iommu M4U_PORT_L23_HW_VDEC_UFO_ENC_EXT_C>, + <&vpp_iommu M4U_PORT_L23_HW_VDEC_MC_EXT_C>; + power-domains = <&spm MT8188_POWER_DOMAIN_VDEC0>; + }; + + video-codec@25000 { + compatible = "mediatek,mtk-vcodec-core"; + reg = <0 0x25000 0 0x1000>; + assigned-clocks = <&topckgen CLK_TOP_VDEC>; + assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D6>; + clocks = <&topckgen CLK_TOP_VDEC>, + <&vdecsys CLK_VDEC2_VDEC>, + <&vdecsys CLK_VDEC2_LAT>, + <&topckgen CLK_TOP_UNIVPLL_D6>; + clock-names = "sel", "vdec", "lat", "top"; + interrupts = ; + iommus = <&vdo_iommu M4U_PORT_L21_HW_VDEC_MC_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_UFO_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_PP_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_PRED_RD_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_PRED_WR_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_PPWRAP_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_TILE_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_VLD_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_VLD2_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_AVC_MV_EXT>, + <&vdo_iommu M4U_PORT_L21_HW_VDEC_UFO_EXT_C>; + power-domains = <&spm MT8188_POWER_DOMAIN_VDEC1>; + }; + }; + larb23: smi@1800d000 { compatible = "mediatek,mt8188-smi-larb"; reg = <0 0x1800d000 0 0x1000>; @@ -2234,6 +2292,31 @@ larb19: smi@1a010000 { mediatek,smi = <&vdo_smi_common>; }; + video_encoder: video-encoder@1a020000 { + compatible = "mediatek,mt8188-vcodec-enc"; + reg = <0 0x1a020000 0 0x10000>; + #address-cells = <2>; + #size-cells = <2>; + assigned-clocks = <&topckgen CLK_TOP_VENC>; + assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D4>; + clocks = <&vencsys CLK_VENC1_VENC>; + clock-names = "venc_sel"; + interrupts = ; + iommus = <&vdo_iommu M4U_PORT_L19_VENC_RCPU>, + <&vdo_iommu M4U_PORT_L19_VENC_REC>, + <&vdo_iommu M4U_PORT_L19_VENC_BSDMA>, + <&vdo_iommu M4U_PORT_L19_VENC_SV_COMV>, + <&vdo_iommu M4U_PORT_L19_VENC_RD_COMV>, + <&vdo_iommu M4U_PORT_L19_VENC_CUR_LUMA>, + <&vdo_iommu M4U_PORT_L19_VENC_CUR_CHROMA>, + <&vdo_iommu M4U_PORT_L19_VENC_REF_LUMA>, + <&vdo_iommu M4U_PORT_L19_VENC_REF_CHROMA>, + <&vdo_iommu M4U_PORT_L19_VENC_SUB_W_LUMA>, + <&vdo_iommu M4U_PORT_L19_VENC_SUB_R_LUMA>; + power-domains = <&spm MT8188_POWER_DOMAIN_VENC>; + mediatek,scp = <&scp>; + }; + disp_dsi: dsi@1c008000 { compatible = "mediatek,mt8188-dsi"; reg = <0 0x1c008000 0 0x1000>;