Received: by 10.223.164.202 with SMTP id h10csp317818wrb; Tue, 14 Nov 2017 16:07:57 -0800 (PST) X-Google-Smtp-Source: AGs4zMYQr0SmCdH+6LCJlelpETZFFyFQqmjYoLf2bLpKWDR2WM1q8f1EDgq4aaAS66CTUBfmtY1L X-Received: by 10.99.42.210 with SMTP id q201mr13419971pgq.7.1510704477107; Tue, 14 Nov 2017 16:07:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510704477; cv=none; d=google.com; s=arc-20160816; b=tt3M3EJG2PACQCSUmP+8Xw6hng8662Vcqfo73iZ++G8LdzX1gRctEMdw+eq7Actxm+ GaCBqG/P38R2jTpKnO7BiNqV6e/HLJ7IFw7vdkh6dGtfMgroZyA9ifCgajlcCndKQXTu Ss87L+QnBiwsXPINNlA8JTW/O8lmt3/43N9D/WUaFu5MvVduwV9tnWGNUvFfyQG6hbtK 3jd7LS0zvMya+2ko/QXiDG+5Y3Go6gNtb/nUj+5lpkZ/v5yrH4kNhwVDDWYtufGxqY5/ kCZcPcUE46xgenKmB+e3tVQnPzdUZM2N2aJctBwa/tvNmod27GJ0O72R6IKzSHSoQuJn eY0Q== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=3lox5dRREBwIFWRNF/sD0dyY9vaZjMrITiDUtMCOUP0=; b=Cmg9l7xtHWFJeWrTzQ61UQjM2c4hqOXlAMe732+0gfxKVRVniynlPBkveh0JROxc2h z+sc6GNdDY/yPYgHo6tvV5CvUVXtkFxKbzQxWBsAh4b2p+ptvUBj+LK2FHc+tZLiPnNj x0oy/PI9eVGDwuDVbA91Aqbi5hubPQShjnyEWo1bV5OwnUniGY5njN2Q9iuVi/vgpwKN txveyLpY2TL1vuUQhQRlGsqgLDVwq0LO0WiPfLtvNrqulOMxo2vnrO5nSLCnF0zGqsmy iNKi2OEl0x4am13rFK2FN1iq7qL5vmoN/Q+6j4Hhp/25O2NBfDBd/pmOO6vzsJJqb4f4 vCaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ad/0IHuT; dkim=pass header.i=@codeaurora.org header.s=default header.b=at2AAMUe; 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 k14si7764251pln.223.2017.11.14.16.07.44; Tue, 14 Nov 2017 16:07:57 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=ad/0IHuT; dkim=pass header.i=@codeaurora.org header.s=default header.b=at2AAMUe; 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 S1753270AbdKNXqx (ORCPT + 87 others); Tue, 14 Nov 2017 18:46:53 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:52058 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbdKNXqq (ORCPT ); Tue, 14 Nov 2017 18:46:46 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A4CAB60718; Tue, 14 Nov 2017 23:46:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510703205; bh=QAKPXFFhqTKrAF0FNfhhz66K//Dptqu8GX3gyIPaP4Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ad/0IHuTUf8E9B5BbccKbR8P+S+pF00QC/5iJ/vnlaqMXR7ECnpJ43K/t/7vjc12n z6ir2Cy/taZhTlb4FqyuZuY8p8L7819bbKe+BdIgwcX2490y/xp9xSj/Y53S3A9Jq3 3sGyYB/2CzvJxOMyM4BTBuNdUBuXMuvrtGH/nPys= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id B8B8360718; Tue, 14 Nov 2017 23:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510703203; bh=QAKPXFFhqTKrAF0FNfhhz66K//Dptqu8GX3gyIPaP4Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=at2AAMUeWLFoS/La199gyUOdQcWbiIqcEKupUKG7AoOfBjo1w1tdZIYcznBZshOnU +hDr3cESB9L4rlj4/YFWJrpsIY52M3AnCBduSGdwZ0oedKXnOd/NNt3Q22KL2hfoaR MMgE2o2+K44Ul9f13lh8j8Qa3XU8AicepcPUAa2I= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B8B8360718 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Tue, 14 Nov 2017 15:46:43 -0800 From: "sboyd@codeaurora.org" To: Alexey Brodkin Cc: "vladimir_zapolskiy@mentor.com" , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "mturquette@baylibre.com" , "Eugeniy.Paltsev@synopsys.com" , "linux-snps-arc@lists.infradead.org" , "mark.rutland@arm.com" , "linux-clk@vger.kernel.org" Subject: Re: [PATCH RESEND] CLK: ARC: Set initial pll output frequency specified in device tree Message-ID: <20171114234643.GD11955@codeaurora.org> References: <20171114122020.9800-1-Eugeniy.Paltsev@synopsys.com> <1b07abf9-c94d-1759-4182-519b77c8bb37@mentor.com> <1510694373.15407.1.camel@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1510694373.15407.1.camel@synopsys.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/14, Alexey Brodkin wrote: > Hi Vladimir, > > On Tue, 2017-11-14 at 19:01 +0200, Vladimir Zapolskiy wrote: > > On 11/14/2017 02:20 PM, Eugeniy Paltsev wrote: > > > > > > Add option to set initial output frequency of plls via > > > "clock-frequency" property in pll's device tree node. > > > This frequency will be set while pll driver probed. > > > > > > The usage example is setting CPU clock frequency on boot > > > See discussion: > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchive.com_linux-2Dsnps-2Darc-40lists.infradead.org_msg02689.html&d=DwICAg&c=DPL6 > > > _X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=vTFoSv1E8NyQC8nqe6pwvuTDxGvEefhAdGwAoABOrY4&s=sbmMnczdKP317bN973cZn2WcYF29kVMLW > > > chYfhSGT2M&e= > > > > > > Signed-off-by: Eugeniy Paltsev > > > --- > > > �.../bindings/clock/snps,hsdk-pll-clock.txt���������|��5 ++++ > > > �.../devicetree/bindings/clock/snps,pll-clock.txt���|��5 ++++ > > > �drivers/clk/axs10x/pll_clock.c���������������������| 34 ++++++++++++++++++++-- > > > �drivers/clk/clk-hsdk-pll.c�������������������������| 34 ++++++++++++++++++++-- > > > �4 files changed, 74 insertions(+), 4 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/clock/snps,hsdk-pll-clock.txt b/Documentation/devicetree/bindings/clock/snps,hsdk-pll-clock.txt > > > index c56c755..5703059 100644 > > > --- a/Documentation/devicetree/bindings/clock/snps,hsdk-pll-clock.txt > > > +++ b/Documentation/devicetree/bindings/clock/snps,hsdk-pll-clock.txt > > > @@ -13,6 +13,10 @@ Required properties: > > > �- clocks: shall be the input parent clock phandle for the PLL. > > > �- #clock-cells: from common clock binding; Should always be set to 0. > > > � > > > +Optional properties: > > > +- clock-frequency: output frequency generated by pll in Hz which will be set > > > +while probing. Should be a single cell. > > > + > > > �Example: > > > � input_clk: input-clk { > > > � clock-frequency = <33333333>; > > > @@ -25,4 +29,5 @@ Example: > > > � reg = <0x00 0x10>; > > > � #clock-cells = <0>; > > > � clocks = <&input_clk>; > > > + clock-frequency = <1000000000>; > > > � }; > > > diff --git a/Documentation/devicetree/bindings/clock/snps,pll-clock.txt b/Documentation/devicetree/bindings/clock/snps,pll-clock.txt > > > index 11fe487..5908f99 100644 > > > --- a/Documentation/devicetree/bindings/clock/snps,pll-clock.txt > > > +++ b/Documentation/devicetree/bindings/clock/snps,pll-clock.txt > > > @@ -13,6 +13,10 @@ registers and second for corresponding LOCK CGU register. > > > �- clocks: shall be the input parent clock phandle for the PLL. > > > �- #clock-cells: from common clock binding; Should always be set to 0. > > > � > > > +Optional properties: > > > +- clock-frequency: output frequency generated by pll in Hz which will be set > > > +while probing. Should be a single cell. > > > + > > > �Example: > > > � input-clk: input-clk { > > > � clock-frequency = <33333333>; > > > @@ -25,4 +29,5 @@ Example: > > > � reg = <0x80 0x10>, <0x100 0x10>; > > > � #clock-cells = <0>; > > > � clocks = <&input-clk>; > > > + clock-frequency = <100000000>; > > > � }; > > > > You may check Documentation/devicetree/bindings/clock/clock-bindings.txt > > about how to assign initial clock rates, in general 'clock-frequency' > > property is a property of clock consumers with two exceptions of simple > > clock sources, namely it is used in fixed clock and PWM clock bindings. > > I think that's what we agreed on with Rob Herring back in the day. > Have you checked this post of him on the topic? > http://lists.infradead.org/pipermail/linux-snps-arc/2017-September/002909.html > > Just FYI it all started from my question here: > http://lists.infradead.org/pipermail/linux-snps-arc/2017-September/002900.html Why can't we use assigned-clock-rates? That would basically call clk_set_rate() on the clk once it's added. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project From 1584080126043115032@xxx Tue Nov 14 21:55:31 +0000 2017 X-GM-THRID: 1584045110238206904 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread