From patchwork Tue Oct 4 10:01:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 12998091 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 A6392C433F5 for ; Tue, 4 Oct 2022 10:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dorSWVYl8dPOQ41mUx0/K96Zk7WqmtupA9QpebU2u/s=; b=GY8lA+lvIZlXcU iWNGODgLeSGqUI8Ybalnn92/cscwQMTlOk3dhpRE3+NBkhqGqU8ZMjVkywf2Qd9ZRsM8Nc23AeCa5 5mc0QNEVXQyJPQBmkRyxXN+KNZW6b0PB357cMgVha/yZ1ffQqyByoBTLTZMANeZzzfM0SCCOPcniB rCXnjHYKjHdohhCCzg+L0NF/mQEgcF33RWAwCnE7cFbAk9Lr8Y0xKEdx+mkPkI1mq+YYs1AKziAKv Sg+xvp97G8beqrNla8B5Jj8Yiic8Kp+XwHcqBT60VZ4jhXrHD4u8M2A9hGDdRurdP+9YBrvow1I6a nqZNfU2JOZuYUuOOVbxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofeke-009GJ1-1G; Tue, 04 Oct 2022 10:02:12 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofekM-009G9g-AD for linux-arm-kernel@lists.infradead.org; Tue, 04 Oct 2022 10:01:59 +0000 Received: by mail-wm1-x32f.google.com with SMTP id l8so8550249wmi.2 for ; Tue, 04 Oct 2022 03:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date; bh=bxB5WSuQ2mEH8Qc1QikFTsPZWlISB5RdBRCjOaAR+/w=; b=AbBJNNAAsm5TTaD/gojyalnaCESx4zoikoQrhqmtnVfNDsxELwEdLhcvB9zHgc04qx r7r/RA4vrxRHgQ9eXBWQ7f2XRdAbPxDHQRg0hLAA9czaQz8TV99P4P1CtxAbG7eN5X47 uBo9DTtQTbKntanjnfuPSZUB7TQj2WJDekaPWApKE3LJu0wMwEVIwYUEmH1MBK3Ir5dQ Atx5qlX9wwa2SqZHrHC2tmGxR3H3zwm/uOA2yc9VnS34IkD9j24rlPLpxpBBuY2AfNxj 9VGJ9LJJ7N9s+ILaGd1sVM/T5zb0tLMBzoWiVbauZJbm7R2Z5MW14aXcD8YyZBH8w45J vSng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date; bh=bxB5WSuQ2mEH8Qc1QikFTsPZWlISB5RdBRCjOaAR+/w=; b=IlgIXc6xzrTNjKvfHqUpgxTfmIhwWPcbbjUYMArWWlkZQnjwJvZG9yzFLDR4+f07sa H3MXWfhxidCxhtxDjRY9WhCsljVNXB9NRK9RuLDsWBSt8s75ujsvfxdfd1BccRN+RUef WLz6Ca5ck5tvXSwcaIUiQ4jWZNuFy4+qOCXdPb3Ep62YN4N5CG83LuErHpUYu/52nEQd qXPtTWmtjwPLfrKzt0pEomQyuy39Ss5VvyclGWEXngnBt0wxoNgFmyIhC3SKB23rUS6I rP5GVxZHhmsyrL9jTJzhYeZ9xc1dJ0699M/i1UibYbKJq/YgIGOfXCMYx5LnExw5gost cNEQ== X-Gm-Message-State: ACrzQf3ScR2GID3sr0lrnDryt8z0Y6OGeHfbE8U2LxxsDvfPbxtIWz76 O0S0hD9Z6nXTDP2/hbYMhWvBDw== X-Google-Smtp-Source: AMsMyM7FXhVaOtElOfs/bcIBaENiZMZfL0fuWjqGyKj46wl4bgXEx5VkyKvvDKCpEVvlM1D7yi2aUQ== X-Received: by 2002:a05:600c:424c:b0:3b4:6359:b301 with SMTP id r12-20020a05600c424c00b003b46359b301mr9399059wmm.125.1664877710425; Tue, 04 Oct 2022 03:01:50 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id d3-20020a5d6dc3000000b0022e3cba367fsm5473645wrz.100.2022.10.04.03.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 03:01:50 -0700 (PDT) From: Alexandre Mergnat Date: Tue, 04 Oct 2022 12:01:39 +0200 Subject: [PATCH v2 1/3] dt-bindings: iommu: mediatek: add binding documentation for MT8365 SoC MIME-Version: 1.0 Message-Id: <20221001-iommu-support-v2-1-dbfef2eeebc9@baylibre.com> References: <20221001-iommu-support-v2-0-dbfef2eeebc9@baylibre.com> In-Reply-To: <20221001-iommu-support-v2-0-dbfef2eeebc9@baylibre.com> To: Rob Herring , Yong Wu , Matthias Brugger , Will Deacon , Joerg Roedel , Robin Murphy , Krzysztof Kozlowski Cc: Alexandre Mergnat , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Fabien Parent , Markus Schneider-Pargmann , Amjad Ouled-Ameur , devicetree@vger.kernel.org, iommu@lists.linux.dev X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=6140; i=amergnat@baylibre.com; h=from:subject:message-id; bh=XDDgL/nAc/yVfhySRg5fQSvB2yy2X96A0sg/pLmBfiI=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBjPASLyCQhh1p5oK89+7HM/pTAZNpLHJaNLzqnTLyh dWFyDBKJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCYzwEiwAKCRArRkmdfjHURbbQD/ sEYgF/OcVD0T6MVcho0PMKaPJP+jRHhjAf5V58c0Xj8x11F19pfUsLBNF+Eelo6nrSTKLMfC9lwycO ptrDCa1dndDR5yjBMma/JrrWUMosbE+imYC4q5VRicdJhbZYJ9OXlO+osTcO31OmSHhIc/5RTcnHav t3GjQDPr4Q/FAeXj7KottyXrRF9aMGUrWZyujgR3LyzTNa9sxSOpxXs48yVStPR/EKiCwq2zZc5ZfF eEZoIr2YMUUgXk97zFanU/s4Cr9hyxi5FLkG2AS38PWRCjAXWnzb6BTDNKA3xytFYN8Je15T+OavfQ fQvnoFy1ibQEOQewJo8jARMxvr25Yjw5Ebmdm2mrQkmlawk+PTciMpQpKXur7SWzfLeM2ps8zNpUWX 6CBrLqTXuWNS3HoYFVXzPs6dZl9x9g4Pd6WP9/Z5zv2kNNAnIqbaId++CDtzLNyJWSiglFoEPsmKLY RqfjNKm/EVlmivzNKSQDbXofkri276dKTKIFwO8F1WJ7j44PXy2alzMnSf0GxRPAhNw7Crd7KlN2S7 wL0NIQE/7qe1gyxNhP7xgqE38g7vxVJPJ4QhKTeWYi+FsG4+z5DT9F8nxbrSTFQ6gy0m2jB9Xn2Miq JCDrt+4yb+GHA/Z3hwA1OlbZqyZg1bJXzjvr7JK/iKR1wZ0qEcxo5puLFDfA== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221004_030154_629233_5DCBBEBF X-CRM114-Status: GOOD ( 13.18 ) 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 From: Fabien Parent Add IOMMU binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent Signed-off-by: Markus Schneider-Pargmann Signed-off-by: Alexandre Mergnat --- .../devicetree/bindings/iommu/mediatek,iommu.yaml | 2 + include/dt-bindings/memory/mt8365-larb-port.h | 90 ++++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml index fee0241b5098..4b8cf3ce6963 100644 --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml @@ -81,6 +81,7 @@ properties: - mediatek,mt8195-iommu-vdo # generation two - mediatek,mt8195-iommu-vpp # generation two - mediatek,mt8195-iommu-infra # generation two + - mediatek,mt8365-m4u # generation two - description: mt7623 generation one items: @@ -130,6 +131,7 @@ properties: dt-binding/memory/mt8186-memory-port.h for mt8186, dt-binding/memory/mt8192-larb-port.h for mt8192. dt-binding/memory/mt8195-memory-port.h for mt8195. + dt-binding/memory/mt8365-larb-port.h for mt8365. power-domains: maxItems: 1 diff --git a/include/dt-bindings/memory/mt8365-larb-port.h b/include/dt-bindings/memory/mt8365-larb-port.h new file mode 100644 index 000000000000..56d5a5dd519e --- /dev/null +++ b/include/dt-bindings/memory/mt8365-larb-port.h @@ -0,0 +1,90 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2022 MediaTek Inc. + * Author: Yong Wu + */ +#ifndef _DT_BINDINGS_MEMORY_MT8365_LARB_PORT_H_ +#define _DT_BINDINGS_MEMORY_MT8365_LARB_PORT_H_ + +#include + +#define M4U_LARB0_ID 0 +#define M4U_LARB1_ID 1 +#define M4U_LARB2_ID 2 +#define M4U_LARB3_ID 3 + +/* larb0 */ +#define M4U_PORT_DISP_OVL0 MTK_M4U_ID(M4U_LARB0_ID, 0) +#define M4U_PORT_DISP_OVL0_2L MTK_M4U_ID(M4U_LARB0_ID, 1) +#define M4U_PORT_DISP_RDMA0 MTK_M4U_ID(M4U_LARB0_ID, 2) +#define M4U_PORT_DISP_WDMA0 MTK_M4U_ID(M4U_LARB0_ID, 3) +#define M4U_PORT_DISP_RDMA1 MTK_M4U_ID(M4U_LARB0_ID, 4) +#define M4U_PORT_MDP_RDMA0 MTK_M4U_ID(M4U_LARB0_ID, 5) +#define M4U_PORT_MDP_WROT1 MTK_M4U_ID(M4U_LARB0_ID, 6) +#define M4U_PORT_MDP_WROT0 MTK_M4U_ID(M4U_LARB0_ID, 7) +#define M4U_PORT_MDP_RDMA1 MTK_M4U_ID(M4U_LARB0_ID, 8) +#define M4U_PORT_DISP_FAKE0 MTK_M4U_ID(M4U_LARB0_ID, 9) +#define M4U_PORT_APU_READ MTK_M4U_ID(M4U_LARB0_ID, 10) +#define M4U_PORT_APU_WRITE MTK_M4U_ID(M4U_LARB0_ID, 11) + +/* larb1 */ +#define M4U_PORT_VENC_RCPU MTK_M4U_ID(M4U_LARB1_ID, 0) +#define M4U_PORT_VENC_REC MTK_M4U_ID(M4U_LARB1_ID, 1) +#define M4U_PORT_VENC_BSDMA MTK_M4U_ID(M4U_LARB1_ID, 2) +#define M4U_PORT_VENC_SV_COMV MTK_M4U_ID(M4U_LARB1_ID, 3) +#define M4U_PORT_VENC_RD_COMV MTK_M4U_ID(M4U_LARB1_ID, 4) +#define M4U_PORT_VENC_NBM_RDMA MTK_M4U_ID(M4U_LARB1_ID, 5) +#define M4U_PORT_VENC_NBM_RDMA_LITE MTK_M4U_ID(M4U_LARB1_ID, 6) +#define M4U_PORT_JPGENC_Y_RDMA MTK_M4U_ID(M4U_LARB1_ID, 7) +#define M4U_PORT_JPGENC_C_RDMA MTK_M4U_ID(M4U_LARB1_ID, 8) +#define M4U_PORT_JPGENC_Q_TABLE MTK_M4U_ID(M4U_LARB1_ID, 9) +#define M4U_PORT_JPGENC_BSDMA MTK_M4U_ID(M4U_LARB1_ID, 10) +#define M4U_PORT_JPGDEC_WDMA MTK_M4U_ID(M4U_LARB1_ID, 11) +#define M4U_PORT_JPGDEC_BSDMA MTK_M4U_ID(M4U_LARB1_ID, 12) +#define M4U_PORT_VENC_NBM_WDMA MTK_M4U_ID(M4U_LARB1_ID, 13) +#define M4U_PORT_VENC_NBM_WDMA_LITE MTK_M4U_ID(M4U_LARB1_ID, 14) +#define M4U_PORT_VENC_CUR_LUMA MTK_M4U_ID(M4U_LARB1_ID, 15) +#define M4U_PORT_VENC_CUR_CHROMA MTK_M4U_ID(M4U_LARB1_ID, 16) +#define M4U_PORT_VENC_REF_LUMA MTK_M4U_ID(M4U_LARB1_ID, 17) +#define M4U_PORT_VENC_REF_CHROMA MTK_M4U_ID(M4U_LARB1_ID, 18) + +/* larb2 */ +#define M4U_PORT_CAM_IMGO MTK_M4U_ID(M4U_LARB2_ID, 0) +#define M4U_PORT_CAM_RRZO MTK_M4U_ID(M4U_LARB2_ID, 1) +#define M4U_PORT_CAM_AAO MTK_M4U_ID(M4U_LARB2_ID, 2) +#define M4U_PORT_CAM_LCS MTK_M4U_ID(M4U_LARB2_ID, 3) +#define M4U_PORT_CAM_ESFKO MTK_M4U_ID(M4U_LARB2_ID, 4) +#define M4U_PORT_CAM_CAM_SV0 MTK_M4U_ID(M4U_LARB2_ID, 5) +#define M4U_PORT_CAM_CAM_SV1 MTK_M4U_ID(M4U_LARB2_ID, 6) +#define M4U_PORT_CAM_LSCI MTK_M4U_ID(M4U_LARB2_ID, 7) +#define M4U_PORT_CAM_LSCI_D MTK_M4U_ID(M4U_LARB2_ID, 8) +#define M4U_PORT_CAM_AFO MTK_M4U_ID(M4U_LARB2_ID, 9) +#define M4U_PORT_CAM_SPARE MTK_M4U_ID(M4U_LARB2_ID, 10) +#define M4U_PORT_CAM_BPCI MTK_M4U_ID(M4U_LARB2_ID, 11) +#define M4U_PORT_CAM_BPCI_D MTK_M4U_ID(M4U_LARB2_ID, 12) +#define M4U_PORT_CAM_UFDI MTK_M4U_ID(M4U_LARB2_ID, 13) +#define M4U_PORT_CAM_IMGI MTK_M4U_ID(M4U_LARB2_ID, 14) +#define M4U_PORT_CAM_IMG2O MTK_M4U_ID(M4U_LARB2_ID, 15) +#define M4U_PORT_CAM_IMG3O MTK_M4U_ID(M4U_LARB2_ID, 16) +#define M4U_PORT_CAM_WPE0_I MTK_M4U_ID(M4U_LARB2_ID, 17) +#define M4U_PORT_CAM_WPE1_I MTK_M4U_ID(M4U_LARB2_ID, 18) +#define M4U_PORT_CAM_WPE_O MTK_M4U_ID(M4U_LARB2_ID, 19) +#define M4U_PORT_CAM_FD0_I MTK_M4U_ID(M4U_LARB2_ID, 20) +#define M4U_PORT_CAM_FD1_I MTK_M4U_ID(M4U_LARB2_ID, 21) +#define M4U_PORT_CAM_FD0_O MTK_M4U_ID(M4U_LARB2_ID, 22) +#define M4U_PORT_CAM_FD1_O MTK_M4U_ID(M4U_LARB2_ID, 23) + +/* larb3 */ +#define M4U_PORT_HW_VDEC_MC_EXT MTK_M4U_ID(M4U_LARB3_ID, 0) +#define M4U_PORT_HW_VDEC_UFO_EXT MTK_M4U_ID(M4U_LARB3_ID, 1) +#define M4U_PORT_HW_VDEC_PP_EXT MTK_M4U_ID(M4U_LARB3_ID, 2) +#define M4U_PORT_HW_VDEC_PRED_RD_EXT MTK_M4U_ID(M4U_LARB3_ID, 3) +#define M4U_PORT_HW_VDEC_PRED_WR_EXT MTK_M4U_ID(M4U_LARB3_ID, 4) +#define M4U_PORT_HW_VDEC_PPWRAP_EXT MTK_M4U_ID(M4U_LARB3_ID, 5) +#define M4U_PORT_HW_VDEC_TILE_EXT MTK_M4U_ID(M4U_LARB3_ID, 6) +#define M4U_PORT_HW_VDEC_VLD_EXT MTK_M4U_ID(M4U_LARB3_ID, 7) +#define M4U_PORT_HW_VDEC_VLD2_EXT MTK_M4U_ID(M4U_LARB3_ID, 8) +#define M4U_PORT_HW_VDEC_AVC_MV_EXT MTK_M4U_ID(M4U_LARB3_ID, 9) +#define M4U_PORT_HW_VDEC_RG_CTRL_DMA_EXT MTK_M4U_ID(M4U_LARB3_ID, 10) + +#endif