From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87A48606A329 for ; Wed, 25 Nov 2026 06:01:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=VPHXMB6U; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.a=rsa-sha256 header.s=dk header.b=K1ugWyWu DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=JbOP+NytntTkLkVoqa5PA56FxoK71n2sdDtEGCzcrMo=; b=VPHXMB6UWfuBd9uHYXe+3mthO4 Hyuz2qy+IPtnx0BZSeRG7NlfoMmD2QckpcjmHpGKJzFy7tkzcJXW8y5IabmV4tpX9g2C1Z2AARYwn Q+Pa4DUkDht0hFzfU4U+yLRFUvuMqT74L29dwr6A2a4ung/veiLFvvS4d2+KDsOeJ2IlPbFTBJkvQ knPHJVBJEtwTVC+KHOEIjLNGuw2mINREMh8doowXmb+FOybFPwBSsaksSyFqhXAV+SUV1JBCyw03L 2biJdjlwJZWxD/1NIsaalf/w5gBVVDvnkDKOw8JvosSr5eRF/nEstLSDy5u9mL6PQpHNSlcEMwUeE cEYknQzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xW645-00000008VPg-16ZR; Wed, 25 Nov 2026 06:01:09 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xW63w-00000008VKx-1gw5; Wed, 25 Nov 2026 06:01:01 +0000 X-UUID: 9399ce1ae89511f1acbe4559397dec65-20261124 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From; bh=JbOP+NytntTkLkVoqa5PA56FxoK71n2sdDtEGCzcrMo=; b=K1ugWyWuh1Gu93Q7TXrmKU1rc45eKs+/LT9zBVRnDI37TIPun5BkT9vz8GaIKyr53rGLqVgGnyWBg6yoCSw4+e+Gbr0Fvp91igW00EUhz1UNmuJVYUUkpZuQ6OihMf763FICIqKUixbZNt3VTk9zntbnnEhZaI8KzdUT8phiD74=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.21,REQID:e6c23742-7ae1-439f-8de3-373d93f7ca0c,IP:0,U RL:25,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:25 X-CID-META: VersionHash:b0318ac,CLOUDID:2c10c266-4b51-4c95-bb1b-80ac6aad9c96,B ulkID:nil,BulkQuantity:0,SF:81|82|102|836|865|888|898,TC:-5,Content:0|15|5 0|99,EDM:-3,IP:nil,URL:11|97|99|93|83|106|1,File:130,RT:0,Bulk:nil,QS:nil, BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 9399ce1ae89511f1acbe4559397dec65-20261124 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 825967156; Tue, 24 Nov 2026 23:00:54 -0700 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Wed, 25 Nov 2026 14:00:52 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.2562.56 via Frontend Transport; Wed, 25 Nov 2026 14:00:51 +0800 From: Echo Zhang To: Echo Zhang , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Stephen Boyd , Brian Masney , Jerome Brunet , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , MMDVFS Team , , , , , , , Subject: [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding Date: Wed, 25 Nov 2026 14:00:07 +0800 Message-ID: <20261125060037.649659-3-echo.zhang@mediatek.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261125060037.649659-1-echo.zhang@mediatek.com> References: <20261125060037.649659-1-echo.zhang@mediatek.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261124_220100_474091_25F3715C X-CRM114-Status: GOOD ( 17.24 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" X-Spam-Status: No, score=-18.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Describe the MMDVFS clock provider and its connection to VCP firmware in a common binding. Document the optional MMUP shared memory and IPI settings used by the firmware backend. Add an MT8196 binding for the HWCCF syscon and seven mux OPP tables so the driver can map clock rate requests to hardware votes. Signed-off-by: Echo Zhang --- .../soc/mediatek/mediatek,mmdvfs.yaml | 60 +++++++++++++ .../soc/mediatek/mediatek,mt8196-mmdvfs.yaml | 87 +++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml new file mode 100644 index 000000000000..d65f4c9084cc --- /dev/null +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mmdvfs.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mmdvfs.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek Multimedia Dynamic Voltage and Frequency Scaling (MMDVFS) + +maintainers: + - MediaTek MMDVFS Team + +description: + MediaTek MMDVFS provides dynamic voltage and frequency scaling for multimedia + hardware accelerators. The controller exposes virtual clocks that multimedia + consumers use through the common clock framework. The driver aggregates + consumer rate requests and sends the resulting DVFS votes to the multimedia + hardware voter and VCP firmware. + +select: false + +properties: + mediatek,vcp: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the MediaTek VCP remote processor used for MMDVFS shared + memory, feature registration, notifier, and IPI operations. + + mediatek,mmup-sram: + type: boolean + description: + Use the MMUP SRAM window for MMDVFS callback records and status data. + + mediatek,mmup-enable: + type: boolean + description: + Enable the MMUP path for MMDVFS shared memory and IPI handling. + + mediatek,vcp-ipi-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + VCP IPI channel id for MMDVFS. If omitted, the driver uses the platform + default. + + mediatek,mmup-ipi-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + MMUP IPI channel id for MMDVFS. If omitted, the driver uses the platform + default. + + "#clock-cells": + const: 1 + description: + MMDVFS clock specifier. Consumers pass an SoC-specific MMDVFS clock + index. + +required: + - mediatek,vcp + - "#clock-cells" + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml new file mode 100644 index 000000000000..13381c78dbd1 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt8196-mmdvfs.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mt8196-mmdvfs.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT8196 Multimedia Dynamic Voltage and Frequency Scaling + +maintainers: + - MediaTek MMDVFS Team + +allOf: + - $ref: mediatek,mmdvfs.yaml# + +select: + properties: + compatible: + contains: + enum: + - mediatek,mt8196-mmdvfs + required: + - compatible + +properties: + compatible: + enum: + - mediatek,mt8196-mmdvfs + + mediatek,hwccf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the MT8196 multimedia hardware clock control fabric syscon + used for AP-side hardware votes. + + mediatek,mux-opp-tables: + $ref: /schemas/types.yaml#/definitions/phandle-array + minItems: 7 + maxItems: 7 + description: | + OPP tables for the seven MT8196 MMDVFS muxes, in this order: + display, MDP, SMI, VENC, VDEC, IMG, CAM. MDP and MML share + the MDP mux. Each OPP entry must have opp-hz and opp-level. + +required: + - compatible + - mediatek,hwccf + - mediatek,mux-opp-tables + +unevaluatedProperties: false + +examples: + - | + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + vcp: remoteproc@31800000 { + compatible = "mediatek,mt8196-vcp"; + reg = <0 0x31800000 0 0x100000>; + }; + + mm_hwv: syscon@31b00000 { + compatible = "mediatek,mt8196-mm-hwv", "syscon"; + reg = <0 0x31b00000 0 0x6000>; + }; + + mmdvfs_opp: opp-table { + compatible = "operating-points-v2"; + opp-0 { + opp-hz = /bits/ 64 <100000000>; + opp-level = <0>; + }; + }; + + mmdvfs: mmdvfs-mux { + compatible = "mediatek,mt8196-mmdvfs"; + mediatek,vcp = <&vcp>; + mediatek,hwccf = <&mm_hwv>; + mediatek,mux-opp-tables = <&mmdvfs_opp>, <&mmdvfs_opp>, + <&mmdvfs_opp>, <&mmdvfs_opp>, + <&mmdvfs_opp>, <&mmdvfs_opp>, + <&mmdvfs_opp>; + #clock-cells = <1>; + }; + }; -- 2.45.2