Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752250AbdGCGP7 (ORCPT ); Mon, 3 Jul 2017 02:15:59 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:33911 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750948AbdGCGP4 (ORCPT ); Mon, 3 Jul 2017 02:15:56 -0400 Date: Mon, 3 Jul 2017 11:45:52 +0530 From: Viresh Kumar To: Mark Brown Cc: Chen-Yu Tsai , "Enrico Weigelt, metux IT consult" , Rafael Wysocki , Vincent Guittot , Rob Herring , Greg Kroah-Hartman , Stephen Boyd , linux-kernel , rnayak@codeaurora.org, Shiraz Hashim , linux-arm-kernel Subject: Re: [RFC 0/5] drivers: Add boot constraints core Message-ID: <20170703061552.GB3532@vireshk-i7> References: <20170630031648.GR29665@vireshk-i7> <20170630035533.GV29665@vireshk-i7> <20170630041211.GX29665@vireshk-i7> <20170630051203.GY29665@vireshk-i7> <20170630084330.GB29665@vireshk-i7> <20170630121026.azppihjqls5i6bbr@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170630121026.azppihjqls5i6bbr@sirena.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1586 Lines: 38 On 30-06-17, 13:10, Mark Brown wrote: > On Fri, Jun 30, 2017 at 02:13:30PM +0530, Viresh Kumar wrote: > > On 30-06-17, 14:36, Chen-Yu Tsai wrote: > > > Operable ranges of the regulator: 1.8 - 3.0 V > > Range required by LCD: 2.0 - 3.0 V > > Range required by DMA: 1.8 - 2.5 V > > > Here DMA can't work with regulator voltages > 2.5 V, but regulator can > > go max to 3.0 V. Of course if the DMA driver has done > > regulator_set_voltage(), then we will be within 2.5 V range. But that > > doesn't force us to have regulator-max-microvolt set to 2.5 V. > > > And so the DT node shall have this: > > > regulator-min-microvolt = <1800000>; > > regulator-max-microvolt = <3000000>; > > > Isn't it ? > > If the DMA can't tolerate more than 2.5V then why would the constraints > allow the voltage to float that far? Similarly on the low end? The above regulator-min/max-microvolt values I mentioned were for the regulator device and not what the consumers would request. Yes, DMA will request something between 1.8 to 2.5 V, but in the above example LCD can request from 2.0 to 3.0 V and so I had those limits for the regulator device (in DT). > Please remember that devices shouldn't be managing their voltages unless > they are actively changing them at runtime, simply setting them at > startup is the job of the constraints. I would be very surprised to see > a DMA controller doing anything like DVFS. Sure, DMA would most likely set a constraint from probe. Maybe I could have used MMC in the above example, which may actually do DVFS at runtime. -- viresh