Received: by 10.223.176.5 with SMTP id f5csp1235682wra; Fri, 9 Feb 2018 15:20:59 -0800 (PST) X-Google-Smtp-Source: AH8x226vZgjstpMuCOujjuLvRH1D+kYS/bD4N0FEtNX8D8xFyTdZaGy++o5Cp0Mj+wkm2RlCeT7x X-Received: by 2002:a17:902:2cc3:: with SMTP id n61-v6mr3954006plb.440.1518218459327; Fri, 09 Feb 2018 15:20:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518218459; cv=none; d=google.com; s=arc-20160816; b=fjOZ9o80E59xRWXYjEq4vVxDVpaxpJ2jOWOYd5fKs5HOO4ridgRM38fJXUarTC9dov kz0L8E4jFP5gJr7ALnchnpkMwOJILG0ELBOZzgGAYFWP8UOOrZ07WEC9qn8jpnF+d5NM ksO/8BdXRPZB1Y4PIOVtb3ZyHt7393LUay0zWX5Y9a+oAB/Gsxr5d8wmVVRnhoOfQaZe 53xWURmD6mGB1fezGPT66NgQUXzWFlJHuCgzuntjJ0AOe6ewfs6t2YOmBwmlmWKD1DY2 jnkWRhr1eXvIvzJx6Hw0FfDow0wRikAQ7ydm2CeLDG8dDya96MKYMSYQnI32MsQ7d7Xd atDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=luJtqem50zVGMh2MbM7h7PIYej9e7fQyWbt3Mvhh6EY=; b=BdQ2F3+ENBEiBo1s6l9b3pFvyI+djmc4nZJPcuW4W1i48hrtQ86HQScdgseS1Smi8I yzwliQzPwUZ7OBag7+7nUSc9UNuDsG1EeU5Qia2JHOSiKwk0d9W3SwBbO336S5sfpC6O /odhtHQuN9yaaPCt0jc7XrM5Fe5CpB1ehYbz9QCixUoVb/J1ZKo3HmslcWPIYBH/PRut 7T4gJOOZ0bnOYRqNFIfimrhkcnd/U+LSLVWj9g5REi1BTvpkJz9M0I3bkrpiNm25u2T1 /ROjUWqE69Rq+YVR9JOc6lpyUGOpmBe1v5hKODtQe9jwd1MQjFkRpbCUjdG29f6ejGA8 TO0w== 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 f5si1944964pgv.163.2018.02.09.15.20.45; Fri, 09 Feb 2018 15:20:59 -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 S1753286AbeBIXT6 (ORCPT + 99 others); Fri, 9 Feb 2018 18:19:58 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:40354 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753085AbeBIXT4 (ORCPT ); Fri, 9 Feb 2018 18:19:56 -0500 Received: by mail-ot0-f195.google.com with SMTP id s4so9226599oth.7; Fri, 09 Feb 2018 15:19:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=luJtqem50zVGMh2MbM7h7PIYej9e7fQyWbt3Mvhh6EY=; b=gbJ+OMP5vAHUMi06I5K1gsuI01fSVs29xKGLe6wylgJcquyvdp5R+9E7p9tGHZgvcD UyI/zfDYWN1yXuTulfnP9MJse6E5Zo4Abn6dJTj+QCeHDvdukJ0vcNiyOHJ5PjUz6sVa URLxYB+UMw1CrjunvjvZxMiz9IKnB7WaQV6omRtZurKrTW0Cu2MhVtizecpipnewzXKS sA6ekU1bgVotj0m3n8M5VRVmFDXDm441TTVjld32elWENcClaL9uNV5LzCpq+vP+NI9L 2xGZscNdiDxJMpGyxwt2j7nlCyBhrXse6cqgizP6PLYpV4W/dZ/JCDiwbRNV3nIol/dT Uwbg== X-Gm-Message-State: APf1xPBWj9mhOHpoCD85w/OM+O2JZbmjd90DxUVp4zgc34ozEND3q+ww vt6kjyGihP9epXMw4khkwRU56ZI= X-Received: by 10.157.2.8 with SMTP id 8mr3849192otb.106.1518218395397; Fri, 09 Feb 2018 15:19:55 -0800 (PST) Received: from localhost (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.gmail.com with ESMTPSA id v38sm2003694oti.53.2018.02.09.15.19.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Feb 2018 15:19:54 -0800 (PST) Date: Fri, 9 Feb 2018 17:19:54 -0600 From: Rob Herring To: Peter De Schrijver Cc: linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org, mturquette@baylibre.com, sboyd@codeaurora.org, mark.rutland@arm.com, devicetree@vger.kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 07/11] dt-bindings: tegra: Update DFLL binding for PWM regulator Message-ID: <20180209231954.hx3qhn5kc7xcqzc6@rob-hp-laptop> References: <1517934852-23255-1-git-send-email-pdeschrijver@nvidia.com> <1517934852-23255-8-git-send-email-pdeschrijver@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1517934852-23255-8-git-send-email-pdeschrijver@nvidia.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 06, 2018 at 06:34:08PM +0200, Peter De Schrijver wrote: > Add new properties to configure the DFLL PWM regulator support. Also > add an example and make the I2C clock only required when I2C support is > used. > > Signed-off-by: Peter De Schrijver > --- > .../bindings/clock/nvidia,tegra124-dfll.txt | 76 +++++++++++++++++++++- > 1 file changed, 74 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra124-dfll.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra124-dfll.txt > index dff236f..a4903f7 100644 > --- a/Documentation/devicetree/bindings/clock/nvidia,tegra124-dfll.txt > +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra124-dfll.txt > @@ -23,7 +23,8 @@ Required properties: > - clock-names: Must include the following entries: > - soc: Clock source for the DFLL control logic. > - ref: The closed loop reference clock > - - i2c: Clock source for the integrated I2C master. > + - i2c: Clock source for the integrated I2C master (only required when > + using I2C mode). > - resets: Must contain an entry for each entry in reset-names. > See ../reset/reset.txt for details. > - reset-names: Must include the following entries: > @@ -45,10 +46,28 @@ Required properties for the control loop parameters: > Optional properties for the control loop parameters: > - nvidia,cg-scale: Boolean value, see the field DFLL_PARAMS_CG_SCALE in the TRM. > > +Optional properties for mode selection: > +- nvidia,pwm-to-pmic: Use PWM to control regulator rather then I2C. > + > Required properties for I2C mode: > - nvidia,i2c-fs-rate: I2C transfer rate, if using full speed mode. > > -Example: > +Required properties for PWM mode: > +- nvidia,pwm-period: period of PWM square wave in us. Add standard unit suffix. > +- nvidia,init-uv: Regulator voltage in uV when PWM control is disabled. > +- nvidia,align-offset-uv: Regulator voltage in uV when PWM control is enabled > + and PWM output is low. > +- nvidia,align-step-uv: Voltage increase in uV corresponding to a 1/33th Use the standard unit suffix, not a custom one. See property-units.txt. > + increase in duty cycle. Eg the voltage for 2/33th duty > + cycle would be: > + nvidia,align-offset-uv + nvidia,align-step-uv * 2. > +- pinctrl-0: I/O pad configuration when PWM control is enabled. > +- pinctrl-1: I/O pad configuration when PWM control is disabled. > +- pinctrl-names: must include the following entries: > + - dvfs_pwm_enable: I/O pad configuration when PWM control is enabled. > + - dvfs_pwm_disable: I/O pad configuration when PWM control is disabled. > + > +Example for I2C: > > clock@70110000 { > compatible = "nvidia,tegra124-dfll"; > @@ -76,3 +95,56 @@ clock@70110000 { > > nvidia,i2c-fs-rate = <400000>; > }; > + > +Example for PWM: > + > +clock@70110000 { > + compatible = "nvidia,tegra124-dfll"; > + reg = <0 0x70110000 0 0x100>, /* DFLL control */ > + <0 0x70110000 0 0x100>, /* I2C output control */ > + <0 0x70110100 0 0x100>, /* Integrated I2C controller */ > + <0 0x70110200 0 0x100>; /* Look-up table RAM */ > + interrupts = ; > + clocks = <&tegra_car TEGRA210_CLK_DFLL_SOC>, > + <&tegra_car TEGRA210_CLK_DFLL_REF>; > + clock-names = "soc", "ref"; > + resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>; > + reset-names = "dvco"; > + #clock-cells = <0>; > + clock-output-names = "dfllCPU_out"; > + nvidia,pwm-to-pmic; > + nvidia,init-uv = <1000000>; > + nvidia,align-step-uv = <19200>; /* 19.2mV */ > + nvidia,align-offset-uv = <708000>; /* 708mV */ > + nvidia,sample-rate = <25000>; > + nvidia,droop-ctrl = <0x00000f00>; > + nvidia,force-mode = <1>; > + nvidia,cf = <6>; > + nvidia,ci = <0>; > + nvidia,cg = <2>; > + nvidia,idle-override; > + nvidia,one-shot-calibrate; > + nvidia,pwm-period = <2500>; /* 2.5us */ > + pinctrl-names = "dvfs_pwm_enable", "dvfs_pwm_disable"; > + pinctrl-0 = <&dvfs_pwm_active_state>; > + pinctrl-1 = <&dvfs_pwm_inactive_state>; > +}; > + > +/* pinmux nodes added for completeness. Binding doc can be found in: > + * Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.txt > + */ > + > +pinmux: pinmux@700008d4 { > + dvfs_pwm_active_state: dvfs_pwm_active { > + dvfs_pwm_pbb1 { > + nvidia,pins = "dvfs_pwm_pbb1"; > + nvidia,tristate = ; > + }; > + }; > + dvfs_pwm_inactive_state: dvfs_pwm_inactive { > + dvfs_pwm_pbb1 { > + nvidia,pins = "dvfs_pwm_pbb1"; > + nvidia,tristate = ; > + }; > + }; > +}; > -- > 1.9.1 >