linux-postmarketos-mediatek-mt8183: add support for video decoder (MR 4093)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Anton Bambura 2023-05-18 14:40:30 +03:00
parent 6d72b33b41
commit 68a3bf8610
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 90 additions and 1 deletions

View file

@ -3,7 +3,7 @@
# Based on https://github.com/hexdump0815/linux-mainline-mediatek-mt81xx-kernel
pkgname=linux-postmarketos-mediatek-mt8183
pkgver=6.1.28
pkgrel=0
pkgrel=1
pkgdesc="Mainline kernel for mediatek mt8183"
arch="aarch64"
_flavor="${pkgname#linux-}"
@ -51,6 +51,7 @@ source="
07-1-2-arm64-dts-mt8183-Add-kukui-jacuzzi-cerise-board.patch
08-2-2-dt-bindings-arm64-dts-mediatek-Add-mt8183-kukui-jacuzzi-cerise.patch
09-add-new-dtbs-to-makefile.patch
CHROMIUM-ARM64-dts-add-vdec-venc-h264-dtsi.patch
mt8183-cadmium-kukui.enable-ite.patch
mt8183-fix-audio-module-loading.patch
mt8183-fix-bluetooth.patch
@ -101,6 +102,7 @@ a0742fa788d13c836d9dc8827c55a14e804ce77234627f2689fd511b14e5fba17b00f5a8cebd9ae4
20be60004e19068e652010f18353f93a289b109a4b13cfa85184401a13f02417aea644e29accf5c21d6cf511044f2024e3872b211512d15e301ca34613ee0077 07-1-2-arm64-dts-mt8183-Add-kukui-jacuzzi-cerise-board.patch
27e1e536f446dc278ce8a9dd9bd64e5ec6678589b2ca276be7bab5e0a80f119052e9109e6834357a57bbffe30fda48e03d24531f53ad0225f42ad075142f3a37 08-2-2-dt-bindings-arm64-dts-mediatek-Add-mt8183-kukui-jacuzzi-cerise.patch
604fb37887786a2919e93648fb3fd002ce4b948b35a915931e3f2bf3f3a1451fad4f6e042cd0fd9aa7f11bba5864f1b95c9be9ab6aed57a63652c49a7a145a3e 09-add-new-dtbs-to-makefile.patch
2553c147c7b9a387678e5c2508182417346b6acb94f9d22aec10f4aa3e66bb7d84b83ddc0c39f1f3e0dd2137e906891aef349de9da89ce63b3f43c4f42b5e933 CHROMIUM-ARM64-dts-add-vdec-venc-h264-dtsi.patch
4216543acf0ffea0c91b2b7c112cd333be838414f2902cea9f07f5811b96ab5da0e09954086966359316fe0632ac0af65add154b9df0aa11d05962429954e362 mt8183-cadmium-kukui.enable-ite.patch
b9a9e2f620d229ca8acf2df764d6406a304fd51f435929f78c4dfd7f52cd6f1f298f031bb6d7bb7fc8ea360dd8bbd4584bb298f9351100dfb20707de50076244 mt8183-fix-audio-module-loading.patch
d74da1231181835bec82015da1b3f5b08a1fe9c3c35dd712e285891094d94d9427ceac75d32f74be3a635e17d93ad82b37adf97db8176efc91aed17535023fc2 mt8183-fix-bluetooth.patch

View file

@ -0,0 +1,87 @@
From ae343e5f729def512ae0b8cb63982392354f4c52 Mon Sep 17 00:00:00 2001
From: Hsin-Yi Wang <hsinyi@chromium.org>
Date: Mon, 10 May 2021 13:21:07 +0800
Subject: [PATCH] CHROMIUM: ARM64: dts: add vdec/venc h264 dtsi
Add dtsi support for vdec/venc H264.
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: Qianqian Yan <qianqian.yan@mediatek.com>
Signed-off-by: Frederic Chen <frederic.chen@mediatek.com>
Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
BUG=b:187685837
TEST=Kernel boots and Kukui and decoder device is visible.
Change-Id: I5f9c2189e8a811dcc6895401812382c37225459a
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2883001
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
---
diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index e4d5425..25e6d4d 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -1762,6 +1762,35 @@
#clock-cells = <1>;
};
+ vcodec_dec: vcodec@16000000 {
+ compatible = "mediatek,mt8183-vcodec-dec";
+ reg = <0 0x16000000 0 0x1000>, /* VDEC_SYS */
+ <0 0x16020000 0 0x1000>, /* VDEC_MISC */
+ <0 0x16021000 0 0x800>, /* VDEC_VLD */
+ <0 0x16021800 0 0x800>, /* VDEC_TOP */
+ <0 0x16022000 0 0x1000>, /* VDEC_MC */
+ <0 0x16023000 0 0x1000>, /* VDEC_AVCVLD */
+ <0 0x16024000 0 0x1000>, /* VDEC_AVCMV */
+ <0 0x16025000 0 0x1000>, /* VDEC_PP */
+ <0 0x16026800 0 0x800>, /* VP8_VD */
+ <0 0x16027000 0 0x800>, /* VP6_VD */
+ <0 0x16027800 0 0x800>, /* VP8_VL */
+ <0 0x16028400 0 0x400>; /* VP9_VD */
+ interrupts = <GIC_SPI 250 IRQ_TYPE_LEVEL_LOW>;
+ mediatek,larb = <&larb1>;
+ iommus = <&iommu M4U_PORT_HW_VDEC_MC_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_PP_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_AVC_MV_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_PRED_RD_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_PRED_WR_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_PPWRAP_EXT>;
+ mediatek,scp = <&scp>;
+ power-domains = <&spm MT8183_POWER_DOMAIN_VDEC>;
+ clocks = <&vdecsys CLK_VDEC_VDEC>;
+ clock-names = "MT_CG_VDEC";
+ };
+
larb1: larb@16010000 {
compatible = "mediatek,mt8183-smi-larb";
reg = <0 0x16010000 0 0x1000>;
@@ -1798,6 +1827,25 @@
clock-names = "jpgenc";
};
+ vcodec_enc: vcodec@17020000 {
+ compatible = "mediatek,mt8183-vcodec-enc";
+ reg = <0 0x17020000 0 0x1000>,
+ <0 0x17000000 0 0x1000>; /* Dummy */
+ interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_LOW>;
+ mediatek,larb = <&larb4>;
+ iommus = <&iommu M4U_PORT_VENC_REC>,
+ <&iommu M4U_PORT_VENC_BSDMA>,
+ <&iommu M4U_PORT_VENC_RD_COMV>,
+ <&iommu M4U_PORT_VENC_CUR_LUMA>,
+ <&iommu M4U_PORT_VENC_CUR_CHROMA>,
+ <&iommu M4U_PORT_VENC_REF_LUMA>,
+ <&iommu M4U_PORT_VENC_REF_CHROMA>;
+ mediatek,scp = <&scp>;
+ power-domains = <&spm MT8183_POWER_DOMAIN_VENC>;
+ clocks = <&vencsys CLK_VENC_VENC>;
+ clock-names = "MT_CG_VENC";
+ };
+
ipu_conn: syscon@19000000 {
compatible = "mediatek,mt8183-ipu_conn", "syscon";
reg = <0 0x19000000 0 0x1000>;