Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2653710pxk; Sun, 6 Sep 2020 08:24:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKAGNKiHf8vzoX1fbptvJRLsBUczEnZ0aAR4UKobllvIzdhcN9U+02s9HpxG9tT+8q2Smu X-Received: by 2002:a17:906:829a:: with SMTP id h26mr17800628ejx.11.1599405894545; Sun, 06 Sep 2020 08:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599405894; cv=none; d=google.com; s=arc-20160816; b=c5U3qg+xdTI0Y0MOG/IvfEno+oOBeKJ7uSlWsnAR5idPH/vqsX4yLeZv16cQXJ3R52 auzYKd+ZOEPFnpfLhTfUomj8g5K/bapLqUeVartjsw65cdy0sZNDcG3la/1XawkGJjyw CtwrOg+oE842i3ILQgHYNjU4poFbpcxPN3aY3P9Ep/Euzq9DRMQ9yPOW7rI8apsBQ3sw 3qtpA8oEPRV7fKHu750VwLCnm0RuDXUaNvDQc5t3vH20qrY+qfD07yfE4WC2X93ircfp 5KJq9XQ+Lx4l9l01UY+Eyi0wSoCl+AMs2vrc2nbT81U2Mdzhk4+O5mP73te0UhXmR1Yk iEOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rzOHXc1d4k+GJMLhr6jfXTiNep26puRM1VtdB2kOKb0=; b=NvBCtu8atJvLMYl/Vub21LyW5x47wYqSs4azRHwInvCtRW9eNfu3UXfh+wnMVUtC1o 7EnxBln2m5RpZ6VopyTgi4JQEAiObNFTkuZtoM8hpGQgKGM+9UYtOt+E6iJ6xXIC6wcV cJIZkAVq6uNtQOUwZMlG2+G0/OOAqrGeDl9W4chUjOPHZx/SiGh5eRufZWosBmar1OzZ p3ECvKaBKHdVdBpS/puky/WsvV/6VZ5o2T0B56oKqKXkenMM68XJFAH9T22UEx02e/1f pcfJXHR/y9gzQR9WWV+haXnkLzVW052q7d64qm3jbf+74oxPT/EGTtIkA2MZPdRBo1AP JEIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=fhe19DSI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si8129913edo.322.2020.09.06.08.24.31; Sun, 06 Sep 2020 08:24:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=fhe19DSI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728909AbgIFPVi (ORCPT + 99 others); Sun, 6 Sep 2020 11:21:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728931AbgIFPTg (ORCPT ); Sun, 6 Sep 2020 11:19:36 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D0B3C061573 for ; Sun, 6 Sep 2020 08:19:35 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id t10so12285096wrv.1 for ; Sun, 06 Sep 2020 08:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rzOHXc1d4k+GJMLhr6jfXTiNep26puRM1VtdB2kOKb0=; b=fhe19DSITZ6BPZd78ZKWlr7CcS8NZ6AJvNW7U0n9Z0iEnKSOJyfHYqnWH4VuNphBiW ofy6sQZcnvqb7uoPytvE3ALMoWTiGurVYJVMJMqL0OFafGunUn05BNQOUT5rI7YlIwTh GPPe4txfILYuOrQIUrnIp50CT+J0N1fSz68g1LkwK6GLLdX3RABSyw4Y64h1SW016y0b okri/H/I/IMFcwYSqOVvlJu02AskDj6TBhGIVfeAZK5tAGtcQ/vrHamWgBDzvZJH4cbg 7JNT9ZnFhcbmmOMK8GptS3e5mpUBNBTvXxr7ZgJnNec713x+ch/rTnvy0TFabJFaJ+B/ aPAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rzOHXc1d4k+GJMLhr6jfXTiNep26puRM1VtdB2kOKb0=; b=pFH+OVqqn97sR613U/GDfH2H2RagocJy53H/kjJeZrygTz7EyobfRpwWmwwNeIo8OQ 60S9gPJ0fwFJLK7mJi7SZb513c0h2+BozJricernjidMU4H6A3KEUUI5QOvmPq9YzYOx srAvt2THF6FM2eOmmsQlGPLBKax+JsprTSMxmYnXm0ruGWyOjFy05j/8ftvQA6r58wug Xc2/h8/gBCCS2BwHvt6vcnCgD1ZwJ8KhSBbVglnVSJw8IwfU8/yRtD8GIieREvLwJVOJ bScUfOH5tJgq5woGg12QJSyr6sL6SXhviUjnxDDaTYNjJTkDa2GjvAYyhlHlMKww7lap POqw== X-Gm-Message-State: AOAM530RSYdX2AZ9CVU+PgmBF8CxP8+zMmX9mnJz6fNfV49OYAWif/n/ JRTTGBEf46ZAZ8oigiTTToSvlw== X-Received: by 2002:adf:b784:: with SMTP id s4mr18393368wre.116.1599405573150; Sun, 06 Sep 2020 08:19:33 -0700 (PDT) Received: from localhost.localdomain (208.19.23.93.rev.sfr.net. [93.23.19.208]) by smtp.gmail.com with ESMTPSA id a15sm26420646wrn.3.2020.09.06.08.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 08:19:32 -0700 (PDT) From: Fabien Parent To: iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: joro@8bytes.org, robh+dt@kernel.org, matthias.bgg@gmail.com, yong.wu@mediatek.com, Fabien Parent , Rob Herring Subject: [PATCH v3 1/3] dt-bindings: iommu: Add binding for MediaTek MT8167 IOMMU Date: Sun, 6 Sep 2020 17:19:26 +0200 Message-Id: <20200906151928.881209-1-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit adds IOMMU binding documentation and larb port definitions for the MT8167 SoC. Signed-off-by: Fabien Parent Acked-by: Rob Herring --- V3: Added mt8167-larb-port.h file for iommu port definitions V2: no change --- .../bindings/iommu/mediatek,iommu.txt | 1 + include/dt-bindings/memory/mt8167-larb-port.h | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 include/dt-bindings/memory/mt8167-larb-port.h diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.txt b/Documentation/devicetree/bindings/iommu/mediatek,iommu.txt index c1ccd8582eb2..f7a348f48e0d 100644 --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.txt +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.txt @@ -61,6 +61,7 @@ Required properties: "mediatek,mt6779-m4u" for mt6779 which uses generation two m4u HW. "mediatek,mt7623-m4u", "mediatek,mt2701-m4u" for mt7623 which uses generation one m4u HW. + "mediatek,mt8167-m4u" for mt8167 which uses generation two m4u HW. "mediatek,mt8173-m4u" for mt8173 which uses generation two m4u HW. "mediatek,mt8183-m4u" for mt8183 which uses generation two m4u HW. - reg : m4u register base and size. diff --git a/include/dt-bindings/memory/mt8167-larb-port.h b/include/dt-bindings/memory/mt8167-larb-port.h new file mode 100644 index 000000000000..4dd44d1037a7 --- /dev/null +++ b/include/dt-bindings/memory/mt8167-larb-port.h @@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2020 BayLibre, SAS + * Author: Fabien Parent + */ +#ifndef __DTS_IOMMU_PORT_MT8167_H +#define __DTS_IOMMU_PORT_MT8167_H + +#define MTK_M4U_ID(larb, port) (((larb) << 5) | (port)) + +#define M4U_LARB0_ID 0 +#define M4U_LARB1_ID 1 +#define M4U_LARB2_ID 2 + +/* larb0 */ +#define M4U_PORT_DISP_OVL0 MTK_M4U_ID(M4U_LARB0_ID, 0) +#define M4U_PORT_DISP_RDMA0 MTK_M4U_ID(M4U_LARB0_ID, 1) +#define M4U_PORT_DISP_WDMA0 MTK_M4U_ID(M4U_LARB0_ID, 2) +#define M4U_PORT_DISP_RDMA1 MTK_M4U_ID(M4U_LARB0_ID, 3) +#define M4U_PORT_MDP_RDMA MTK_M4U_ID(M4U_LARB0_ID, 4) +#define M4U_PORT_MDP_WDMA MTK_M4U_ID(M4U_LARB0_ID, 5) +#define M4U_PORT_MDP_WROT MTK_M4U_ID(M4U_LARB0_ID, 6) +#define M4U_PORT_DISP_FAKE MTK_M4U_ID(M4U_LARB0_ID, 7) + +/* IMG larb1*/ +#define M4U_PORT_CAM_IMGO MTK_M4U_ID(M4U_LARB1_ID, 0) +#define M4U_PORT_CAM_IMG2O MTK_M4U_ID(M4U_LARB1_ID, 1) +#define M4U_PORT_CAM_LSCI MTK_M4U_ID(M4U_LARB1_ID, 2) +#define M4U_PORT_CAM_ESFKO MTK_M4U_ID(M4U_LARB1_ID, 3) +#define M4U_PORT_CAM_AAO MTK_M4U_ID(M4U_LARB1_ID, 4) +#define M4U_PORT_VENC_REC MTK_M4U_ID(M4U_LARB1_ID, 5) +#define M4U_PORT_VENC_BSDMA MTK_M4U_ID(M4U_LARB1_ID, 6) +#define M4U_PORT_VENC_RD_COMV MTK_M4U_ID(M4U_LARB1_ID, 7) +#define M4U_PORT_CAM_IMGI MTK_M4U_ID(M4U_LARB1_ID, 8) +#define M4U_PORT_VENC_CUR_LUMA MTK_M4U_ID(M4U_LARB1_ID, 9) +#define M4U_PORT_VENC_CUR_CHROMA MTK_M4U_ID(M4U_LARB1_ID, 10) +#define M4U_PORT_VENC_REF_LUMA MTK_M4U_ID(M4U_LARB1_ID, 11) +#define M4U_PORT_VENC_REF_CHROMA MTK_M4U_ID(M4U_LARB1_ID, 12) + +/* VDEC larb2*/ +#define M4U_PORT_HW_VDEC_MC_EXT MTK_M4U_ID(M4U_LARB2_ID, 0) +#define M4U_PORT_HW_VDEC_PP_EXT MTK_M4U_ID(M4U_LARB2_ID, 1) +#define M4U_PORT_HW_VDEC_VLD_EXT MTK_M4U_ID(M4U_LARB2_ID, 2) +#define M4U_PORT_HW_VDEC_AVC_MV_EXT MTK_M4U_ID(M4U_LARB2_ID, 3) +#define M4U_PORT_HW_VDEC_PRED_RD_EXT MTK_M4U_ID(M4U_LARB2_ID, 4) +#define M4U_PORT_HW_VDEC_PRED_WR_EXT MTK_M4U_ID(M4U_LARB2_ID, 5) +#define M4U_PORT_HW_VDEC_PPWRAP_EXT MTK_M4U_ID(M4U_LARB2_ID, 6) + +#endif -- 2.28.0