From patchwork Tue Mar 7 13:17:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13163612 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88EE3C678D5 for ; Tue, 7 Mar 2023 14:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vP9IWxlj4Zawb4dA3+1CjrEMn9BDY/+7qrmtsB7KKJ8=; b=bpOyAwDRWCBPmU HMu3zYtt29lW64j+vR5T4Dg5OQKhSibQvaLsFQ6QeRUoW8rXF9gkJqXXMoeaqzXohKcql9Xvcyke2 hgVFSYHwSsp+CbFBPweRPZ4I6HnyYSJeqMp/RuV8Qb8YQpwtUdhJK9oVVBn19DQO5RoZbZHAP2+Pc 2lkXd1rlxlYbQbmdKrz50/WajSYGYStSAlzP0aXrYEU6+PYE3dkkHdzVaWgZA9q3sEa0WQ1dNDKTP Pe73yjHufOnDDu8x1GfS/GesHcQLMzkZ9r+51MgGSyc43LcXEMOMcGEO+5XVGe2qZjYag1mQnHXxy k/XMQxczwgHr83x0Hv/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZXqL-000a8l-E4; Tue, 07 Mar 2023 13:59:06 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZXeB-000V0L-9c for linux-arm-kernel@bombadil.infradead.org; Tue, 07 Mar 2023 13:46:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=Z/wPwAoTW2tJxjxrOBuLt4E1zX0C96+nBR9WhSVdzZQ=; b=LpVGRIuoBmcjfr76t246r79++y koWgg+QimFnHdeaRJwgk1f3zQ581LsKFnvn5J7LLa1BFSOvs734I83PVut/DoDdLqawNb5PWuMqPw OOv4p3g7zHhTbL9FmAbXJ7kvmPivQxTogEw4roPq0fZWTGH75FQ0OqJfDLqKosaYc8xoM0lu4ZaYp Byqed73fhGjM3sdhYtkpqLqycSRavHpLyqORLoE/fH+rjbN7tHcKt+V7VNXcnnTVsdl4wTbQNg8kF +JMKWuLZJSP9FXUptw3puYwVFt4JAZCf/+x2qTuQ459qWEuZBqFD5qb+CBOolAYfRFG/FCj1acjHc Gf3KMFQw==; Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pZXCr-00H3Cz-2y for linux-arm-kernel@lists.infradead.org; Tue, 07 Mar 2023 13:18:21 +0000 Received: by mail-wm1-x32a.google.com with SMTP id az36so7750708wmb.1 for ; Tue, 07 Mar 2023 05:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678195096; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Z/wPwAoTW2tJxjxrOBuLt4E1zX0C96+nBR9WhSVdzZQ=; b=RzoJWeWo6nK1W7vlqqw+ptOWc89TyWU0EZJTFsIzQuUUOvqfVTghQ38SMf4qd2DJAp xK7baD8hWLNxN8tV+8SmwC8o07QJM3aHSdvA5/od+l8R9TMEIndjjY0JBYP5HsIhIf0n AcWGlCtgNUTO78fCxk4emdKm0PY1O5jsY6dgWsJmvypalLp1KNJf4ks/pvlNUysuq1Tv i7Q3LmW9HfR/Y77FUZbaJIopjOpb/xnevhGmT6/dCIOYbyvYq19pqxZL+WTtVhuRd2ft isoO+MXawPDK7tV9sqbOQd1oD7rr8KCEw5MYV2IaXE3XcJ7KDOW+Qz/bRY91zxAkJMXG y8ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678195096; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z/wPwAoTW2tJxjxrOBuLt4E1zX0C96+nBR9WhSVdzZQ=; b=MaNyBMIKNqb947PGo/5zyC3cocQv42Xb+rIFSe6YnqDnEwoUstKpEZ8NSVb0KkyuEp 2VLYcsjXQ1geFJV/CojQL9/Z6uY6r7EkcIz7ExIkMQPzyBYkEc6hKzrYNvb5DlFrtEzv zFK8qePbitO0/JKTMOfcTCrI2L+289ahS/FjtWwjooy9ICmwFhCC9xeH+muqsCxU6b6+ 3vwK6j0RAgvxj3b7VhRD7cu+WPXCck+3mdDdCng0Pm38BfgSKbQgyCAeu73aXH4cKCAz kYmpvi8znrCXhF7IvE5k6OuZVENFm2o4473ccosxWPog580nyzxh0yxCqiGFGz2weM+m TZ9g== X-Gm-Message-State: AO0yUKWEnEACSsf+6HQdPGLDlSZGMWRL73B5Ut1Ynbnv5cBogU8u0cV2 cjzrdOpBMt5+plKbUJ6m0DUx+g== X-Google-Smtp-Source: AK7set9uR6+JH5jgbkcIyWePFQMVehEzpaQXaRWbN0EzEmEf4RzcWjBq9nfzisOtzrUY62Kc0CmxDQ== X-Received: by 2002:a05:600c:3111:b0:3eb:399d:ab24 with SMTP id g17-20020a05600c311100b003eb399dab24mr11536587wmo.28.1678195096755; Tue, 07 Mar 2023 05:18:16 -0800 (PST) Received: from [127.0.1.1] (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id hu21-20020a05600ca29500b003eaee9e0d22sm12986242wmb.33.2023.03.07.05.18.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:18:16 -0800 (PST) From: Alexandre Mergnat Date: Tue, 07 Mar 2023 14:17:44 +0100 Subject: [PATCH v2 15/18] arm64: dts: mediatek: add OPP support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v2-15-6ec7cdb10ccf@baylibre.com> References: <20230203-evk-board-support-v2-0-6ec7cdb10ccf@baylibre.com> In-Reply-To: <20230203-evk-board-support-v2-0-6ec7cdb10ccf@baylibre.com> To: =?unknown-8bit?q?Zhiyong_Tao_=3Czhiyong=2Etao=40mediatek=2Ecom=3E=2C_Gue?= =?unknown-8bit?q?nter_Roeck_=3Clinux=40roeck-us=2Enet=3E=2C_Linus_Walleij_?= =?unknown-8bit?q?=3Clinus=2Ewalleij=40linaro=2Eorg=3E=2C?= =?unknown-8bit?q?_Bernhard_Rosenkr=C3=A4nzer_=3Cbero=40baylibre=2Ecom=3E=2C_?= =?unknown-8bit?q?AngeloGioacchino_Del_Regno_=3Cangelogioacchino=2Edelregno?= =?unknown-8bit?q?=40collabora=2Ecom=3E=2C?= =?unknown-8bit?q?_Ulf_Hansson_=3Culf=2Ehansson=40linaro=2Eorg=3E=2C_Wim_Van_?= =?unknown-8bit?q?Sebroeck_=3Cwim=40linux-watchdog=2Eorg=3E=2C?= =?unknown-8bit?q?_Krzysztof_Kozlowski_=3Ckrzysztof=2Ekozlowski+dt=40linaro?= =?unknown-8bit?q?=2Eorg=3E=2C_Chaotian_Jing_=3Cchaotian=2Ejing=40mediatek?= =?unknown-8bit?q?=2Ecom=3E=2C?= =?unknown-8bit?q?_Rob_Herring_=3Crobh+dt=40kernel=2Eorg=3E=2C_Wenbin_Mei_=3C?= =?unknown-8bit?q?wenbin=2Emei=40mediatek=2Ecom=3E=2C_Matthias_Brugger_=3Cma?= =?unknown-8bit?q?tthias=2Ebgg=40gmail=2Ecom=3E?= Cc: linux-mmc@vger.kernel.org, Alexandre Bailon , devicetree@vger.kernel.org, Amjad Ouled-Ameur , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-watchdog@vger.kernel.org, Alexandre Mergnat , linux-mediatek@lists.infradead.org, Fabien Parent X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3615; i=amergnat@baylibre.com; h=from:subject:message-id; bh=BhQXiQ633r+6NqkoWGU/9bsfqhfFOwBpR91KfUVfpZo=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkBzmFmj2mkxx2UxTnp7+ve76NwYFekOygdsAZnDQk 4gYXd8eJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZAc5hQAKCRArRkmdfjHURaAVD/ 0XpiQLgcuatB5m1+jRCZVeCMnDtRhvILJdeTm5UxqDESFfEMJIqIprwCh8o26gQinxHWqRQMbYfqmX W2z/V8vVIaZhVbVB2obBYGRjMc00FxeOLcnAfhSmLFvfAnN0/KNW0iVSyVEgF3N1YhTaFvqMh0HbJf c4+zgCMkSd2mcHwu+73nt1Igj3Ohy5c4PswcyvIUnxoLMyc8qjl6E87PGI7UU0xvz6f9AfwbohnarO PGAe+V5CABel7v71RnEeFYpkZXF98mY4juzh9LMKpVTkCtBn+OGb+myQYYJ9N1oiRk84t4rVVpEnSW JtUGm2EnnjRNsORHbbld728WwaK6ni9HgFwoMjI3VprN5UR7LCAMia+6XxIkSHzZb/8OW40/AF+0/n qfrMN9dLtykZh1YyPmKJlDvV4BQqyOi6PfVHhZj+uCPHLWdx8zF5qphLPzYZjDJ3fOl54TcZXqqfZn 20pMTV3l8LgLsXIGIH45q4nqENbuUc4T5m+lo1qZVLyTvQDRIwG9APEwSVWGPrDqNy6J+oWAUtD/SY oz/GRQaAnQlsSxl5Fw91thbqkn19ofXRHmxxyVE6XLtxhE7wTXdBTSQfBES1XxAZeHck5EipU+Hecw c9xflXX4rtz0pHW5vBrY3ovrwXel/cY6Bu0cgum6Z1OFBiOpJXFntbsInFXA== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_131818_391088_34B1CE19 X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In order to have cpufreq support, this patch adds generic Operating Performance Points support. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 85 ++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index 394a5a61be59..c3ea3cc97a47 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -20,6 +20,75 @@ cpus { #address-cells = <1>; #size-cells = <0>; + cluster0_opp: opp-table-0 { + compatible = "operating-points-v2"; + opp-shared; + opp-850000000 { + opp-hz = /bits/ 64 <850000000>; + opp-microvolt = <650000>; + }; + opp-918000000 { + opp-hz = /bits/ 64 <918000000>; + opp-microvolt = <668750>; + }; + opp-987000000 { + opp-hz = /bits/ 64 <987000000>; + opp-microvolt = <687500>; + }; + opp-1056000000 { + opp-hz = /bits/ 64 <1056000000>; + opp-microvolt = <706250>; + }; + opp-1125000000 { + opp-hz = /bits/ 64 <1125000000>; + opp-microvolt = <725000>; + }; + opp-1216000000 { + opp-hz = /bits/ 64 <1216000000>; + opp-microvolt = <750000>; + }; + opp-1308000000 { + opp-hz = /bits/ 64 <1308000000>; + opp-microvolt = <775000>; + }; + opp-1400000000 { + opp-hz = /bits/ 64 <1400000000>; + opp-microvolt = <800000>; + }; + opp-1466000000 { + opp-hz = /bits/ 64 <1466000000>; + opp-microvolt = <825000>; + }; + opp-1533000000 { + opp-hz = /bits/ 64 <1533000000>; + opp-microvolt = <850000>; + }; + opp-1633000000 { + opp-hz = /bits/ 64 <1633000000>; + opp-microvolt = <887500>; + }; + opp-1700000000 { + opp-hz = /bits/ 64 <1700000000>; + opp-microvolt = <912500>; + }; + opp-1767000000 { + opp-hz = /bits/ 64 <1767000000>; + opp-microvolt = <937500>; + }; + opp-1834000000 { + opp-hz = /bits/ 64 <1834000000>; + opp-microvolt = <962500>; + }; + opp-1917000000 { + opp-hz = /bits/ 64 <1917000000>; + opp-microvolt = <993750>; + }; + opp-2001000000 { + opp-hz = /bits/ 64 <2001000000>; + opp-microvolt = <1025000>; + }; + }; + cpu-map { cluster0 { core0 { @@ -50,6 +119,10 @@ cpu0: cpu@0 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&l2>; + clocks = <&mcucfg CLK_MCU_BUS_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; }; cpu1: cpu@1 { @@ -65,6 +138,10 @@ cpu1: cpu@1 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&l2>; + clocks = <&mcucfg CLK_MCU_BUS_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate", "armpll"; + operating-points-v2 = <&cluster0_opp>; }; cpu2: cpu@2 { @@ -80,6 +157,10 @@ cpu2: cpu@2 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&l2>; + clocks = <&mcucfg CLK_MCU_BUS_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate", "armpll"; + operating-points-v2 = <&cluster0_opp>; }; cpu3: cpu@3 { @@ -95,6 +176,10 @@ cpu3: cpu@3 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&l2>; + clocks = <&mcucfg CLK_MCU_BUS_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate", "armpll"; + operating-points-v2 = <&cluster0_opp>; }; l2: l2-cache {