Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1152490lqb; Thu, 30 May 2024 01:35:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPKuODUOOGBuCtvPS25wUDC/AiIUa5eILpTWnIZWgNRZucmWGieTjZYWQPVdHvEUy13pRdXbP7fMokzVzX8X5Lqs1ApkFt9Mk8EUmiRw== X-Google-Smtp-Source: AGHT+IELX5dl0OaGjq9XUxUcT5sZQqPjAul+UvC4Ewp288keQ89nouw806aTtOCg6KsLsXTJSMnV X-Received: by 2002:a05:6808:3085:b0:3d1:d08b:36ab with SMTP id 5614622812f47-3d1dcc9dff7mr1653263b6e.4.1717058142302; Thu, 30 May 2024 01:35:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717058142; cv=pass; d=google.com; s=arc-20160816; b=NjJGxyLSOs1wvqC0B/o16aQBOZDc0O4kmxuo+QnmnFQKjHTQegg5vNj0Q8BC4dX2LF F7ACH4FD0kfn6g3kWatVrOj+hjs1fHriG9oGmK2C/TgG789wfTrTTclwtcbK6MwcIkZf /QVH43qL6oHeIUpzjl4KAruwDqQ6UZ6YjX5C1OP+d9J2Wu3K6IRSvH3Fwh/a9xioU8dX jL8k/3LRMYJtyJFltG8YE9YkyRmJdzQlrltKTbHjJCIlk+HsVUs00gOyUzSVZ/8eMOaP YUSyT9t51B3YwyQM955Q3ACs65W6k1L7ci2Jiyj1IGHA4KamxeUYTmA4pUHlA4JQ3cqB bQdw== 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=ojWQ0b2MWifneyP6SWllMlL0oJitBi3xbuigAJTyN5g=; fh=XPr2HKyB7fgHnv7xi2KGV0/SjuTzgzxLjaK8jiQefXM=; b=oViJb+rUpR6/PyRoDIjTIGPvO212/FQek4EMiLcGheQvM0B/7P9POBSx51W52GcChg PRFDSgxhgUkj6ajvXVU6umN7LEF077wCFRqc2ik/gkSpCwDycUMmxqdITFQhWILKR11C bEn7qKxkmr0JIMUpub07fnuNA5RYlxb7vdSfAE52M+i6/u4sKOITPo6FESuEFBpnZIFo yZtEuZeSwXuv3bKYv6lDiJgQNZJYAbVGGnpCQ+GcvruvloSGMe+1sU6O4xWdiDAjrkXG 7vX7kHrLN37lAcHlRyZd1AN257oELlxW5CClF/KRYuL5nIIpQrYk5a56Hl/KKvhhkrxS KMsw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eCjv9PPz; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-195068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-70224f82c52si1974972b3a.328.2024.05.30.01.35.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 01:35:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eCjv9PPz; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-195068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 439A2B21FFC for ; Thu, 30 May 2024 08:35:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB757153569; Thu, 30 May 2024 08:35:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="eCjv9PPz" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 981FA152787 for ; Thu, 30 May 2024 08:35:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717058126; cv=none; b=LEcWTOerrg/xaOoQjAjVrEXE1+shzvtrCLfBAba6V8I/lLeQTRtTLCDYq75xixPUx1vyD/9NGTDbS89h3/bJldVn2aoa+Kww6rRj2s30bzCCyBx9JhgUmwxLq6IL5whzRL4Q+ayXnHwJqsppz6SRx3YBuh7B6qfaTACAeHu/CCQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717058126; c=relaxed/simple; bh=x5EytMBOecORfel70Q1gecPB643ydiviHuoTOcu4sX8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YCxAM0kjFLp6CjXq5lSLFAzQpU4Vyk75+pS/YD7RBMisf8jFJOWQRQW+/omnxKXetBEDEgXRu0oCKQc+w+s6H9p886gTSJsgZsvFySoFCXW+PBE8csT8bKMqasKzH9I8BZPxoODSRVDU1gjtrNnstnQA7Yn1Kw6/JIuktehaQfU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=eCjv9PPz; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1f44b594deeso4625145ad.2 for ; Thu, 30 May 2024 01:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717058124; x=1717662924; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ojWQ0b2MWifneyP6SWllMlL0oJitBi3xbuigAJTyN5g=; b=eCjv9PPzuc4vWCcuzMq3CQ07RXwp7jDT4Nj2+g3Fh36uUINnFRuZ43LLd5EUR9LS2Q RbMARwcDSktA5lOVcl9WvJmMBBGJSZ/fegP3vzfXWIXAUK4CODEHR6t80DU5786kpE36 KXqGOrOmX2b4pkNIw06IeeSbzsTQ5pvnr/sUo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717058124; x=1717662924; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ojWQ0b2MWifneyP6SWllMlL0oJitBi3xbuigAJTyN5g=; b=ueN/73G9bmmBhms4/39iK7T0uaKh0iVpbmji7OtRoTOatmGegIrNaHaDO0tv3+WkXA tzLcV+3jcqa13SqBMQZcT2y4734ByBY3H8Ym1nG6c87iprZNKDvOd1Lk/kEEzJRce73d f0uhgDr/fpS8iO+o9vw+7y+YDCMnO4v6ltJF4gr+6cQDlEwBQoZxKKDhOx1V4Z+I/iwO w6GEZPUWOs2SgPfTyIeOwpB959oTrjrsSwNWIgA3sfl2zfCGb/30jvOUvBGCnVrg33ab 8Ow8xi9130AZ2wc+8TImXjtW0fY3FSX84/8XS6MC1qnAq1NEF+4VhOWNWFXSIntDcASz 3D/Q== X-Forwarded-Encrypted: i=1; AJvYcCUJI1ySJKkgUHL2pofqJVJQC71Iw4s+44P2Bk0SAtTiZLh9ntXYrweEn1tVf5pU33cfpl7jpOWxotdIffYzMfOZumxwK+6IHPFJ2c2B X-Gm-Message-State: AOJu0Yypt9/qWfXFG0rNE7r6gTpbhzidHXfmbyGUtxWjV5ZLCbZaYh7e AwyW/uA+uCYWo30G6nThtYmDdr5dvi4nZIw+Ln2MRGLyFq5N2MjDKDTzG6BSpw== X-Received: by 2002:a17:902:e810:b0:1e4:9c2f:d343 with SMTP id d9443c01a7336-1f6193fad6fmr15805455ad.7.1717058123772; Thu, 30 May 2024 01:35:23 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:65f0:63a9:90bb:50b8]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f617390fe7sm10950635ad.146.2024.05.30.01.35.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 01:35:23 -0700 (PDT) From: Chen-Yu Tsai To: Frank Binns , Matt Coster , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] dt-bindings: clock: mediatek: Add mt8173 mfgtop Date: Thu, 30 May 2024 16:35:00 +0800 Message-ID: <20240530083513.4135052-2-wenst@chromium.org> X-Mailer: git-send-email 2.45.1.288.g0e0cd299f1-goog In-Reply-To: <20240530083513.4135052-1-wenst@chromium.org> References: <20240530083513.4135052-1-wenst@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The MFG (GPU) block on the MT8173 has a small glue layer, named MFG_TOP in the datasheet, that contains clock gates, some power sequence signal delays, and other unknown registers that get toggled when the GPU is powered on. The clock gates are exposed as clocks provided by a clock controller, while the power sequencing bits are exposed as one singular power domain. Signed-off-by: Chen-Yu Tsai --- .../clock/mediatek,mt8173-mfgtop.yaml | 71 +++++++++++++++++++ include/dt-bindings/clock/mt8173-clk.h | 7 ++ 2 files changed, 78 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/mediatek,mt8173-mfgtop.yaml diff --git a/Documentation/devicetree/bindings/clock/mediatek,mt8173-mfgtop.yaml b/Documentation/devicetree/bindings/clock/mediatek,mt8173-mfgtop.yaml new file mode 100644 index 000000000000..03c3c1f8cf75 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mediatek,mt8173-mfgtop.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/clock/mediatek,mt8173-mfgtop.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT8173 MFG TOP controller + +maintainers: + - AngeloGioacchino Del Regno + +description: + The MFG TOP glue layer controls various signals going to the MFG (GPU) + block on the MT8173. + +properties: + compatible: + const: mediatek,mt8173-mfgtop + + reg: + maxItems: 1 + + clocks: + minItems: 4 + maxItems: 4 + + clock-names: + items: + - const: sys + - const: mem + - const: core + - const: clk26m + + power-domains: + maxItems: 1 + + '#clock-cells': + const: 1 + + '#power-domain-cells': + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - power-domains + - '#clock-cells' + - '#power-domain-cells' + +additionalProperties: false + +examples: + - | + #include + #include + + mfgtop: clock-controller@13fff000 { + compatible = "mediatek,mt8173-mfgtop"; + reg = <0x13fff000 0x1000>; + clocks = <&topckgen CLK_TOP_AXI_MFG_IN_SEL>, + <&topckgen CLK_TOP_MEM_MFG_IN_SEL>, + <&topckgen CLK_TOP_MFG_SEL>, + <&clk26m>; + clock-names = "sys", "mem", "core", "clk26m"; + power-domains = <&spm MT8173_POWER_DOMAIN_MFG>; + #clock-cells = <1>; + #power-domain-cells = <0>; + }; diff --git a/include/dt-bindings/clock/mt8173-clk.h b/include/dt-bindings/clock/mt8173-clk.h index 3d00c98b9654..89e982f771db 100644 --- a/include/dt-bindings/clock/mt8173-clk.h +++ b/include/dt-bindings/clock/mt8173-clk.h @@ -243,6 +243,13 @@ #define CLK_IMG_FD 7 #define CLK_IMG_NR_CLK 8 +/* MFG_SYS */ + +#define CLK_MFG_AXI 0 +#define CLK_MFG_MEM 1 +#define CLK_MFG_G3D 2 +#define CLK_MFG_26M 3 + /* MM_SYS */ #define CLK_MM_SMI_COMMON 1 -- 2.45.1.288.g0e0cd299f1-goog