linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Caesar Wang <wxt@rock-chips.com>,
	Doug Anderson <dianders@chromium.org>,
	linux-arm-kernel@lists.infradead.org,
	Matthias Kaehlcke <mka@chromium.org>
Subject: Re: [PATCH 2/3] arm64: dts: rockchip: Use vctrl regulators for dynamic CPU voltages on Gru/Kevin
Date: Thu, 29 Jun 2017 13:53:49 -0700	[thread overview]
Message-ID: <20170629205348.GB127431@google.com> (raw)
In-Reply-To: <5828446.D2497T5ZTs@phil>

Hi Heiko,

On Wed, Jun 28, 2017 at 05:44:27PM +0200, Heiko Stuebner wrote:
> Am Freitag, 23. Juni 2017, 10:07:36 CEST schrieb Brian Norris:
> > From: Matthias Kaehlcke <mka@chromium.org>
> > 
> > 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
> > <orig_name>_pwm and adds a new vctrl regulator named <orig_name>.
> > 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 <mka@chromium.org>
> > Signed-off-by: Brian Norris <briannorris@chromium.org>
> 
> Running this on Kevin resulted in gpu+centerlogic being
> children of litcpu, so applied for 4.14 with the diff below.

Oops, don't know where that cropped up. Between the two of us (Matthias
and me) this got rebased and reworked a few times.

Wouldn't have much effect, since the DMC and GPU aren't hooked up yet
upstream yet.

> 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>;
> 

Acked, LGTM, and tests fine. Thanks for fixing up all of this.

  reply	other threads:[~2017-06-29 20:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 17:07 [PATCH 1/3] arm64: dts: rockchip: Update CPU regulator voltage ranges for Gru Brian Norris
2017-06-23 17:07 ` [PATCH 2/3] arm64: dts: rockchip: Use vctrl regulators for dynamic CPU voltages on Gru/Kevin Brian Norris
2017-06-28 15:44   ` Heiko Stuebner
2017-06-29 20:53     ` Brian Norris [this message]
2017-06-23 17:07 ` [PATCH 3/3] arm64: dts: rockchip: set rk3399 dynamic CPU power coefficients Brian Norris
2017-06-23 18:39   ` Heiko Stuebner
2017-06-23 18:49     ` Brian Norris
2017-06-23 18:59       ` Heiko Stuebner
2017-06-28 15:45   ` Heiko Stuebner
2017-06-28 15:41 ` [PATCH 1/3] arm64: dts: rockchip: Update CPU regulator voltage ranges for Gru Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170629205348.GB127431@google.com \
    --to=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mka@chromium.org \
    --cc=wxt@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).