Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2620830rwd; Fri, 2 Jun 2023 12:01:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Xm6ykNszBwbDhuhCNXoP0s9qCj46NOTpCuACaxt243p+rMBAOAaxZOZfFenxFKIZMxUTm X-Received: by 2002:a17:90b:3596:b0:253:2c7f:e9ad with SMTP id mm22-20020a17090b359600b002532c7fe9admr605714pjb.27.1685732495491; Fri, 02 Jun 2023 12:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685732495; cv=none; d=google.com; s=arc-20160816; b=bOfnmDfxTQFIvKNNORVMQVLJeG/1GApgrBLflBlYVkuOf4czxgkQcwaFpOSi6zFxP1 irN6Q/nGU0QB8gM5guuvB6AKBtSh6L0ouGIBbN1j9c/+NnmxqaWgF+zIyfoCl0vt5qet I26dVZMBLXWdF1VLzzn+aGtHFPMSXD1hFsAHhHdfSuX1i9GGMe4ZNZOhlnEo2AisDnKX PLffz/UqN4GlFEdqoLQSZePaCQ4z6bI/4aEo7e8x2Yx5m2HaUYT3KoOL//AvZzkKfmw/ U76kt99vsWlN7Bvt2p0684YCeTA8XSgnUoteT2ri9O9/igJv7tCZX59DiLi8YWrhqdCC /4hw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=b406wWUr0nFmh15mz5WJmjRL4+nEkf6kEIPjv0eMqdE=; b=0sCj0gNOs1Nl/BkfA4/NZk+1NghE9K2X5YrIkIXZxkHOYaPJ9qaXmzQGOTdbY/JUDA dvNUuhO3nMAEt394yvRhsCtWP/yob8qOSjaF0bUxvJBXa51l9b+NtyqnAYpV+hdhnYzI 2eJd3BeRkm0/hHZtBcPoRZSBXXPIWvVTm4gh6gRR12j5rmu3yVmDTBTiLshXjx9AbS93 6vOB9uHMjsBLxxpLHKch4okEh0ulu8XjCY40HjJ5Rbgret9dKHnwQx4DRaH9gxCfTJ3a sFjtaX3LdHVb2wcMLUbU5y5j3O6JbrTRBCb5ItH7BqtxiHz7YilT9PQ1kxe/O0jxlodT kSIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Wjv7v5HB; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s12-20020a17090aa10c00b002562a054821si1420165pjp.138.2023.06.02.12.00.56; Fri, 02 Jun 2023 12:01:35 -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=@collabora.com header.s=mail header.b=Wjv7v5HB; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236996AbjFBSf3 (ORCPT + 99 others); Fri, 2 Jun 2023 14:35:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236976AbjFBSf0 (ORCPT ); Fri, 2 Jun 2023 14:35:26 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 805A0194; Fri, 2 Jun 2023 11:35:25 -0700 (PDT) Received: from notapiano.myfiosgateway.com (zone.collabora.co.uk [167.235.23.81]) (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: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8980666066EC; Fri, 2 Jun 2023 19:35:22 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1685730924; bh=jK4RBgnhLajzb2VVh6RYcKZcAuPJaGK5uoOa+eFFoBY=; h=From:To:Cc:Subject:Date:From; b=Wjv7v5HBHtFx5on0MWE70XzJ0RLica7WNZnenTd22QUX1ETH8ac66iaJKQhXmWWyU yFapVBMRh7+JKmBgNJYxBTEMy5w8KNY4BshEJ9zL9E4qAkgotqYGtIFpOLYpee9gXl N7epNw17P/NF2aTIFBj8SQ5wkOqocT/Fl1zcpFn2u9PD+aAi3Z35yM1lK6FRyCaRcz 36gL6CYlxaaLhJ3hGg4iMoqrgLr2MjvHDIcPBCcSQP1zjz27kSmtFgC7gCH4ztc/nq OCf3PH8xC/2uq3Lisks9voOIyZCWTq6xxKipqkiKZx2tMkKQ8Vvhhd9uYVHM8yfJ1o V9Hf5JGs2r9yA== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Matthias Brugger Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Conor Dooley , Krzysztof Kozlowski , Rob Herring , Seiya Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH] arm64: dts: mediatek: mt8192: Fix CPUs capacity-dmips-mhz Date: Fri, 2 Jun 2023 14:35:15 -0400 Message-Id: <20230602183515.3778780-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 The capacity-dmips-mhz parameter was miscalculated: this SoC runs the first (Cortex-A55) cluster at a maximum of 2000MHz and the second (Cortex-A76) cluster at a maximum of 2200MHz. In order to calculate the right capacity-dmips-mhz, the following test was performed: 1. CPUFREQ governor was set to 'performance' on both clusters 2. Ran dhrystone with 500000000 iterations for 10 times on each cluster 3. Calculated the mean result for each cluster 4. Calculated DMIPS/MHz: dmips_mhz = dmips_per_second / cpu_mhz 5. Scaled results to 1024: result_c0 = dmips_mhz_c0 / dmips_mhz_c1 * 1024 The mean results for this SoC are: Cluster 0 (LITTLE): 12016411 Dhry/s Cluster 1 (BIG): 31702034 Dhry/s The calculated scaled results are: Cluster 0: 426.953226899238 (rounded to 427) Cluster 1: 1024 Fixes: 48489980e27e ("arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile") Signed-off-by: NĂ­colas F. R. A. Prado --- arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi index 63247c832f42..db17f67bb801 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi @@ -71,7 +71,7 @@ cpu0: cpu@0 { d-cache-sets = <128>; next-level-cache = <&l2_0>; performance-domains = <&performance 0>; - capacity-dmips-mhz = <530>; + capacity-dmips-mhz = <427>; }; cpu1: cpu@100 { @@ -89,7 +89,7 @@ cpu1: cpu@100 { d-cache-sets = <128>; next-level-cache = <&l2_0>; performance-domains = <&performance 0>; - capacity-dmips-mhz = <530>; + capacity-dmips-mhz = <427>; }; cpu2: cpu@200 { @@ -107,7 +107,7 @@ cpu2: cpu@200 { d-cache-sets = <128>; next-level-cache = <&l2_0>; performance-domains = <&performance 0>; - capacity-dmips-mhz = <530>; + capacity-dmips-mhz = <427>; }; cpu3: cpu@300 { @@ -125,7 +125,7 @@ cpu3: cpu@300 { d-cache-sets = <128>; next-level-cache = <&l2_0>; performance-domains = <&performance 0>; - capacity-dmips-mhz = <530>; + capacity-dmips-mhz = <427>; }; cpu4: cpu@400 { -- 2.40.1