Received: by 10.223.164.202 with SMTP id h10csp752351wrb; Tue, 14 Nov 2017 09:04:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMZA0vWajRRW94vSdWuAE6bzIeEEEkd4izTblWeIO1d+0YVfzHGiD8llBQebqzXkV3IO6W15 X-Received: by 10.98.131.9 with SMTP id h9mr13464478pfe.30.1510679070750; Tue, 14 Nov 2017 09:04:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510679070; cv=none; d=google.com; s=arc-20160816; b=ZUnYaxHETm5qluet/TdFj22IY/iOEAfVgINGRMTJPW2ixOMOJ9405DiP+YgZiP1+K6 T888H6SOoVQsZraLYlMGR0eMLQeep+XK0A0QPQ7sk57ti8qYNhB+iBXV+TBO29KV3FFk giGSj3WuCvcsFgJT0CP6ro1Di4RKbcm0m613LmN59bPZNVc9cwcPeXYYmHYxWqanhU1V ZXwaXlAK4iYilIx6SzF7KJeVG46OGaepfO+mcHDH9inJLp91eWDREvAKXyFHMSQpQoMA vQ42+V2oBzdO/YgJhwSlS+vQm/kNqmIBXpxp47OTFPt2su0+fisNAc3A48rcbXkS2Nua fzHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=dHGao2vdoKDFcYRGGN5Wj7vdZz6E7d4lQ0zE2k5Mj9M=; b=byT0bQPhNaCYUOtsu0ezKNXD3wKfptKHeIB7ePivwIGmk1wYjMw6XhIevfl5boEBSI E8DmOPm79ZJsvR1trwjt1HRyRXzuBFPieumSCxqCeVLmnXt9ABv+HwKYmlaIKhE5+U4W wnw85e7M26F5KcueYywSy4Wm9+Ag45kYjP/0/ejJWRW70X/O2v1WyrD/bw0v8Trtoq8L RFmCjoJ3PQ9t812FfuH7hofbJdAo+2TJQiOLLcOaTwN3kSRPz186M1dmKNZWgmtmfYqi sSQ9OrO4kV4Fld0V8WoSSsznkNkTERtlEyA25vtBYTjHSYcQG0pmP3N91P9UnS+6P/o8 xL5g== 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 h9si16332230pgn.284.2017.11.14.09.04.17; Tue, 14 Nov 2017 09:04:30 -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 S1755987AbdKNRB7 (ORCPT + 88 others); Tue, 14 Nov 2017 12:01:59 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:40058 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755626AbdKNRBw (ORCPT ); Tue, 14 Nov 2017 12:01:52 -0500 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1eEear-0003QV-PK from Vladimir_Zapolskiy@mentor.com ; Tue, 14 Nov 2017 09:01:49 -0800 Received: from [137.202.108.198] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 14 Nov 2017 17:01:45 +0000 Subject: Re: [PATCH RESEND] CLK: ARC: Set initial pll output frequency specified in device tree To: Eugeniy Paltsev , References: <20171114122020.9800-1-Eugeniy.Paltsev@synopsys.com> CC: , , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland From: Vladimir Zapolskiy Message-ID: <1b07abf9-c94d-1759-4182-519b77c8bb37@mentor.com> Date: Tue, 14 Nov 2017 19:01:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: <20171114122020.9800-1-Eugeniy.Paltsev@synopsys.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [137.202.0.87] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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://www.mail-archive.com/linux-snps-arc@lists.infradead.org/msg02689.html > > 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. -- With best wishes, Vladimir From 1584045110238206904@xxx Tue Nov 14 12:38:57 +0000 2017 X-GM-THRID: 1584045110238206904 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread