From patchwork Wed Jun 7 09:06:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 104360 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp122568vqr; Wed, 7 Jun 2023 02:23:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ53ko8fFZlB063GcmcYT+dreETG0fYNsi00edXrIHHCcwEpHtJH9p5+dtgnO06Ccke6hIhO X-Received: by 2002:a05:6359:a96:b0:129:cce3:a877 with SMTP id em22-20020a0563590a9600b00129cce3a877mr3191349rwb.1.1686129790970; Wed, 07 Jun 2023 02:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686129790; cv=none; d=google.com; s=arc-20160816; b=CoAvz2GTH/LcoW4fZzi909OSjnH8NOdg+2NzFH5tzMuaPQQo1o7JEJJTZze7qZlfXe uGykEQETrlVNbNZXAnDlYdkyJcu5oBuv5Rg1q3AxIWCFq3wURGKBdtE0pkT4vuF069Ma hzHKm4ejfBUt3LfX3rgvktvPduSWN76PpI6sLNNKzJakccCsJsy3tQnLDFBKoDi9a67l 85/z7KhnQN927MIY9jtW3ojGKSqCs2FUgMdN/MsTLycl0Rq77mIZRl7Hjke6cY64QsZv JmByP1E2BWyaMMXFyzKJUxy7J4Ocgi08gG59Rj8A2NWmGxBHGVELMYbs6bPLbfjnBwxX pAHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Nz76j0qRG7M80pmlEKyVRAG1FYXj27a46ctowWFtgUI=; b=lhmaOlSB65/7pOPYFLAF+mK2secZvOqQ4DrGX3obBtjY8hxSBSfoYPaf/Uq1sVQgE0 pFY2p0VxVoxq5UeQAB532pOnAlMghMHjqo5hp1C+ttiEdPxZlqCXUSkZGAF9uIv7lj6I 27Uv6s/bt3HVCoSgktoqoFpdhTasIttPIXz9mE9VQXx5lFd0aejp0IXvMIApeBcqCZg7 i7FGezGUGazdifmav/m6Wida0Wz2OauP1F7ynAggvchRt66hk2a/21NHFWRF/TuBRF/A w82TJIjg0rUtpLo0J8kIVraCTfRFVEA7zrGWowPpviqdaAh71TeLIS0l2F60m3KKk9Kf Gsjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EwJ6ylXO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a17090a001500b002479bbf3246si846250pja.124.2023.06.07.02.22.57; Wed, 07 Jun 2023 02:23:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EwJ6ylXO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239782AbjFGJIQ (ORCPT + 99 others); Wed, 7 Jun 2023 05:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239795AbjFGJHl (ORCPT ); Wed, 7 Jun 2023 05:07:41 -0400 Received: from mail-oa1-x31.google.com (mail-oa1-x31.google.com [IPv6:2001:4860:4864:20::31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4468426B1 for ; Wed, 7 Jun 2023 02:07:03 -0700 (PDT) Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-1a27ffe9dcdso6801206fac.2 for ; Wed, 07 Jun 2023 02:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686128822; x=1688720822; 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=Nz76j0qRG7M80pmlEKyVRAG1FYXj27a46ctowWFtgUI=; b=EwJ6ylXOZhGaP+0ge6C4IJsrjlSUexk1wQ6jL3h3wsudSISMlA/XDzEVnr91bilrJY ctT78e5Tf15nGS3bKaNGTd0zw4MoJ/EAwEfIcwuz2YEKYPhx6pX96frDRMCVbZKPXuIf zUPolFsiG4YV2W9LmDFX6U3BILbEJB4grFYuU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686128822; x=1688720822; 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=Nz76j0qRG7M80pmlEKyVRAG1FYXj27a46ctowWFtgUI=; b=WNGMXV37+1cVGLLcN35IWPjKvfwrLUt4yybOARN/QYA4bSNPDEqt3gjgVcRdz6QE8g LU9NxrPDUitX/An2LQacaVVEa0bY/uLOGQnS6Zxg+2/+C+NKfar+jVrcUziDoluaraGN sZV8GYUUA0GRGaVb+JkqcATlQRGFzAYMHuHaKEyRdLV0ElLH98RUAx0DXtQ5j0oteVyt 14E9xgtIAjNxyrnS25RInpV5l+3OQzdbLWdgK3pPYOo994UrZy0nSV7K6wUbNCxpCDa7 +FQXMBiRagcrgucLUIoTzIK+6rBhxJVcJSIzr2OY3h/ww5T8IgzRbYhHqXr8gSISPl6a Adiw== X-Gm-Message-State: AC+VfDznwyNbiQmJxDgdztiFoHCEhbEZGjOi+j0NYvxicWAETAxGqevA FRFoYIdvT0hb06HWUYw0ln+LYw== X-Received: by 2002:a05:6358:c591:b0:125:a552:4389 with SMTP id fc17-20020a056358c59100b00125a5524389mr2980713rwb.22.1686128822414; Wed, 07 Jun 2023 02:07:02 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:443b:29bb:b677:185d]) by smtp.gmail.com with ESMTPSA id b38-20020a631b66000000b0051eff0a70d7sm8505732pgm.94.2023.06.07.02.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 02:07:02 -0700 (PDT) From: Chen-Yu Tsai To: Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley Subject: [PATCH 1/4] arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table Date: Wed, 7 Jun 2023 17:06:49 +0800 Message-ID: <20230607090653.2468317-2-wenst@chromium.org> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog In-Reply-To: <20230607090653.2468317-1-wenst@chromium.org> References: <20230607090653.2468317-1-wenst@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768035231267332582?= X-GMAIL-MSGID: =?utf-8?q?1768035231267332582?= Add a device node for the CCI (cache coherent interconnect) and an OPP table for it. The OPP table was taken from the downstream ChromeOS kernel. Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 117 +++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi index 8c02232cac38..1b754f7a0725 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -27,6 +27,115 @@ aliases { rdma1 = &rdma1; }; + cci: cci { + compatible = "mediatek,mt8186-cci"; + clocks = <&mcusys CLK_MCU_ARMPLL_BUS_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cci", "intermediate"; + operating-points-v2 = <&cci_opp>; + }; + + cci_opp: opp-table-cci { + compatible = "operating-points-v2"; + opp-shared; + + cci_opp_0: opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <600000>; + opp-level = <15>; + }; + + cci_opp_1: opp-560000000 { + opp-hz = /bits/ 64 <560000000>; + opp-microvolt = <675000>; + opp-level = <14>; + }; + + cci_opp_2: opp-612000000 { + opp-hz = /bits/ 64 <612000000>; + opp-microvolt = <693750>; + opp-level = <13>; + }; + + cci_opp_3: opp-682000000 { + opp-hz = /bits/ 64 <682000000>; + opp-microvolt = <718750>; + opp-level = <12>; + }; + + cci_opp_4: opp-752000000 { + opp-hz = /bits/ 64 <752000000>; + opp-microvolt = <743750>; + opp-level = <11>; + }; + + cci_opp_5: opp-822000000 { + opp-hz = /bits/ 64 <822000000>; + opp-microvolt = <768750>; + opp-level = <10>; + }; + + cci_opp_6: opp-875000000 { + opp-hz = /bits/ 64 <875000000>; + opp-microvolt = <781250>; + opp-level = <9>; + }; + + cci_opp_7: opp-927000000 { + opp-hz = /bits/ 64 <927000000>; + opp-microvolt = <800000>; + opp-level = <8>; + }; + + cci_opp_8: opp-980000000 { + opp-hz = /bits/ 64 <980000000>; + opp-microvolt = <818750>; + opp-level = <7>; + }; + + cci_opp_9: opp-1050000000 { + opp-hz = /bits/ 64 <1050000000>; + opp-microvolt = <843750>; + opp-level = <6>; + }; + + cci_opp_10: opp-1120000000 { + opp-hz = /bits/ 64 <1120000000>; + opp-microvolt = <862500>; + opp-level = <5>; + }; + + cci_opp_11: opp-1155000000 { + opp-hz = /bits/ 64 <1155000000>; + opp-microvolt = <887500>; + opp-level = <4>; + }; + + cci_opp_12: opp-1190000000 { + opp-hz = /bits/ 64 <1190000000>; + opp-microvolt = <906250>; + opp-level = <3>; + }; + + cci_opp_13: opp-1260000000 { + opp-hz = /bits/ 64 <1260000000>; + opp-microvolt = <950000>; + opp-level = <2>; + }; + + cci_opp_14: opp-1330000000 { + opp-hz = /bits/ 64 <1330000000>; + opp-microvolt = <993750>; + opp-level = <1>; + }; + + cci_opp_15: opp-1400000000 { + opp-hz = /bits/ 64 <1400000000>; + opp-microvolt = <1031250>; + opp-level = <0>; + }; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -83,6 +192,7 @@ cpu0: cpu@0 { d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; + mediatek,cci = <&cci>; }; cpu1: cpu@100 { @@ -101,6 +211,7 @@ cpu1: cpu@100 { d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; + mediatek,cci = <&cci>; }; cpu2: cpu@200 { @@ -119,6 +230,7 @@ cpu2: cpu@200 { d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; + mediatek,cci = <&cci>; }; cpu3: cpu@300 { @@ -137,6 +249,7 @@ cpu3: cpu@300 { d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; + mediatek,cci = <&cci>; }; cpu4: cpu@400 { @@ -155,6 +268,7 @@ cpu4: cpu@400 { d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; + mediatek,cci = <&cci>; }; cpu5: cpu@500 { @@ -173,6 +287,7 @@ cpu5: cpu@500 { d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; + mediatek,cci = <&cci>; }; cpu6: cpu@600 { @@ -191,6 +306,7 @@ cpu6: cpu@600 { d-cache-sets = <256>; next-level-cache = <&l2_1>; #cooling-cells = <2>; + mediatek,cci = <&cci>; }; cpu7: cpu@700 { @@ -209,6 +325,7 @@ cpu7: cpu@700 { d-cache-sets = <256>; next-level-cache = <&l2_1>; #cooling-cells = <2>; + mediatek,cci = <&cci>; }; idle-states { From patchwork Wed Jun 7 09:06:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 104364 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp123315vqr; Wed, 7 Jun 2023 02:25:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7gWFx88R7pkAHR/kY/MqCsGX/HL106Lg0bffEl2B3xmmT4hD8Io0TgCHCWSVaq0lYab/+C X-Received: by 2002:a05:6a00:198f:b0:656:5182:5e61 with SMTP id d15-20020a056a00198f00b0065651825e61mr5894997pfl.2.1686129904934; Wed, 07 Jun 2023 02:25:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686129904; cv=none; d=google.com; s=arc-20160816; b=hyaL74NTnrH/4C2Cv6uY2/doLbIP+5kiLZX6PHKvYqmfCja31tP3vYfTb7EygzZeKy mZi/BelL4dykYZbHmOPs909IGGYeftkw3H7sD4ycXE3iMPl2uySmMAtI0+GVAP8okpeu lQhGh2CRVSzjCI0Ltv+g5vE7SbNBvwj6xZOjWT7DLcfoA18SD56jXl+FEwXMwiWtZtAE uTbT9XGACtXa+TT0IZ1CG7qfj4eCojFcoKqFIiUUNjgX9vHTbzgztUAOFBfmfVjl/lyU Ul1qbBZWsN8B4ueAK+/kE10BT6Lhwu9aA40qYa8357QA5DuEVqmImxViSiKKIsGPtpJU hufw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3wS6HxZPw2hCtPpYfVzkDvRLSG1OCC/WwrM2i4bBWC8=; b=DNI69lnGCB2n98YoclJSNDql0KA11tJEQihQtElKkaS8CjJCZzyHBKfHl1MRDU+rfC fZLcDrhepwYiMN/znr/msNUWKRvH4aA2UkTAjVMNQSlVHFC/PVtulAlEfH+g+Q/PXjk2 euoR4g0jsX5G5f1v8rVPkSRgcVTp5yaHFmwV1EFZNx/jYfCzFjOlm5BucPMQyNViI7ej LTH74729MUzqSYQiLk6nXIGJOLGRyPMu8VbbIwk9LZk8NS+sV67JkvOOuI6gWIGyrmBi mrFSA/LKoBCJtP9bsmZFZ/RXIpNBc3ZSJDopWJJeXbRZ+TUUSKGo+BIQJ9tj7MezBbWH L0MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=baZZe3lq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f189-20020a6251c6000000b006531ba094f9si8489449pfb.135.2023.06.07.02.24.52; Wed, 07 Jun 2023 02:25:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=baZZe3lq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235158AbjFGJIS (ORCPT + 99 others); Wed, 7 Jun 2023 05:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237902AbjFGJHm (ORCPT ); Wed, 7 Jun 2023 05:07:42 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 108EA1FFD for ; Wed, 7 Jun 2023 02:07:05 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-25695bb6461so291807a91.1 for ; Wed, 07 Jun 2023 02:07:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686128824; x=1688720824; 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=3wS6HxZPw2hCtPpYfVzkDvRLSG1OCC/WwrM2i4bBWC8=; b=baZZe3lqESYWGumgMh7CEq9Lxbk6JmjVPVuWT4RYgVvGzdaGR1uLOopN/dMuwj7eru zep0o9s8amPjMM4/2Bg9fmE3at6+zmzgKCpn5ug1C1Hp18YouV5JYgurvWFKxKYoNqfq S0B3if2E6tv5VbOber8WdL2jUoeAXEIvxbIhw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686128824; x=1688720824; 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=3wS6HxZPw2hCtPpYfVzkDvRLSG1OCC/WwrM2i4bBWC8=; b=WgDT5wVTm34JjfHyUK1ORlqJ4sEE/p3pFNhXcup+raXo2df6AFjfmzt1wih3pnBUMV ov6KU0PgT7xYosvf+3Pw4TU5FKT37Or7TpBZzWlHIXXFATlGiOoiuLooQZv3+AqjePl1 qfC6lbr/aENy0hF7Mz+j6/xVRfLM8WGJmOnAeZqsNxVjkqstEtPXwRw3V6eAHXZT2JFK ag2MLXvf0w0Wi1VcQBvl6Oz6r7nVynRaxdsnEpYGkCNpj1PHAB+8/AMzC/YqHSPlNP3n 9aGf2JOTETDOZ3Fs7YUWTC2vuN5mOeeaa2uP9ucnlR5YdUYDfbQOrePyi7nrfqL2utvE iCTg== X-Gm-Message-State: AC+VfDwfeaE1hr6ylBpGnd3uYLcb0K6tJsUlWG+HuuYYsLlq1s6JDWoU WoomlApYkWufLYS623MEQG7m/Q== X-Received: by 2002:a17:90a:67ca:b0:256:9b5c:2aa2 with SMTP id g10-20020a17090a67ca00b002569b5c2aa2mr5718892pjm.6.1686128824493; Wed, 07 Jun 2023 02:07:04 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:443b:29bb:b677:185d]) by smtp.gmail.com with ESMTPSA id b38-20020a631b66000000b0051eff0a70d7sm8505732pgm.94.2023.06.07.02.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 02:07:04 -0700 (PDT) From: Chen-Yu Tsai To: Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley Subject: [PATCH 2/4] arm64: dts: mediatek: mt8186: Wire up CPU frequency/voltage scaling Date: Wed, 7 Jun 2023 17:06:50 +0800 Message-ID: <20230607090653.2468317-3-wenst@chromium.org> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog In-Reply-To: <20230607090653.2468317-1-wenst@chromium.org> References: <20230607090653.2468317-1-wenst@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768035350919773490?= X-GMAIL-MSGID: =?utf-8?q?1768035350919773490?= This adds clocks, dynamic power coefficients, and OPP tables for the CPU cores, so that everything required at the SoC level for CPU freqency and voltage scaling is available. Signed-off-by: Chen-Yu Tsai --- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 274 +++++++++++++++++++++++ 1 file changed, 274 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi index 1b754f7a0725..6735c1feb26d 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -136,6 +136,240 @@ cci_opp_15: opp-1400000000 { }; }; + cluster0_opp: opp-table-cluster0 { + compatible = "operating-points-v2"; + opp-shared; + + opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <600000>; + opp-level = <15>; + required-opps = <&cci_opp_0>; + }; + + opp-774000000 { + opp-hz = /bits/ 64 <774000000>; + opp-microvolt = <675000>; + opp-level = <14>; + required-opps = <&cci_opp_1>; + }; + + opp-875000000 { + opp-hz = /bits/ 64 <875000000>; + opp-microvolt = <700000>; + opp-level = <13>; + required-opps = <&cci_opp_2>; + }; + + opp-975000000 { + opp-hz = /bits/ 64 <975000000>; + opp-microvolt = <725000>; + opp-level = <12>; + required-opps = <&cci_opp_3>; + }; + + opp-1075000000 { + opp-hz = /bits/ 64 <1075000000>; + opp-microvolt = <750000>; + opp-level = <11>; + required-opps = <&cci_opp_4>; + }; + + opp-1175000000 { + opp-hz = /bits/ 64 <1175000000>; + opp-microvolt = <775000>; + opp-level = <10>; + required-opps = <&cci_opp_5>; + }; + + opp-1275000000 { + opp-hz = /bits/ 64 <1275000000>; + opp-microvolt = <800000>; + opp-level = <9>; + required-opps = <&cci_opp_6>; + }; + + opp-1375000000 { + opp-hz = /bits/ 64 <1375000000>; + opp-microvolt = <825000>; + opp-level = <8>; + required-opps = <&cci_opp_7>; + }; + + opp-1500000000 { + opp-hz = /bits/ 64 <1500000000>; + opp-microvolt = <856250>; + opp-level = <7>; + required-opps = <&cci_opp_8>; + }; + + opp-1618000000 { + opp-hz = /bits/ 64 <1618000000>; + opp-microvolt = <875000>; + opp-level = <6>; + required-opps = <&cci_opp_9>; + }; + + opp-1666000000 { + opp-hz = /bits/ 64 <1666000000>; + opp-microvolt = <900000>; + opp-level = <5>; + required-opps = <&cci_opp_10>; + }; + + opp-1733000000 { + opp-hz = /bits/ 64 <1733000000>; + opp-microvolt = <925000>; + opp-level = <4>; + required-opps = <&cci_opp_11>; + }; + + opp-1800000000 { + opp-hz = /bits/ 64 <1800000000>; + opp-microvolt = <950000>; + opp-level = <3>; + required-opps = <&cci_opp_12>; + }; + + opp-1866000000 { + opp-hz = /bits/ 64 <1866000000>; + opp-microvolt = <981250>; + opp-level = <2>; + required-opps = <&cci_opp_13>; + }; + + opp-1933000000 { + opp-hz = /bits/ 64 <1933000000>; + opp-microvolt = <1006250>; + opp-level = <1>; + required-opps = <&cci_opp_14>; + }; + + opp-2000000000 { + opp-hz = /bits/ 64 <2000000000>; + opp-microvolt = <1031250>; + opp-level = <0>; + required-opps = <&cci_opp_15>; + }; + }; + + cluster1_opp: opp-table-cluster1 { + compatible = "operating-points-v2"; + opp-shared; + + opp-774000000 { + opp-hz = /bits/ 64 <774000000>; + opp-microvolt = <675000>; + opp-level = <15>; + required-opps = <&cci_opp_0>; + }; + + opp-835000000 { + opp-hz = /bits/ 64 <835000000>; + opp-microvolt = <693750>; + opp-level = <14>; + required-opps = <&cci_opp_1>; + }; + + opp-919000000 { + opp-hz = /bits/ 64 <919000000>; + opp-microvolt = <718750>; + opp-level = <13>; + required-opps = <&cci_opp_2>; + }; + + opp-1002000000 { + opp-hz = /bits/ 64 <1002000000>; + opp-microvolt = <743750>; + opp-level = <12>; + required-opps = <&cci_opp_3>; + }; + + opp-1085000000 { + opp-hz = /bits/ 64 <1085000000>; + opp-microvolt = <775000>; + opp-level = <11>; + required-opps = <&cci_opp_4>; + }; + + opp-1169000000 { + opp-hz = /bits/ 64 <1169000000>; + opp-microvolt = <800000>; + opp-level = <10>; + required-opps = <&cci_opp_5>; + }; + + opp-1308000000 { + opp-hz = /bits/ 64 <1308000000>; + opp-microvolt = <843750>; + opp-level = <9>; + required-opps = <&cci_opp_6>; + }; + + opp-1419000000 { + opp-hz = /bits/ 64 <1419000000>; + opp-microvolt = <875000>; + opp-level = <8>; + required-opps = <&cci_opp_7>; + }; + + opp-1530000000 { + opp-hz = /bits/ 64 <1530000000>; + opp-microvolt = <912500>; + opp-level = <7>; + required-opps = <&cci_opp_8>; + }; + + opp-1670000000 { + opp-hz = /bits/ 64 <1670000000>; + opp-microvolt = <956250>; + opp-level = <6>; + required-opps = <&cci_opp_9>; + }; + + opp-1733000000 { + opp-hz = /bits/ 64 <1733000000>; + opp-microvolt = <981250>; + opp-level = <5>; + required-opps = <&cci_opp_10>; + }; + + opp-1796000000 { + opp-hz = /bits/ 64 <1796000000>; + opp-microvolt = <1012500>; + opp-level = <4>; + required-opps = <&cci_opp_11>; + }; + + opp-1860000000 { + opp-hz = /bits/ 64 <1860000000>; + opp-microvolt = <1037500>; + opp-level = <3>; + required-opps = <&cci_opp_12>; + }; + + opp-1923000000 { + opp-hz = /bits/ 64 <1923000000>; + opp-microvolt = <1062500>; + opp-level = <2>; + required-opps = <&cci_opp_13>; + }; + + cluster1_opp_14: opp-1986000000 { + opp-hz = /bits/ 64 <1986000000>; + opp-microvolt = <1093750>; + opp-level = <1>; + required-opps = <&cci_opp_14>; + }; + + cluster1_opp_15: opp-2050000000 { + opp-hz = /bits/ 64 <2050000000>; + opp-microvolt = <1118750>; + opp-level = <0>; + required-opps = <&cci_opp_15>; + }; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -182,6 +416,11 @@ cpu0: cpu@0 { reg = <0x000>; enable-method = "psci"; clock-frequency = <2000000000>; + clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; + dynamic-power-coefficient = <84>; capacity-dmips-mhz = <382>; cpu-idle-states = <&cpu_ret_l &cpu_off_l>; i-cache-size = <32768>; @@ -201,6 +440,11 @@ cpu1: cpu@100 { reg = <0x100>; enable-method = "psci"; clock-frequency = <2000000000>; + clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; + dynamic-power-coefficient = <84>; capacity-dmips-mhz = <382>; cpu-idle-states = <&cpu_ret_l &cpu_off_l>; i-cache-size = <32768>; @@ -220,6 +464,11 @@ cpu2: cpu@200 { reg = <0x200>; enable-method = "psci"; clock-frequency = <2000000000>; + clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; + dynamic-power-coefficient = <84>; capacity-dmips-mhz = <382>; cpu-idle-states = <&cpu_ret_l &cpu_off_l>; i-cache-size = <32768>; @@ -239,6 +488,11 @@ cpu3: cpu@300 { reg = <0x300>; enable-method = "psci"; clock-frequency = <2000000000>; + clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; + dynamic-power-coefficient = <84>; capacity-dmips-mhz = <382>; cpu-idle-states = <&cpu_ret_l &cpu_off_l>; i-cache-size = <32768>; @@ -258,6 +512,11 @@ cpu4: cpu@400 { reg = <0x400>; enable-method = "psci"; clock-frequency = <2000000000>; + clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; + dynamic-power-coefficient = <84>; capacity-dmips-mhz = <382>; cpu-idle-states = <&cpu_ret_l &cpu_off_l>; i-cache-size = <32768>; @@ -277,6 +536,11 @@ cpu5: cpu@500 { reg = <0x500>; enable-method = "psci"; clock-frequency = <2000000000>; + clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; + dynamic-power-coefficient = <84>; capacity-dmips-mhz = <382>; cpu-idle-states = <&cpu_ret_l &cpu_off_l>; i-cache-size = <32768>; @@ -296,6 +560,11 @@ cpu6: cpu@600 { reg = <0x600>; enable-method = "psci"; clock-frequency = <2050000000>; + clocks = <&mcusys CLK_MCU_ARMPLL_BL_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster1_opp>; + dynamic-power-coefficient = <335>; capacity-dmips-mhz = <1024>; cpu-idle-states = <&cpu_ret_b &cpu_off_b>; i-cache-size = <65536>; @@ -315,6 +584,11 @@ cpu7: cpu@700 { reg = <0x700>; enable-method = "psci"; clock-frequency = <2050000000>; + clocks = <&mcusys CLK_MCU_ARMPLL_BL_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster1_opp>; + dynamic-power-coefficient = <335>; capacity-dmips-mhz = <1024>; cpu-idle-states = <&cpu_ret_b &cpu_off_b>; i-cache-size = <65536>; From patchwork Wed Jun 7 09:06:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 104358 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp120611vqr; Wed, 7 Jun 2023 02:18:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kIfOcCpkimoFFLHJI+EjTcvcO8oeothn7B5b9YwpnjmwAILlbsnDalbbQIefSJxb+RH8T X-Received: by 2002:a92:d4c9:0:b0:337:8342:e6a5 with SMTP id o9-20020a92d4c9000000b003378342e6a5mr6835782ilm.31.1686129522759; Wed, 07 Jun 2023 02:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686129522; cv=none; d=google.com; s=arc-20160816; b=LSwT8A0FE3ywYEgyrmtxFPe6pMv7GNKOg5lNmHDsvVDrbr83/DVJ99hI2snWsw1DPA 2W6HowfBV+rF2IJbrgfYJiNBscmlAccroR+jTevlOSXhVJEh28UQdKdeLlPzbp3ztKNp uKxJJLDMXe2TbEe4cBZ5hHXJtuk3lkU3TY7Qez9fODDpzSVPnpsjuyyliTcLMiLaDkBk HedqZYnkV8Xv04PzKzaF1Kp2e5JdBRdM+IiD2uQ9vQJ5NRP+gOv/hiyU5DjZnSSzBqtV 5psjz2vBcEVz0xJvaf65W8aQ7JaQDT8I6FLUiStZfGb36PiTQj5OY0/WBFUDVOiRHLZY 1zgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1oMUOQweNkFHrLBYGCRkYWKHPdRqVZlt9YUEgkC1xGo=; b=xSzIrQQsqqYCK2Zd5fcXdXG0QReN4IzJ9s+e+mi4oaHSi7C8p2q0OzPTesz46J27I7 PI5/pmH6FMQW5gFm1c8pPcflPlYYZtSq2oj3fwlmgrQg+mmYzXYJ0OwbkIIblXvJyiUq a3yFtZX/aMEymVKl3MDQvx32Qo1bFSo1kJKbFHKNESulf6Fg8j2lVqbqQ9xebW5Ih5U8 LvbOd1Uyf8Cci1ZF4xuomiJKGEmjts0Ru2Yralflu8oQKYvaVNcffyDTYRuCJukZmFuO SPSNLB6xkbqAw0f+n3ZMjTLWm7lZqapP40C6m7KlC1EdBcoIxGwYzCCMf0wqudyw9S6T O5mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YzqZuJik; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l5-20020a633e05000000b00502d825633asi8906084pga.639.2023.06.07.02.18.29; Wed, 07 Jun 2023 02:18:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YzqZuJik; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239828AbjFGJI2 (ORCPT + 99 others); Wed, 7 Jun 2023 05:08:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239322AbjFGJHt (ORCPT ); Wed, 7 Jun 2023 05:07:49 -0400 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AF1126B9 for ; Wed, 7 Jun 2023 02:07:07 -0700 (PDT) Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6b29c972e00so946967a34.1 for ; Wed, 07 Jun 2023 02:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686128826; x=1688720826; 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=1oMUOQweNkFHrLBYGCRkYWKHPdRqVZlt9YUEgkC1xGo=; b=YzqZuJikN44AANBQIeQ24Hb3eDg0RnpxZA4TvXJJ3RzBfTYK6A+PmLH0jhuLpe0ktZ x43yz46wMbqMdNlPqd6hfhCbBphIlT1+Vk/gAtT9cdkjnjcmrbmPv0DDFFyW7UZlObUR BAds9fl8sjNg9eA6uuzo4Fm+coqH38JBWnlzA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686128826; x=1688720826; 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=1oMUOQweNkFHrLBYGCRkYWKHPdRqVZlt9YUEgkC1xGo=; b=cOtN5mO9H/FikBQ688d2LYNyzpXd70s2ExhyrhISBdg1lbNZcQ1d2xlH9p3spYGjo2 b7FhnOq9PgT9tHJGQBdfEZv3PJXI7Aa5TNqduIFdc7M+NEfwvHyIKl6esye/pJyZx4he uu6WKeJ+Ur7sbvP0CD7WA3wUHyeb3kj9LgmM/zUrx+YdBGWAzWuML9XHE91Wq6hUvnuk fG25CYmPP9CEoXEU+Adf0S5y0qKRhnkrZTVM5CwaSZrquA2XqXpUoYQ3QoZGrDvm9tqQ ZfzyAtNaZYVzZFZHy4RNKs6diX5KXqMvAaZQ/pz85c20Vf0X8CFwyYHTtDTVdIFQMyg3 d5AA== X-Gm-Message-State: AC+VfDxgXvuVfotu0vrk9iTsDBElEBt+buAHW1gntdnssP/tL49qfxyX OJkG6fknZN/IzaTu8v9QPWmdPA== X-Received: by 2002:aca:240a:0:b0:39b:f558:8cbf with SMTP id n10-20020aca240a000000b0039bf5588cbfmr4422662oic.12.1686128826597; Wed, 07 Jun 2023 02:07:06 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:443b:29bb:b677:185d]) by smtp.gmail.com with ESMTPSA id b38-20020a631b66000000b0051eff0a70d7sm8505732pgm.94.2023.06.07.02.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 02:07:06 -0700 (PDT) From: Chen-Yu Tsai To: Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley Subject: [PATCH 3/4] arm64: dts: mediatek: mt8186: Add GPU speed bin NVMEM cells Date: Wed, 7 Jun 2023 17:06:51 +0800 Message-ID: <20230607090653.2468317-4-wenst@chromium.org> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog In-Reply-To: <20230607090653.2468317-1-wenst@chromium.org> References: <20230607090653.2468317-1-wenst@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768034950803895465?= X-GMAIL-MSGID: =?utf-8?q?1768034950803895465?= On the MT8186, the chip is binned for different GPU voltages at the highest OPPs. The binning value is stored in the efuse. Add the NVMEM cell, and tie it to the GPU. Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi index 6735c1feb26d..c58d7eb87b1d 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -1567,6 +1567,11 @@ efuse: efuse@11cb0000 { reg = <0 0x11cb0000 0 0x1000>; #address-cells = <1>; #size-cells = <1>; + + gpu_speedbin: gpu-speed-bin@59c { + reg = <0x59c 0x4>; + bits = <0 3>; + }; }; mipi_tx0: dsi-phy@11cc0000 { @@ -1599,6 +1604,8 @@ gpu: gpu@13040000 { <&spm MT8186_POWER_DOMAIN_MFG3>; power-domain-names = "core0", "core1"; #cooling-cells = <2>; + nvmem-cells = <&gpu_speedbin>; + nvmem-cell-names = "speed-bin"; status = "disabled"; }; From patchwork Wed Jun 7 09:06:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 104363 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp122914vqr; Wed, 7 Jun 2023 02:24:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43XcWbF6FvN2hfrEIk0JRhIRgmpgIA9IWmakJOnMKP67YN7i/jK3tVCzoWmllcMuQeahlZ X-Received: by 2002:a05:687c:a:b0:19f:1df3:ffce with SMTP id yf10-20020a05687c000a00b0019f1df3ffcemr6423218oab.53.1686129843450; Wed, 07 Jun 2023 02:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686129843; cv=none; d=google.com; s=arc-20160816; b=SOcp5UMkBKJZuplLmXus7n9g3a33xg4Mj5EwUkpt4i4Bd5b27i3/bTmfn/Mx8rq/y7 PKHswioAAy+s+8XV60/4ar8KIuwq2BATEq5pNtf/ukA1JelhlPC3dHNQ0+m40pd0R0h8 LdVYiwug6Jd6T/RImxc+tA+F+sqcQfkiqL5vXM+vSTM4m1bAep4+ke+EZ8NgjlaqQcFe b15iJ8jFpVBzguNQKFtBNmV0zCuI40u7qB/kYm1zvobC2nr8Y9Hb6JB0Rx61jlOm54qE plZzCw+GvDzX1dluOI1gbodrubPGyTGXTuLi/Jf09YwdmXtaR3jzqxVsKhiqapDSghdS //Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=56q05UsuazQ3l9IlZm8IljgHBiGaLsgNecYNIgR23ec=; b=ZlzKVaoPL1fl/4Ohp3eULOO5SC8qeQ7SRbBL4a9QJ9iLr6bn2PftQcZD3vKUqHW3kQ vLfE0XWh9+hyD8mXv3CfjNJggTMEfZrm8CkTpw6ioFQXh2KEzd3cQrBgvBsguXwWmYjv 1RBQuV709v1HUqQFGbtD+O19R4prHft1RXiS5WlyxWsaN21DVp+oFEGRBIOh9tQTVxl7 NEYGScJtw6yMQGPVUDaKnUk/2sMGkfit51Whr3I5uPhkoEaV48QrllgbHfgIvtUgsidx Mbsm5+jqqTA88TK+ioJkcvtb2ls4kcqRwK2bJnrNEvnO7edYt4mEuHYGBLspc4rkDOEx y7jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Pbg94OW6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t1-20020a639541000000b0050bc9305e5bsi8597105pgn.122.2023.06.07.02.23.50; Wed, 07 Jun 2023 02:24:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Pbg94OW6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239750AbjFGJIf (ORCPT + 99 others); Wed, 7 Jun 2023 05:08:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239345AbjFGJHy (ORCPT ); Wed, 7 Jun 2023 05:07:54 -0400 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CD612705 for ; Wed, 7 Jun 2023 02:07:09 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-777a9d7efabso139316039f.0 for ; Wed, 07 Jun 2023 02:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686128828; x=1688720828; 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=56q05UsuazQ3l9IlZm8IljgHBiGaLsgNecYNIgR23ec=; b=Pbg94OW6ek039a4YB9fBJOxqVm+c0gaM+NU3BtgP5wjdxHtmeqiTua5bs0no0CzVLD NTtR6cd3xEdCHngH4Od25Yaad1QfhRKp6dzXsWp8a8B27Yuznc7YnpifNu/2Jfh8CVT6 LGfEPy0OjxPUv4lrbBwjjmBYevQSsE9bZIFvo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686128828; x=1688720828; 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=56q05UsuazQ3l9IlZm8IljgHBiGaLsgNecYNIgR23ec=; b=Ug5kDVI3z5syeMk4Sb6wnKZkEdks4Uk/Sju4YsHr2lLguXyPOe/9xYe5fC8wHB35E/ Kd73Fc0XftXKBNR1JRpj6K15kfLjsFQX0i0PWCxGw7iz9FtYeSob6x8eWMyiOKj6b/oR UWhKKueS9gea+q4DxYXbKq5MJUEhJjFxwwuUrXfr9BYmJgWLOIkrFXjjQiQ449M3P9y+ HZ2B9lg3CS8f4w/+QbOf4EkB1pEWCM68Jkr5th7eOOuVqjMNNaNJvqvcSKSGtrGyN3i0 K3O1PS51nO0d7+I7xOeu2aUddrxvxWNomTuwrVSHp0jvKL9d8qVYaPxFf76cKFAzcBso jLAg== X-Gm-Message-State: AC+VfDzNnXOgBuoyalgNw0iRPXvWugP0JBsONDUiKTY/zif5zMShZJ+4 oi8xyFV/BJi8j1X+Mx0K1Xw52A== X-Received: by 2002:a6b:e31a:0:b0:777:b409:fb67 with SMTP id u26-20020a6be31a000000b00777b409fb67mr5631749ioc.4.1686128828683; Wed, 07 Jun 2023 02:07:08 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:443b:29bb:b677:185d]) by smtp.gmail.com with ESMTPSA id b38-20020a631b66000000b0051eff0a70d7sm8505732pgm.94.2023.06.07.02.07.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 02:07:08 -0700 (PDT) From: Chen-Yu Tsai To: Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley Subject: [PATCH 4/4] arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling Date: Wed, 7 Jun 2023 17:06:52 +0800 Message-ID: <20230607090653.2468317-5-wenst@chromium.org> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog In-Reply-To: <20230607090653.2468317-1-wenst@chromium.org> References: <20230607090653.2468317-1-wenst@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768035286623148348?= X-GMAIL-MSGID: =?utf-8?q?1768035286623148348?= Add the GPU's OPP table. This is from the downstream ChromeOS kernel, adapted to the new upstream opp-supported-hw binning format. Also add dynamic-power-coefficient for the GPU. Also add label for mfg1 power domain. This is to be used at the board level to add a regulator supply for the power domain. Signed-off-by: Chen-Yu Tsai --- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 140 ++++++++++++++++++++++- 1 file changed, 139 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi index c58d7eb87b1d..a34489e27cd4 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -695,6 +695,142 @@ clk32k: oscillator-32k { clock-output-names = "clk32k"; }; + gpu_opp_table: opp-table-gpu { + compatible = "operating-points-v2"; + + opp-299000000 { + opp-hz = /bits/ 64 <299000000>; + opp-microvolt = <612500>; + opp-supported-hw = <0x38>; + }; + + opp-332000000 { + opp-hz = /bits/ 64 <332000000>; + opp-microvolt = <625000>; + opp-supported-hw = <0x38>; + }; + + opp-366000000 { + opp-hz = /bits/ 64 <366000000>; + opp-microvolt = <637500>; + opp-supported-hw = <0x38>; + }; + + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <643750>; + opp-supported-hw = <0x38>; + }; + + opp-434000000 { + opp-hz = /bits/ 64 <434000000>; + opp-microvolt = <656250>; + opp-supported-hw = <0x38>; + }; + + opp-484000000 { + opp-hz = /bits/ 64 <484000000>; + opp-microvolt = <668750>; + opp-supported-hw = <0x38>; + }; + + opp-535000000 { + opp-hz = /bits/ 64 <535000000>; + opp-microvolt = <687500>; + opp-supported-hw = <0x38>; + }; + + opp-586000000 { + opp-hz = /bits/ 64 <586000000>; + opp-microvolt = <700000>; + opp-supported-hw = <0x38>; + }; + + opp-637000000 { + opp-hz = /bits/ 64 <637000000>; + opp-microvolt = <712500>; + opp-supported-hw = <0x38>; + }; + + opp-690000000 { + opp-hz = /bits/ 64 <690000000>; + opp-microvolt = <737500>; + opp-supported-hw = <0x38>; + }; + + opp-743000000 { + opp-hz = /bits/ 64 <743000000>; + opp-microvolt = <756250>; + opp-supported-hw = <0x38>; + }; + + opp-796000000 { + opp-hz = /bits/ 64 <796000000>; + opp-microvolt = <781250>; + opp-supported-hw = <0x38>; + }; + + opp-850000000 { + opp-hz = /bits/ 64 <850000000>; + opp-microvolt = <800000>; + opp-supported-hw = <0x38>; + }; + + opp-900000000-3 { + opp-hz = /bits/ 64 <900000000>; + opp-microvolt = <850000>; + opp-supported-hw = <0x8>; + }; + + opp-900000000-4 { + opp-hz = /bits/ 64 <900000000>; + opp-microvolt = <837500>; + opp-supported-hw = <0x10>; + }; + + opp-900000000-5 { + opp-hz = /bits/ 64 <900000000>; + opp-microvolt = <825000>; + opp-supported-hw = <0x30>; + }; + + opp-950000000-3 { + opp-hz = /bits/ 64 <950000000>; + opp-microvolt = <900000>; + opp-supported-hw = <0x8>; + }; + + opp-950000000-4 { + opp-hz = /bits/ 64 <950000000>; + opp-microvolt = <875000>; + opp-supported-hw = <0x10>; + }; + + opp-950000000-5 { + opp-hz = /bits/ 64 <950000000>; + opp-microvolt = <850000>; + opp-supported-hw = <0x30>; + }; + + opp-1000000000-3 { + opp-hz = /bits/ 64 <1000000000>; + opp-microvolt = <950000>; + opp-supported-hw = <0x8>; + }; + + opp-1000000000-4 { + opp-hz = /bits/ 64 <1000000000>; + opp-microvolt = <912500>; + opp-supported-hw = <0x10>; + }; + + opp-1000000000-5 { + opp-hz = /bits/ 64 <1000000000>; + opp-microvolt = <875000>; + opp-supported-hw = <0x30>; + }; + }; + pmu-a55 { compatible = "arm,cortex-a55-pmu"; interrupt-parent = <&gic>; @@ -813,7 +949,7 @@ mfg0: power-domain@MT8186_POWER_DOMAIN_MFG0 { #size-cells = <0>; #power-domain-cells = <1>; - power-domain@MT8186_POWER_DOMAIN_MFG1 { + mfg1: power-domain@MT8186_POWER_DOMAIN_MFG1 { reg = ; mediatek,infracfg = <&infracfg_ao>; #address-cells = <1>; @@ -1606,6 +1742,8 @@ gpu: gpu@13040000 { #cooling-cells = <2>; nvmem-cells = <&gpu_speedbin>; nvmem-cell-names = "speed-bin"; + operating-points-v2 = <&gpu_opp_table>; + dynamic-power-coefficient = <4687>; status = "disabled"; };