Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp54592lqb; Tue, 16 Apr 2024 08:38:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVx6Sipx28O2M8h7yvroK8eDV+yGlxC5HcZo1apAVvgdaHWLmpUHFqXHdN7PM8KaDKHE6Jt4WuzL2RxI07aBzZIayGSyvEGyK71vpo0lw== X-Google-Smtp-Source: AGHT+IGeSwbWYFIslqgezZFr+0dWfaYayjn8MAnlSe9MszBv00EoCq0kq5ztN+Rj/6Xw1KoDscqx X-Received: by 2002:a05:6358:7b96:b0:17f:8726:61db with SMTP id n22-20020a0563587b9600b0017f872661dbmr15520235rwg.3.1713281930326; Tue, 16 Apr 2024 08:38:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713281930; cv=pass; d=google.com; s=arc-20160816; b=EtdM0qPNHNYJ56QBwSESDR3XeBnlh6E5XnSawKz8jX6R90mzuU4GYlRk4LO7VrzCRY qxeXFlawGx8lGzT8xVwdQe5CAc+LzENHq1/LwcJVQGOclBj7LygfGkA59m/HiwZ+1yx3 av1JLdRlx08vxCGElPXXUPIrOzAXiP5ZHZ+D/EKL6NVXqiPdEIrRAhJNw1wmOfwJuhw7 8nJqDou2I6VvLIzEIjAIUyMBG7C3bf/dXg/NhEEpAtZ20dq4NRustkpdSMhiQIQ0JhH/ SA20uamDfCoQfddwINLeCukhzKKzoi1nJN6fzlxjGOpa59P54Y238koQKVNxxi3UiX8S fCzg== ARC-Message-Signature: i=2; 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=csyGXKCt25QslFSS7u3GiXe77LgTGKf/e7AHelk6okc=; fh=6vVbg1oy9ZYq1MXwOGMMFhribCwVPwV59XseO9BPFU8=; b=qkHPxqVngTqty/oOjaUGVkO3iWFz2KodJEmiwd2OIpVUjwYaoBrbSWhlcTXKh3dhS8 1fPFDtXmTumlGXDZJujrAu2pXEtSdyZ7uVJx1WOmSMYUxWKhaJBfhfsOayxZIp+Hujn9 52odNrj0Y+sUUhJjlogOLAkfAn9+tv8eJUQSmmvdxt+8BBxMQgHA/ky6xPi9TmoEapbe lscX2C8Lkd90K3bd1+W55gyujMMd+6H5VNAOwk2hklTpGhVnXWJeMHOh+LumO9/01R3C 3r64AvCadQZEvOUlvl/RQl7gQH95VBJtEz7bCAdgEZy35ea0KxbOk4nWz74zgYGlHnIZ HRXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=odbc4Lb1; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-147135-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f16-20020a0cf7d0000000b0069b75b8633csi5696781qvo.390.2024.04.16.08.38.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 08:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147135-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=odbc4Lb1; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-147135-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EA88B1C20F68 for ; Tue, 16 Apr 2024 15:38:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93A9A131E41; Tue, 16 Apr 2024 15:38:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="odbc4Lb1" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 185AB1311AC; Tue, 16 Apr 2024 15:38:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713281894; cv=none; b=SUEFXrAJe1HVuj0FlyF0fZfuTBJupVO9lwGBnjzlVtPsdqtuTJrwM5pRYzHf3rhqGpQ9vdYmT8jm+IaCqbZnJK2wUxEqfeAbl6rX0/UtX2PHvoFNVmkjCQC8vjFjPxBFejiceuGQFZ3y1YIjkHxQ0ELK8C7nCePLOenI/+7FYaU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713281894; c=relaxed/simple; bh=uVSrmbTrrTvx18AEnTce99nuhXlfyhC3Uf5p8Q689dA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RmjM22cpVKGzveqPZVEjqpzgv3hZl2aI0SNHDg0fTI+cch44wCBY9/fwf+f9bZlMSIuujFm2QHn4qzihygWgoMoKhfX/ZmajY/GUVyvkKaTxhZ9yokFtpVMINM+xbIOKPGTSrjD3McVoalniFQFatYIXzzFs2BF3xYIHrBVZt1s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=odbc4Lb1; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1713281891; bh=uVSrmbTrrTvx18AEnTce99nuhXlfyhC3Uf5p8Q689dA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=odbc4Lb1Xbd0lFOH8i49YwZeFfJuirm8es2OkFD9COYVv18IpfPvNAJ4ahxZjiVvb /i7CX9erbDdpNgMqDLGFrLpfUeOghT/3eWoVG3ThizwSBfV5OXfSmivKT0L7IyPX8o ZhKxYIAxfpJioyNv6+9Qo3jsmX2unukhNR/yjhuo/FIfy6ndqZxT1+P/cYY55xhfKl gZH5ey9rmHXc+k3i4AzQ4onCL2SbvQsUTquHff8SK79g/ez5mmS5h9DzBwBYauMQTc 5gRzRVrkkvZ5QcVRAhX9Vo1xdX311aowo5ZRE9Z7ibnvwBpM7+kIrITWuIN1H1bKe8 prwGTJuBmURCA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 1A86B3782140; Tue, 16 Apr 2024 15:38:10 +0000 (UTC) From: AngeloGioacchino Del Regno To: djakov@kernel.org Cc: robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, lgirdwood@gmail.com, broonie@kernel.org, keescook@chromium.org, gustavoars@kernel.org, henryc.chen@mediatek.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, wenst@chromium.org, amergnat@baylibre.com Subject: [PATCH v1 2/6] dt-bindings: interconnect: Add MediaTek EMI Interconnect bindings Date: Tue, 16 Apr 2024 17:38:01 +0200 Message-ID: <20240416153805.431118-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240416153805.431118-1-angelogioacchino.delregno@collabora.com> References: <20240416153805.431118-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add bindings for the MediaTek External Memory Interface Interconnect, which providers support system bandwidth requirements through Dynamic Voltage Frequency Scaling Resource Collector (DVFSRC) hardware. This adds bindings for MediaTek MT8183 and MT8195 SoCs. Signed-off-by: AngeloGioacchino Del Regno --- .../interconnect/mediatek,mt8183-emi.yaml | 76 +++++++++++++++++++ .../interconnect/mediatek,mt8183.h | 23 ++++++ .../interconnect/mediatek,mt8195.h | 44 +++++++++++ 3 files changed, 143 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/mediatek,mt8183-emi.yaml create mode 100644 include/dt-bindings/interconnect/mediatek,mt8183.h create mode 100644 include/dt-bindings/interconnect/mediatek,mt8195.h diff --git a/Documentation/devicetree/bindings/interconnect/mediatek,mt8183-emi.yaml b/Documentation/devicetree/bindings/interconnect/mediatek,mt8183-emi.yaml new file mode 100644 index 000000000000..e6e0db71209b --- /dev/null +++ b/Documentation/devicetree/bindings/interconnect/mediatek,mt8183-emi.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interconnect/mediatek,mt8183-emi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek External Memory Interface (EMI) Interconnect + +maintainers: + - AngeloGioacchino Del Regno + +description: | + EMI interconnect providers support system bandwidth requirements through + Dynamic Voltage Frequency Scaling Resource Collector (DVFSRC) hardware. + The provider is able to communicate with the DVFSRC through Secure Monitor + Call (SMC). + + ICC provider ICC Nodes + ---- ---- + _________ |CPU | |--- |VPU | + _____ | |----- ---- | ---- + | |->| DRAM | ---- | ---- + |DRAM |->|scheduler|----- |GPU | |--- |DISP| + | |->| (EMI) | ---- | ---- + |_____|->|_________|---. ----- | ---- + /|\ `-|MMSYS|--|--- |VDEC| + | ----- | ---- + | | ---- + | change DRAM freq |--- |VENC| + -------- | ---- + SMC --> | DVFSRC | | ---- + -------- |--- |IMG | + | ---- + | ---- + |--- |CAM | + ---- + +properties: + compatible: + enum: + - mediatek,mt8183-emi + - mediatek,mt8195-emi + + reg: + maxItems: 1 + + '#interconnect-cells': + const: 1 + +required: + - compatible + - '#interconnect-cells' + +unevaluatedProperties: false + +examples: + - | + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + dvfsrc@10012000 { + compatible = "mediatek,mt8195-dvfsrc"; + reg = <0 0x10012000 0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + emi_icc: interconnect@1 { + compatible = "mediatek,mt8195-emi"; + reg = <1>; + #interconnect-cells = <1>; + }; + }; + }; diff --git a/include/dt-bindings/interconnect/mediatek,mt8183.h b/include/dt-bindings/interconnect/mediatek,mt8183.h new file mode 100644 index 000000000000..1088c350258d --- /dev/null +++ b/include/dt-bindings/interconnect/mediatek,mt8183.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2021 MediaTek Inc. + * Copyright (c) 2024 Collabora Ltd. + * AngeloGioacchino Del Regno + */ + +#ifndef __DT_BINDINGS_INTERCONNECT_MEDIATEK_MT8183_H +#define __DT_BINDINGS_INTERCONNECT_MEDIATEK_MT8183_H + +#define SLAVE_DDR_EMI 0 +#define MASTER_MCUSYS 1 +#define MASTER_MFG 2 +#define MASTER_MMSYS 3 +#define MASTER_MM_VPU 4 +#define MASTER_MM_DISP 5 +#define MASTER_MM_VDEC 6 +#define MASTER_MM_VENC 7 +#define MASTER_MM_CAM 8 +#define MASTER_MM_IMG 9 +#define MASTER_MM_MDP 10 + +#endif diff --git a/include/dt-bindings/interconnect/mediatek,mt8195.h b/include/dt-bindings/interconnect/mediatek,mt8195.h new file mode 100644 index 000000000000..33e0e6cde732 --- /dev/null +++ b/include/dt-bindings/interconnect/mediatek,mt8195.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2020 MediaTek Inc. + * Copyright (c) 2024 Collabora Ltd. + * AngeloGioacchino Del Regno + */ + +#ifndef __DT_BINDINGS_INTERCONNECT_MEDIATEK_MT8195_H +#define __DT_BINDINGS_INTERCONNECT_MEDIATEK_MT8195_H + +#define SLAVE_DDR_EMI 0 +#define MASTER_MCUSYS 1 +#define MASTER_GPUSYS 2 +#define MASTER_MMSYS 3 +#define MASTER_MM_VPU 4 +#define MASTER_MM_DISP 5 +#define MASTER_MM_VDEC 6 +#define MASTER_MM_VENC 7 +#define MASTER_MM_CAM 8 +#define MASTER_MM_IMG 9 +#define MASTER_MM_MDP 10 +#define MASTER_VPUSYS 11 +#define MASTER_VPU_0 12 +#define MASTER_VPU_1 13 +#define MASTER_MDLASYS 14 +#define MASTER_MDLA_0 15 +#define MASTER_UFS 16 +#define MASTER_PCIE_0 17 +#define MASTER_PCIE_1 18 +#define MASTER_USB 19 +#define MASTER_DBGIF 20 +#define SLAVE_HRT_DDR_EMI 21 +#define MASTER_HRT_MMSYS 22 +#define MASTER_HRT_MM_DISP 23 +#define MASTER_HRT_MM_VDEC 24 +#define MASTER_HRT_MM_VENC 25 +#define MASTER_HRT_MM_CAM 26 +#define MASTER_HRT_MM_IMG 27 +#define MASTER_HRT_MM_MDP 28 +#define MASTER_HRT_DBGIF 29 +#define MASTER_WIFI 30 +#define MASTER_BT 31 +#define MASTER_NETSYS 32 +#endif -- 2.44.0