From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751808AbdF1Pog (ORCPT ); Wed, 28 Jun 2017 11:44:36 -0400 Received: from gloria.sntech.de ([95.129.55.99]:34370 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbdF1Pob (ORCPT ); Wed, 28 Jun 2017 11:44:31 -0400 From: Heiko Stuebner To: Brian Norris Cc: linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Caesar Wang , Doug Anderson , linux-arm-kernel@lists.infradead.org, Matthias Kaehlcke Subject: Re: [PATCH 2/3] arm64: dts: rockchip: Use vctrl regulators for dynamic CPU voltages on Gru/Kevin Date: Wed, 28 Jun 2017 17:44:27 +0200 Message-ID: <5828446.D2497T5ZTs@phil> User-Agent: KMail/5.2.3 (Linux/4.9.0-2-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: <20170623170737.46265-2-briannorris@chromium.org> References: <20170623170737.46265-1-briannorris@chromium.org> <20170623170737.46265-2-briannorris@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Freitag, 23. Juni 2017, 10:07:36 CEST schrieb Brian Norris: > From: Matthias Kaehlcke > > The Gru device tree currently contains entries for the regulators > ppvar_bigcpu, ppvar_litcpu, ppvar_gpu and ppvar_centerlogic; however, > the regulators have not been made, due to the lack of binding and driver > support for keeping the over-voltage protection (OVP) at bay and > preventing unintended regulator shutdowns on voltage downshifts. > > Now, the vctrl regulator driver has been merged, along with new bindings > for asymmetric settling time. The driver is OVP aware, it splits larger > voltage decreases in multiple steps when necessary and adds required > delays. > > This change renames each of the aforementioned regulators to > _pwm and adds a new vctrl regulator named . > The vctrl regulators use the voltage of their corresponding PWM regulator > as control voltage. The OVP related values are empirical and stem from > the Chrome OS kernel tree. > > Signed-off-by: Matthias Kaehlcke > Signed-off-by: Brian Norris Running this on Kevin resulted in gpu+centerlogic being children of litcpu, so applied for 4.14 with the diff below. Please holler if something looks wrong Heiko diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi index 2f1ba5ba27c8..90259cf63bb6 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi @@ -164,7 +164,7 @@ vin-supply = <&ppvar_sys>; }; - ppvar_bigcpu_pwm: ppvar-bigcpu_pwm { + ppvar_bigcpu_pwm: ppvar-bigcpu-pwm { compatible = "pwm-regulator"; regulator-name = "ppvar_bigcpu_pwm"; @@ -195,7 +195,7 @@ ovp-threshold-percent = <16>; }; - ppvar_litcpu_pwm: ppvar-litcpu_pwm { + ppvar_litcpu_pwm: ppvar-litcpu-pwm { compatible = "pwm-regulator"; regulator-name = "ppvar_litcpu_pwm"; @@ -249,7 +249,7 @@ regulator-min-microvolt = <786384>; regulator-max-microvolt = <1217747>; - ctrl-supply = <&ppvar_litcpu_pwm>; + ctrl-supply = <&ppvar_gpu_pwm>; ctrl-voltage-range = <786384 1217747>; regulator-settling-time-up-us = <390>; @@ -280,7 +280,7 @@ regulator-min-microvolt = <799434>; regulator-max-microvolt = <1049925>; - ctrl-supply = <&ppvar_litcpu_pwm>; + ctrl-supply = <&ppvar_centerlogic_pwm>; ctrl-voltage-range = <799434 1049925>; regulator-settling-time-up-us = <378>;