Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1194536imm; Wed, 23 May 2018 11:50:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpRo6NUNtFm4xSCrbWZQuU8w3HY91y1MFViJZfMxT3UprfxUUo5cntHskanUsbc9q7t6oyw X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr4122719plb.198.1527101416681; Wed, 23 May 2018 11:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527101416; cv=none; d=google.com; s=arc-20160816; b=EJ3xMqFbatTdecLO7s+biS1ugU5k2sAQwz0yOWYUv+NXiSFwNND8TpjFxSFQILGI0m XpAnEKpGQwbXgEaLUHl0O/augqdct/JnjZamh45vjqf02BRaZ2gSpjT2Vz/50U1jl3HD 3ixdRnbWS9qjEoe9MA5WqKXYumW7IIH8cjWmHnIF78QWTbwIjeafXtqI5VRk82ZbaAQN cHQysC1vtn5wWjlqo4HB7ZPZ6T3gLEOgZ7/Z/V30Fv8Q91Aoal/xMgjYCEiNvO7w9Jt4 zx8sCHhX8fcIxoJcDU6lFu/DfBsIPuftuO0NKbZwq5rNdASfutG304taMCUb71hgnDhr l2uA== 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=tJAGnVgH+6vctXiMgHfIh1q2U4J0hkA7rosT7AEYfds=; b=ZK5jcd9W8+0MKvJeqeKprGsyLTt7vIOpqx9pQfN7OcoVv8ngEU20mozaTqohmNRVnw 1Re99fwwNOMDh9h/tYTc5xyYWdMzgNKhPS37VX45n8hmYAJ1VM1Jfv2LKimkov2ABuFd 3cDOSWVlZWrlhOph2DxkFuSXAzuEnH8ebeVXRYMpT1zaxV5ywkdLSMPca2oIMSh7unmD ALlnxx7by+HRSp1lfAfsPrzVGOs44u+W0Y4Qifmv8+hnpqMh1aBlCZDEKlsVVzFQeqMO Ld4u/jx3HNu/w6jDkHtDBiBykfPxWdRl7QspLjbLNZxJQcnRe3AYImhxw9VeR3QxOQw7 Ob4Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8-v6si13543450pgn.567.2018.05.23.11.50.01; Wed, 23 May 2018 11:50:16 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934084AbeEWSsh (ORCPT + 99 others); Wed, 23 May 2018 14:48:37 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35580 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934034AbeEWSsc (ORCPT ); Wed, 23 May 2018 14:48:32 -0400 Received: by mail-pg0-f68.google.com with SMTP id 11-v6so8175471pge.2; Wed, 23 May 2018 11:48:32 -0700 (PDT) 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=tJAGnVgH+6vctXiMgHfIh1q2U4J0hkA7rosT7AEYfds=; b=R3xJ+NJ7E7xc9NVsbn8+9L7N/LWlmVB9R2MX1odMwJOtrhF8TmP0134EvKc6m1kvda 4VEh5Ke9n5umMK4BR3nB8rbVTmS0pX46v2WuW2psGTUSCHEhoHVVhvI3Fxt7IzbvXpI6 S/PV1lcHX2/oeeJ3e4HCG1QF2oHYOSPzvm6oMA7h7mdtNLbsYbx4k252CDIT9ugDLQnZ 7bFTZnd7yhtq+FLiYCpLtvCUCndaLjeTRf00h6BdnUkAii2c5SYPwcjU7d/hA0WZdhAw azUb6BYQJGnfaAihV05gPBwn/IjBDPxS3sjcK0reR7wl2gHshDK4XC/rocm3obaiZLZp PMLw== X-Gm-Message-State: ALKqPwcn5v7kEg7232JcSySin0uWGGUCVGjCibClDKmwf2iPR42pGSvz CI2rzVSTyEX+R6zKmYDtZg== X-Received: by 2002:a62:ccdc:: with SMTP id j89-v6mr4061778pfk.182.1527101312193; Wed, 23 May 2018 11:48:32 -0700 (PDT) Received: from localhost (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.gmail.com with ESMTPSA id r22-v6sm29753971pfh.61.2018.05.23.11.48.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 11:48:31 -0700 (PDT) Date: Wed, 23 May 2018 13:48:30 -0500 From: Rob Herring To: Sayali Lokhande Cc: subhashj@codeaurora.org, cang@codeaurora.org, vivek.gautam@codeaurora.org, rnayak@codeaurora.org, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, asutoshd@codeaurora.org, linux-scsi@vger.kernel.org, Mark Rutland , Mathieu Malaterre , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [PATCH RFC 1/3] scsi: ufs: set the device reference clock setting Message-ID: <20180523184830.GA29198@rob-hp-laptop> References: <1526962900-20683-1-git-send-email-sayalil@codeaurora.org> <1526962900-20683-2-git-send-email-sayalil@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526962900-20683-2-git-send-email-sayalil@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 22, 2018 at 09:51:38AM +0530, Sayali Lokhande wrote: > From: Subhash Jadavani > > UFS host supplies the reference clock to UFS device and UFS device > specification allows host to provide one of the 4 frequencies (19.2 MHz, > 26 MHz, 38.4 MHz, 52 MHz) for reference clock. Host should set the > device reference clock frequency setting in the device based on what > frequency it is supplying to UFS device. > > Signed-off-by: Subhash Jadavani > [cang@codeaurora.org: Resolved trivial merge conflicts] > Signed-off-by: Can Guo > Signed-off-by: Sayali Lokhande > --- > .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 8 +++ > drivers/scsi/ufs/ufs.h | 9 ++++ > drivers/scsi/ufs/ufshcd-pltfrm.c | 20 ++++++++ > drivers/scsi/ufs/ufshcd.c | 60 ++++++++++++++++++++++ > drivers/scsi/ufs/ufshcd.h | 2 + > 5 files changed, 99 insertions(+) > > diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > index c39dfef..ac94220 100644 > --- a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > +++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > @@ -41,6 +41,12 @@ Optional properties: > -lanes-per-direction : number of lanes available per direction - either 1 or 2. > Note that it is assume same number of lanes is used both > directions at once. If not specified, default is 2 lanes per direction. > +- dev-ref-clk-freq : Specify the device reference clock frequency, must be one of the following: > + 0: 19.2 MHz > + 1: 26 MHz > + 2: 38.4 MHz > + 3: 52 MHz > + Defaults to 26 MHz if not specified. You already have "ref_clk", can't you just read its frequency? Rob