Received: by 10.223.176.5 with SMTP id f5csp430656wra; Tue, 6 Feb 2018 01:11:51 -0800 (PST) X-Google-Smtp-Source: AH8x227OR8nOsp8W97+DPGr+f+IOWrD5Z0nUcLrSl877JCFrOPmVW0T4aemiRq8TX7lwBKO4jxin X-Received: by 2002:a17:902:20c8:: with SMTP id v8-v6mr1751498plg.226.1517908310990; Tue, 06 Feb 2018 01:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517908310; cv=none; d=google.com; s=arc-20160816; b=W/G8vB6Fk1MKzow5AsRwgucl2Ogt7fpN9RH1I3BIRFFZra5/TVatYiSKYb0ANuNjD2 jTJ/ViaD+HVV7b1cMmYqwSc63qWxLl6GVxvex2tiwZrAsDHj99dEfYU5eS4UPWgwBZA0 m/Y4A9vvTHnkN1dpsBaLTVlDXcNkiX6mx4bNMMbxFyVrVtcDrZJ4pokHBqBpLR4RM9v1 kDQGq7DlAKi2g7RuhKZpn9lT4D3sBDtPsnP1LBYhA6/em/O5pPJ34GAx+URsTZZtuftx gp2UnrT87egCXhpCvRSLnF9vPQoJ0d1NjT8c4uYlKnrM6ThyGfPbVVxTdX2vKUTJ9pQj 1DBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to:date :arc-authentication-results; bh=N73qwR9VDbZnPd62m9JWwZzyInKNpQ/PIiBiALwXcNk=; b=Dhu0hAcOc3GgAKY48sdOUqTAknjeFmXnhOSHcbhJgzy6q6OPSy3zAGUIkEcJpPwVnH eQintPE0SQtD7QEXFxcE8wlqFcM+k6blHqOBXLSIvMXGhid1CW9UgKEaYkjwqogxLM9l tahGocxVfGDDaPWtxD/19VcDB5q/ZZOkxIZQoEKBivFKOu4NiUfu94vo3YUAq0kjQrH+ L34fg66Tq0deyAtSEtVNR9/cohIXFt+dShMvW653/Lu1VS4ijFFLAJJxXgEqtdKeaKK4 VIfRA/Y7xhcxo2d4adyM484R7fJcOMPySi5M43eBISqwq6mynKb25cgpUMZl510/LYRt 4MpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g34-v6si6269182pld.280.2018.02.06.01.11.36; Tue, 06 Feb 2018 01:11:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752444AbeBFJKt convert rfc822-to-8bit (ORCPT + 99 others); Tue, 6 Feb 2018 04:10:49 -0500 Received: from hermes.aosc.io ([199.195.250.187]:56067 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924AbeBFJKm (ORCPT ); Tue, 6 Feb 2018 04:10:42 -0500 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id EBCA656E00; Tue, 6 Feb 2018 09:10:40 +0000 (UTC) Date: Tue, 06 Feb 2018 17:10:26 +0800 In-Reply-To: <20180206090656.r52hs7sk7w5iynrk@flea> References: <20180206044905.30508-1-icenowy@aosc.io> <20180206044905.30508-6-icenowy@aosc.io> <20180206090656.r52hs7sk7w5iynrk@flea> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v2 05/10] ARM: sun8i: h3: add operating-points-v2 table for CPU To: Maxime Ripard CC: Liam Girdwood , Rob Herring , Chen-Yu Tsai , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com From: Icenowy Zheng Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 于 2018年2月6日 GMT+08:00 下午5:06:56, Maxime Ripard 写到: >On Tue, Feb 06, 2018 at 12:49:00PM +0800, Icenowy Zheng wrote: >> The CPU on Allwinner H3 can do dynamic frequency scaling. >> >> Add a DVFS table based on the one shipped with Allwinner's H3 SDK. >The >> voltage-frequency relationship seems to be conservative, and Armbian >has >> another DVFS table which uses lower voltage at a certain frequency. >> However, the official one is chosen for safety. >> >> Frequencies higher than 1008MHz are temporarily dropped in the table, >as >> they may lead to over voltage on boards without proper regulator >> settings or over temperature on boards with proper regulator >settings. >> They will be added back once regulator settings are ready and thermal >> sensor driver is merged. >> >> In order to satisfy all different regulators (SY8106A which is 50mV >per >> level, SY8113B which have two states: 1.1V and 1.3V, and some board >with >> non-tweakable regulators), all the OPPs are defined with a range >which has >> the target value as the minimum allowed value, and 1.3V (the highest >> VDD-CPUX voltage suggested by the datasheet) as the maximum allowed >value. >> It's proven to work well with a board with SY8113B. >> >> Signed-off-by: Icenowy Zheng >> --- >> Changes in v2: >> - Switch to BSP OPP table, which is more conservative. >> >> arch/arm/boot/dts/sun8i-h3.dtsi | 32 >+++++++++++++++++++++++++++++++- >> 1 file changed, 31 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi >b/arch/arm/boot/dts/sun8i-h3.dtsi >> index 8495deecedad..36608c03f02b 100644 >> --- a/arch/arm/boot/dts/sun8i-h3.dtsi >> +++ b/arch/arm/boot/dts/sun8i-h3.dtsi >> @@ -43,32 +43,62 @@ >> #include "sunxi-h3-h5.dtsi" >> >> / { >> + cpu0_opp_table: opp_table0 { >> + compatible = "operating-points-v2"; >> + opp-shared; >> + >> + opp@648000000 { >> + opp-hz = /bits/ 64 <648000000>; >> + opp-microvolt = <1040000 1040000 1300000>; >> + clock-latency-ns = <244144>; /* 8 32k periods */ >> + }; >> + >> + opp@816000000 { >> + opp-hz = /bits/ 64 <816000000>; >> + opp-microvolt = <1100000 1100000 1300000>; >> + clock-latency-ns = <244144>; /* 8 32k periods */ >> + }; >> + >> + opp@1008000000 { >> + opp-hz = /bits/ 64 <1008000000>; >> + opp-microvolt = <1200000 1200000 1300000>; >> + clock-latency-ns = <244144>; /* 8 32k periods */ >> + }; >> + }; >> + >> cpus { >> #address-cells = <1>; >> #size-cells = <0>; >> >> - cpu@0 { >> + cpu0: cpu@0 { >> compatible = "arm,cortex-a7"; >> device_type = "cpu"; >> reg = <0>; >> + clocks = <&ccu CLK_CPUX>; >> + clock-names = "cpu"; >> + operating-points-v2 = <&cpu0_opp_table>; >> + #cooling-cells = <0x2>; > >So, that would be 2? Okay. > >There's this pattern on pretty much all the other patches following >this one as well, you should address them too. > >Maxime