Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2860149pxu; Mon, 7 Dec 2020 18:44:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhK1sEY4plXwOjZW8YDdDMG1R6UjNtPIyLMR2UtJ+jjdwdp0aAyCVH0NQ4PFJIB+yIHAGI X-Received: by 2002:a50:c40d:: with SMTP id v13mr22725679edf.1.1607395475061; Mon, 07 Dec 2020 18:44:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607395475; cv=none; d=google.com; s=arc-20160816; b=IOOyJrMXMxRVovwhDtJkh3zZk8Gx9a/ctXfzy1jPMEerIb/twndAvaBeOKoESa+dVR u8dbLWkK/vWANos9d1vBAXcgS4Y+n+8aJpBUjeITXr6aSKWxJSkorboVTv8YuIVBzeSc PgFAPR+zB96SP5d20Zo/afGLZV7L5LEF2NJ+JJSJA6RlrIvkEwqGfyAdBDV3P9TL4wor 8Nv+W1/MmbQ8kuspUJjrBN5Yw/NcF5FAwE808KH/rz/q3bvYdg764yn99pBBTnTSvCv6 iHBk23RyiGEc5FX60la0q6uWRFHuqmS1pa9PzcharnBaXEeGqOc59/Z4NUU3Nov9Bvzb ci2Q== 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; bh=C+A0A3flimLtjZwu6i2OBp8kXg8NOVk8Lws9D8/0rYY=; b=n2DcF60gtio2wybXLwS/cLXSuLMA61N9byNbt+vpBTUfNBL11hj9DCXCnXsABVL1Dq j/C9dbCK9w8B9hFcUoIPTw76bt4vxT0QgrElSiOEgVO3pdEuIu+ctLLP4+Cw0gcSTB26 mdC+Ise0LSfrYnLnRxPJb/T//H2175bGDqkN+lJStU1yoi3UM/FS4D+/sDNurRQ/pEBC hBgRyOr/O5bzY30Oxqc3mfUXM1svZajZY6AccXOmu8VjQMd5g1vU9J3eNA36ZpyGPZR7 3HjGsghMi7Gm8uFt6jFudKes5CECq/MCbI0SKrN5125WwVuaW+ud+2vXd6w83gwoZ7lg aApA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n25si9186614edy.231.2020.12.07.18.44.12; Mon, 07 Dec 2020 18:44:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728135AbgLHCjo (ORCPT + 99 others); Mon, 7 Dec 2020 21:39:44 -0500 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:51403 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727554AbgLHCjo (ORCPT ); Mon, 7 Dec 2020 21:39:44 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07813346|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_alarm|0.527866-0.00690117-0.465233;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047201;MF=huangshuosheng@allwinnertech.com;NM=1;PH=DS;RN=9;RT=9;SR=0;TI=SMTPD_---.J4N629W_1607395136; Received: from allwinnertech.com(mailfrom:huangshuosheng@allwinnertech.com fp:SMTPD_---.J4N629W_1607395136) by smtp.aliyun-inc.com(10.147.41.158); Tue, 08 Dec 2020 10:38:59 +0800 From: Shuosheng Huang To: robh+dt@kernel.org, mripard@kernel.org, wens@csie.org, jernej.skrabec@siol.net, tiny.windzz@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Shuosheng Huang Subject: [RESEND v3 5/6] arm64: dts: allwinner: a100: Add Add CPU Operating Performance Points table Date: Tue, 8 Dec 2020 10:38:54 +0800 Message-Id: <20201208023854.23270-1-huangshuosheng@allwinnertech.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add an Operating Performance Points table for the CPU cores to enable Dynamic Voltage & Frequency Scaling on the A100. Signed-off-by: Shuosheng Huang --- .../allwinner/sun50i-a100-allwinner-perf1.dts | 1 + .../dts/allwinner/sun50i-a100-cpu-opp.dtsi | 90 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a100-cpu-opp.dtsi diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts index d34c2bb1079f..301793c72cb7 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts @@ -6,6 +6,7 @@ /dts-v1/; #include "sun50i-a100.dtsi" +#include "sun50i-a100-cpu-opp.dtsi" /{ model = "Allwinner A100 Perf1"; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100-cpu-opp.dtsi new file mode 100644 index 000000000000..e245823d70e8 --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-cpu-opp.dtsi @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// Copyright (c) 2020 Yangtao Li +// Copyright (c) 2020 ShuoSheng Huang + +/ { + cpu_opp_table: cpu-opp-table { + compatible = "allwinner,sun50i-h6-operating-points"; + nvmem-cells = <&cpu_speed_grade>; + opp-shared; + + opp@408000000 { + clock-latency-ns = <244144>; /* 8 32k periods */ + opp-hz = /bits/ 64 <408000000>; + + opp-microvolt-speed0 = <900000 900000 1200000>; + opp-microvolt-speed1 = <900000 900000 1200000>; + opp-microvolt-speed2 = <900000 900000 1200000>; + }; + + opp@600000000 { + clock-latency-ns = <244144>; /* 8 32k periods */ + opp-hz = /bits/ 64 <600000000>; + + opp-microvolt-speed0 = <900000 900000 1200000>; + opp-microvolt-speed1 = <900000 900000 1200000>; + opp-microvolt-speed2 = <900000 900000 1200000>; + }; + + opp@816000000 { + clock-latency-ns = <244144>; /* 8 32k periods */ + opp-hz = /bits/ 64 <816000000>; + + opp-microvolt-speed0 = <940000 940000 1200000>; + opp-microvolt-speed1 = <900000 900000 1200000>; + opp-microvolt-speed2 = <900000 900000 1200000>; + }; + + opp@1080000000 { + clock-latency-ns = <244144>; /* 8 32k periods */ + opp-hz = /bits/ 64 <1080000000>; + + opp-microvolt-speed0 = <1020000 1020000 1200000>; + opp-microvolt-speed1 = <980000 980000 1200000>; + opp-microvolt-speed2 = <950000 950000 1200000>; + }; + + opp@1200000000 { + clock-latency-ns = <244144>; /* 8 32k periods */ + opp-hz = /bits/ 64 <1200000000>; + + opp-microvolt-speed0 = <1100000 1100000 1200000>; + opp-microvolt-speed1 = <1020000 1020000 1200000>; + opp-microvolt-speed2 = <1000000 1000000 1200000>; + }; + + opp@1320000000 { + clock-latency-ns = <244144>; /* 8 32k periods */ + opp-hz = /bits/ 64 <1320000000>; + + opp-microvolt-speed0 = <1160000 1160000 1200000>; + opp-microvolt-speed1 = <1060000 1060000 1200000>; + opp-microvolt-speed2 = <1030000 1030000 1200000>; + }; + + opp@1464000000 { + clock-latency-ns = <244144>; /* 8 32k periods */ + opp-hz = /bits/ 64 <1464000000>; + + opp-microvolt-speed0 = <1180000 1180000 1200000>; + opp-microvolt-speed1 = <1180000 1180000 1200000>; + opp-microvolt-speed2 = <1130000 1130000 1200000>; + }; + }; +}; + +&cpu0 { + operating-points-v2 = <&cpu_opp_table>; +}; + +&cpu1 { + operating-points-v2 = <&cpu_opp_table>; +}; + +&cpu2 { + operating-points-v2 = <&cpu_opp_table>; +}; + +&cpu3 { + operating-points-v2 = <&cpu_opp_table>; +}; -- 2.28.0