From nobody Sat Apr 27 12:43:53 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDFF2C7EE2D for ; Fri, 2 Jun 2023 18:35:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236998AbjFBSf3 (ORCPT ); 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: quoted-printable 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 =3D dmips_per_second / cpu_mhz 5. Scaled results to 1024: result_c0 =3D 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 bo= ard dts and Makefile") Signed-off-by: N=C3=ADcolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno --- 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 =3D <128>; next-level-cache =3D <&l2_0>; performance-domains =3D <&performance 0>; - capacity-dmips-mhz =3D <530>; + capacity-dmips-mhz =3D <427>; }; =20 cpu1: cpu@100 { @@ -89,7 +89,7 @@ cpu1: cpu@100 { d-cache-sets =3D <128>; next-level-cache =3D <&l2_0>; performance-domains =3D <&performance 0>; - capacity-dmips-mhz =3D <530>; + capacity-dmips-mhz =3D <427>; }; =20 cpu2: cpu@200 { @@ -107,7 +107,7 @@ cpu2: cpu@200 { d-cache-sets =3D <128>; next-level-cache =3D <&l2_0>; performance-domains =3D <&performance 0>; - capacity-dmips-mhz =3D <530>; + capacity-dmips-mhz =3D <427>; }; =20 cpu3: cpu@300 { @@ -125,7 +125,7 @@ cpu3: cpu@300 { d-cache-sets =3D <128>; next-level-cache =3D <&l2_0>; performance-domains =3D <&performance 0>; - capacity-dmips-mhz =3D <530>; + capacity-dmips-mhz =3D <427>; }; =20 cpu4: cpu@400 { --=20 2.40.1