Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp370848lqo; Fri, 10 May 2024 02:25:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMKRDF3eKLM+HWeHoWSAJxRTrqM7jjVMVMKnKjk6UZA4bxzBAYycXetqHaYPO2yx429lf2zLhrk7QNnvGHYQrBqX9UL9r0M95XhBZ3tg== X-Google-Smtp-Source: AGHT+IHrDARaGMTVUdsM9XWeoC4z6KbBTXySoXYTjAIZOvjxEuVd2oQtL8KRvXk+Dbw89Sy+3Gcc X-Received: by 2002:a05:6e02:1fe8:b0:368:884a:18da with SMTP id e9e14a558f8ab-36cc148003cmr25128585ab.19.1715333108584; Fri, 10 May 2024 02:25:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715333108; cv=pass; d=google.com; s=arc-20160816; b=a1uIzWpXtVhrZm2dkA+1o2oZO/BB815MTWBWTPJmtKpl/2YbOXUaHnbk/ZPYbb+4Vy CbyKi9We/oAyrM8RNIfzcIN8cS5H5My6/WtoXz/EdzjmIsjLI/fjy3nt0LGpNlIPoZwH QB7+Vv54tkgOdgM/ohNPBK/Yz5tPzhnEvPrJ1+m8V/+HFlwdyhT7xyVKTpMzN79ZtVtw +aiWuJAps4TQt5wYDRgbeV+fBF886X462WdN8rMsBMPZyDvLgQ1zkk78I22lS0opdVny 41FyYIy+Rp89rSv89AbsFX+iKxD+EZyKr3I0oZXXLQnN6+WdMFtokXTCGRS8g/5PVihc wZ/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=Fgx6gQIor5JitCoDjzvWGDmT9ExA7zZtNp1uC41L0go=; fh=KSEGIJxg/6OVy8p2IIO3wekU0WS6gL+n5pcGYZtS44U=; b=PPJxUiBcmSFBu0Ed79LSyiMRVtX84wzO5wpX914gxm3OanlnDhDCn8JxtuUoPQJF+y 5hGoBLd6oP+VlrFKgEZ+/rpuR4SK3shEkePxf6kNaZuWpcZp0zgkkDj26at9eCn0hKyR ign7mYhaultWgsHmjmfpD9j5qoBKjg8kKwpYuuFDn7RdLlGONO0HEi91nHEC+BM7LC6u 7jDwnt/x6e5KXXFE36zsOIR3mdO1jDz9lgiB6dpCbPY1llqeQdV9Oy151lmgUJTQiwHd v/pWrZkVcYjzjMr80waaybYwsezAevkjT2bbWMXZLdacRdmAlKUm/RaU7XnuIZZGPmYR xQAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=c2Nd7E7u; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-175514-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6341020c753si3143318a12.277.2024.05.10.02.25.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 02:25:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175514-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=c2Nd7E7u; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-175514-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5756F283CA9 for ; Fri, 10 May 2024 09:16:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E6FE172BB5; Fri, 10 May 2024 09:13:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="c2Nd7E7u" Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A857B171E4C; Fri, 10 May 2024 09:13:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=37.18.73.165 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715332387; cv=none; b=k+XsD8vEUv33FEPUfIajKBIfCFarXAfeQlvUxRZ2hynrvvYd/1yfxjsY2dDizobvAZYc+Y0Oo6fuZUyhWQo7ixlgwosKoKlr31J+iBELSPWKxPufhyiMgwwRFy+lb50Wr/qh6oLHsVd1HXTn05FvYlKwgyZL1yD/uQ7DLbeX9uA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715332387; c=relaxed/simple; bh=DqgdDwQx+sQAdIg4ZpduqD7G6PmhfwcD69dKKDM0ns8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WB3DxDAmaosZZW6w2iwIS7lvNy5HlcbGO8WzYm7HJLW1eHuedkRDNLCx48AQ/hfpj7EAo6xxXwdokdqXifjDElAPiFBlaqhIgYkzO703VdzqbjHVQkCaekZo5blChHl29n+a67cVtb+9cfMc8VuEw9RCwtvu1Bs/M+9mKBrbfYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=salutedevices.com; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=c2Nd7E7u; arc=none smtp.client-ip=37.18.73.165 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=salutedevices.com Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id E482F100008; Fri, 10 May 2024 12:13:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru E482F100008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1715332382; bh=Fgx6gQIor5JitCoDjzvWGDmT9ExA7zZtNp1uC41L0go=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=c2Nd7E7uGvrXOgdY9eSJUhXW4bdjT1KQool6/k4iHkFKTlN9K47zlQsgmignDLsv8 LvHpdLGop2FuWRoPziZQpIJ1UedD+ePJ3eDsdySB+YAnUxkUy7el75vZxovkCBjNwi I1fsAGT71YvmDZBL7ltJ0Nie7UvvTyuMykPZz0/6wjs8rdtjhazxfh3JAa4Qsy9JV4 KxQAxbVW2vYa4jUvYPTqHUt4nWcdisoxEdUwZ/OvRp9rl0XGZeg5MAAULDSRG5xBYA 2Ac/Q8656802wkS1JK+p59sds3QvC2YnyKuZutibXjr3jQcVbYXqj5SF4bYi7LpdqB hwy/ZFQP2kTPQ== Received: from smtp.sberdevices.ru (p-i-exch-sc-m02.sberdevices.ru [172.16.192.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Fri, 10 May 2024 12:13:02 +0300 (MSK) Received: from CAB-WSD-L081021.sberdevices.ru (100.64.160.123) by p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 10 May 2024 12:13:02 +0300 From: Dmitry Rokosov To: , , , , , , , CC: , , , , , , , Dmitry Rokosov Subject: [PATCH v2 4/4] arm64: dts: amlogic: a1: setup CPU power management Date: Fri, 10 May 2024 12:12:26 +0300 Message-ID: <20240510091251.20086-5-ddrokosov@salutedevices.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240510091251.20086-1-ddrokosov@salutedevices.com> References: <20240510091251.20086-1-ddrokosov@salutedevices.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 185158 [May 10 2024] X-KSMG-AntiSpam-Version: 6.1.0.4 X-KSMG-AntiSpam-Envelope-From: ddrokosov@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 19 0.3.19 07c7fa124d1a1dc9662cdc5aace418c06ae99d2b, {Tracking_from_domain_doesnt_match_to}, d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;smtp.sberdevices.ru:5.0.1,7.1.1;100.64.160.123:7.1.2;salutedevices.com:7.1.1, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/05/10 07:36:00 #25144647 X-KSMG-AntiVirus-Status: Clean, skipped The Amlogic A1 SoC family utilizes static operating points and a PWM-controlled core voltage regulator, which is specific to the board. As the main CPU clock input, the SoC uses CLKID_CPU_CLK from the CPU clock controller, which can be inherited from the system PLL (syspll) or a fixed CPU clock. Currently, the stable operating points at all frequencies are set to 800mV. This value is obtained from the vendor setup of several A1 boards. Signed-off-by: Dmitry Rokosov --- arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi index 785778f3a7da..fa13dd6ed03d 100644 --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi @@ -33,6 +33,13 @@ cpu0: cpu@0 { reg = <0x0 0x0>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&clkc_cpu CLKID_CPU_CLK>; + clock-names = "core_clk"; + operating-points-v2 = <&cpu_opp_table0>; + voltage-tolerance = <0>; + clock-latency = <50000>; + capacity-dmips-mhz = <400>; + dynamic-power-coefficient = <80>; #cooling-cells = <2>; }; @@ -42,6 +49,13 @@ cpu1: cpu@1 { reg = <0x0 0x1>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&clkc_cpu CLKID_CPU_CLK>; + clock-names = "core_clk"; + operating-points-v2 = <&cpu_opp_table0>; + voltage-tolerance = <0>; + clock-latency = <50000>; + capacity-dmips-mhz = <400>; + dynamic-power-coefficient = <80>; #cooling-cells = <2>; }; @@ -52,6 +66,36 @@ l2: l2-cache0 { }; }; + cpu_opp_table0: cpu_opp_table0 { + compatible = "operating-points-v2"; + opp-shared; + + opp00 { + opp-hz = /bits/ 64 <128000000>; + opp-microvolt = <800000>; + }; + opp01 { + opp-hz = /bits/ 64 <256000000>; + opp-microvolt = <800000>; + }; + opp02 { + opp-hz = /bits/ 64 <512000000>; + opp-microvolt = <800000>; + }; + opp03 { + opp-hz = /bits/ 64 <768000000>; + opp-microvolt = <800000>; + }; + opp04 { + opp-hz = /bits/ 64 <1008000000>; + opp-microvolt = <800000>; + }; + opp05 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <800000>; + }; + }; + efuse: efuse { compatible = "amlogic,meson-gxbb-efuse"; clocks = <&clkc_periphs CLKID_OTP>; -- 2.43.0