Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7288091rwb; Tue, 6 Dec 2022 03:58:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf4mBazqkm3FjZSwBtSyI6ZxNv12vj7IyqCX1shJ/AmsH0qQfpDhfZG7dOKywvm8Rw6QhsQ1 X-Received: by 2002:a17:903:3314:b0:189:a208:d13d with SMTP id jk20-20020a170903331400b00189a208d13dmr33760437plb.144.1670327903275; Tue, 06 Dec 2022 03:58:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670327903; cv=none; d=google.com; s=arc-20160816; b=B7/iS7jckyEMvRmSfDMAMzr2uYNxUom6UAJmZHIp5MKOBcTH67A76fpGcPltWRIvMf el0tu8Ocvvbie23Y4/C5+SUK6HF3eMAGjM1M5yG51GWdr44JwHGq29qC+gpHu10IQSW9 YuGVZv5fHUtFE7p35oggG3rvxwyfX/qEZe1SJOMApz8rRbjrYhW3lzEI1QwaqSXMKDeH MNQ45C4ZUYlRCW05Boqtj/KyXyVLX0eZ0r9ua7hBMDX1dU3mdFqMeKv4DVLmr7iBE9il 2HA1wPolggSVqDbeCHynyuyGAHweXvocIuhmekSCxr92xzIyxCF1/SyOD25pTupWcnL6 LNVA== 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=i4Emk+DZV4iVSdyVssYO2v06rARuSbXjBsgkXkP2558=; b=I9cQlEKm2eWo4eCfNjRe2xMu8BqjwfDq8AYmfG42GlOH8i0U0oPZ2JGL618tsi3tEy i0ylNyVnTGmH3SqFAOeVMtwEZCrl3G3+MegA5yCb6Tpot1uz24QaZVt+IhGErBcsSH+X WAyUvOLvawoOr8jcvljfNNttZ0xvnm8aXYe+3+hH47On7JFPqCcCvY9EPrsqKauOeSwb ubkuJro7EdMqJd3M7T2d1MFlZCHWk3USpNxgLmp+si6bNRjd6HIzdpErUH010eGQE2PV kZrdDHsDDYbmeLfUMXtXqDhs0KM2uNWgbbdHkcZEjfgLINlV8vuPm7WcIclI+qWWOGCq /TWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=D0iDqCNM; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i191-20020a6387c8000000b00478cc0a100asi3846644pge.673.2022.12.06.03.58.12; Tue, 06 Dec 2022 03:58:23 -0800 (PST) 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=D0iDqCNM; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234534AbiLFLXu (ORCPT + 79 others); Tue, 6 Dec 2022 06:23:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234051AbiLFLXk (ORCPT ); Tue, 6 Dec 2022 06:23:40 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61F4410D1; Tue, 6 Dec 2022 03:23:38 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (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: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 9A13E6602AB7; Tue, 6 Dec 2022 11:23:36 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1670325817; bh=BVRfMtyMwCW0uJUlIomeaMSMRsqv9hI5Ac5ZtARAL88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D0iDqCNMaVr/fLBzKRLQ2q8AeNqg1INofHA1m2ml76G9DY5GIU+mk7za6818i3ruS V3hVuskVftUjbI8eKKZy6OXUBlW4ZnzjoGvS2lk93lVrvYxw3d8mFj4DN5Y80XjKpp qQyVUcTB7lCoylb/H3TFkKxSsdvmlkVDC4Lzaajo0D6sWJCDB+8EqurFpvUeToCclX lZATARRI5zFy5cJJ6sPGXkmTDOOPhSLjJQyko0e9XzlX1U0o3y7O9eKB+mUqfQpXIb tPacq6AVDVWQ462Oe9FVEcnVFc9ADgc88/Y5jHZ7XlUsmbGEEhewHWRdM1GVEv3GwM kA/oxc5rSgCbg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, nfraprado@collabora.com, kernel@collabora.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno Subject: [PATCH 1/5] arm64: dts: mt8195: Add complete CPU caches information Date: Tue, 6 Dec 2022 12:23:26 +0100 Message-Id: <20221206112330.78431-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221206112330.78431-1-angelogioacchino.delregno@collabora.com> References: <20221206112330.78431-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 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 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 This SoC features two clusters composed of: - 4x Cortex A55: 32KB I-cache and 32KB D-cache, 4-way set associative, per-cpu 128KB L2 cache, 4-way set associative; - 4x Cortex A78: 64KB I-cache and 64KB D-cache, 4-way set associative, per-cpu 256KB L2 cache, 8-way set associative; Moreover, the two clusters are sharing a DSU L3 cache with size 2MB, 16-way set associative. With that in mind, add the appropriate properties needed to specify the caches information for this SoC, which will now be correctly exported to sysfs. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 58 ++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index 5d31536f4c48..539c49324d64 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -39,6 +39,12 @@ cpu0: cpu@0 { clock-frequency = <1701000000>; capacity-dmips-mhz = <308>; cpu-idle-states = <&cpu_off_l &cluster_off_l>; + i-cache-size = <32768>; + i-cache-line-size = <64>; + i-cache-sets = <128>; + d-cache-size = <32768>; + d-cache-line-size = <64>; + d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; }; @@ -52,6 +58,12 @@ cpu1: cpu@100 { clock-frequency = <1701000000>; capacity-dmips-mhz = <308>; cpu-idle-states = <&cpu_off_l &cluster_off_l>; + i-cache-size = <32768>; + i-cache-line-size = <64>; + i-cache-sets = <128>; + d-cache-size = <32768>; + d-cache-line-size = <64>; + d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; }; @@ -65,6 +77,12 @@ cpu2: cpu@200 { clock-frequency = <1701000000>; capacity-dmips-mhz = <308>; cpu-idle-states = <&cpu_off_l &cluster_off_l>; + i-cache-size = <32768>; + i-cache-line-size = <64>; + i-cache-sets = <128>; + d-cache-size = <32768>; + d-cache-line-size = <64>; + d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; }; @@ -78,6 +96,12 @@ cpu3: cpu@300 { clock-frequency = <1701000000>; capacity-dmips-mhz = <308>; cpu-idle-states = <&cpu_off_l &cluster_off_l>; + i-cache-size = <32768>; + i-cache-line-size = <64>; + i-cache-sets = <128>; + d-cache-size = <32768>; + d-cache-line-size = <64>; + d-cache-sets = <128>; next-level-cache = <&l2_0>; #cooling-cells = <2>; }; @@ -91,6 +115,12 @@ cpu4: cpu@400 { clock-frequency = <2171000000>; capacity-dmips-mhz = <1024>; cpu-idle-states = <&cpu_off_b &cluster_off_b>; + i-cache-size = <65536>; + i-cache-line-size = <64>; + i-cache-sets = <256>; + d-cache-size = <65536>; + d-cache-line-size = <64>; + d-cache-sets = <256>; next-level-cache = <&l2_1>; #cooling-cells = <2>; }; @@ -104,6 +134,12 @@ cpu5: cpu@500 { clock-frequency = <2171000000>; capacity-dmips-mhz = <1024>; cpu-idle-states = <&cpu_off_b &cluster_off_b>; + i-cache-size = <65536>; + i-cache-line-size = <64>; + i-cache-sets = <256>; + d-cache-size = <65536>; + d-cache-line-size = <64>; + d-cache-sets = <256>; next-level-cache = <&l2_1>; #cooling-cells = <2>; }; @@ -117,6 +153,12 @@ cpu6: cpu@600 { clock-frequency = <2171000000>; capacity-dmips-mhz = <1024>; cpu-idle-states = <&cpu_off_b &cluster_off_b>; + i-cache-size = <65536>; + i-cache-line-size = <64>; + i-cache-sets = <256>; + d-cache-size = <65536>; + d-cache-line-size = <64>; + d-cache-sets = <256>; next-level-cache = <&l2_1>; #cooling-cells = <2>; }; @@ -130,6 +172,12 @@ cpu7: cpu@700 { clock-frequency = <2171000000>; capacity-dmips-mhz = <1024>; cpu-idle-states = <&cpu_off_b &cluster_off_b>; + i-cache-size = <65536>; + i-cache-line-size = <64>; + i-cache-sets = <256>; + d-cache-size = <65536>; + d-cache-line-size = <64>; + d-cache-sets = <256>; next-level-cache = <&l2_1>; #cooling-cells = <2>; }; @@ -215,18 +263,28 @@ cluster_off_b: cluster-off-b { l2_0: l2-cache0 { compatible = "cache"; cache-level = <2>; + cache-size = <131072>; + cache-line-size = <64>; + cache-sets = <512>; next-level-cache = <&l3_0>; }; l2_1: l2-cache1 { compatible = "cache"; cache-level = <2>; + cache-size = <262144>; + cache-line-size = <64>; + cache-sets = <512>; next-level-cache = <&l3_0>; }; l3_0: l3-cache { compatible = "cache"; cache-level = <3>; + cache-size = <2097152>; + cache-line-size = <64>; + cache-sets = <2048>; + cache-unified; }; }; -- 2.38.1