From patchwork Wed Jun 28 15:44:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 9814747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0356560365 for ; Wed, 28 Jun 2017 15:44:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7E3B1FF12 for ; Wed, 28 Jun 2017 15:44:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBFA2285C8; Wed, 28 Jun 2017 15:44:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 84FB41FF12 for ; Wed, 28 Jun 2017 15:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ablbJPBh5dthkjeaqP96eEZu+XKwJSpugYarYl8wOT4=; b=ZRzmb+tZJthR3N 4p2EDx6yMSqmtmI5mLzlOnRWPW/RVgKIwgUu6xq/3eOjh/VSiJg3TTv/ZlZPn9Eg91XKnUsHkRXmi tNdHL4rw/do3l1HJEGA7GIMNRKIxOaDtEQigfZx8iumPSSePNEyB/jfPaH8G1wZSKsZObcgQQiOQu OHkt2fNmv5TmPTZWe43qDL/Q5OtfUg1ax+vok77A8YGZx/iTfsc9dvL2GskmPATQGpDLOqmvNFHtt lYXrhaLTnutLxfTcLpXSNO8p18vnAHPtuQ2BCdendZFzzhnfKuIEDZdq6g9+DLIVCsNJzGnggQdPQ XrazLbrmBQKvkZXPEGcw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQF9D-0008Ev-Rl; Wed, 28 Jun 2017 15:44:55 +0000 Received: from gloria.sntech.de ([95.129.55.99]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQF9A-0008Do-Og; Wed, 28 Jun 2017 15:44:54 +0000 Received: from ip9234b3c2.dynamic.kabel-deutschland.de ([146.52.179.194] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1dQF8m-0004kZ-Pu; Wed, 28 Jun 2017 17:44:28 +0200 From: Heiko Stuebner To: Brian Norris 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170628_084452_957273_6CB1493D X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Doug Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Matthias Kaehlcke , linux-arm-kernel@lists.infradead.org, Caesar Wang Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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>;