Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1739550rwi; Thu, 3 Nov 2022 08:33:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7JqOYeeyZTFzCaDl1+w+6GTInOexgmUrVIEfrz9Ry+Bheh1UQqI5ZCXjTObFZ2la9wmzQJ X-Received: by 2002:a05:6402:440f:b0:45d:297b:c70a with SMTP id y15-20020a056402440f00b0045d297bc70amr30836115eda.187.1667489603559; Thu, 03 Nov 2022 08:33:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667489603; cv=none; d=google.com; s=arc-20160816; b=blep8A2ZJEKWV8RYznWrxkbS+OkUy/aGMnKEtpUyonY1YHdETdeFy7N9C4Vbs1h6Cm SGUVehSg6EUi2KCEVNVDxAD2vpCkqHRmUmygqd9+KivaVilY/jOzGpPTEGo/yhdEe76t jJD7vu9IZMGPgvkBhny5C8tvdopWFznQqB7ZRET1FOk1aniZgRRp4Cdz8Hl7LwJ5OODf tmjqTsd+a4Ca5Ov/9/vstLreQTV/KCNwiAwW6pzru5tEz5K3WaJ7wWa0uI/AL/MbTgsr y8lq9ieNsptiMVV1J5u3DFtnENYGWefLzBJ0v4nAu7lvTykZt/tcUUi2lIE4p8NmriOF roPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=K9pLUEI1Tz4Y5PD/EbnNYqWVp2vI5LQf8XzTXG0H11c=; b=f6SJPeztS45AzdMDmVv/xc+SJDopNmb2PUElX9mP6WwwxGeF+lHKuN7vMgQgD/8pDY VAXu9/2XYqSKtGP70sNEnxIEG2ZIl/MYB1TvUNMyb7ygQqW4D5o+qjN8WfdE/WNIJfIf g4KiD5GPjLoyXr3Y1+xzbkf4+C3AigaSiQyw7Umi44y8tFE1HQc3EK5ARMjhDkbpNUpB myXAD+8eGHFPxFAYUm1auBtXRX1hqPJ02+vu7m42wz/LEjdS1MLMaam5hjNtNmrrUqzj xa8D9TD15XICyb9kiA50qyoqQVqRLPtGQDcQrIu3x2lOoJxzmhBpUWSQ/p6J+ZeSVInm koXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EQZzYkkU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q20-20020a170906389400b0077ccad53173si1267353ejd.277.2022.11.03.08.32.53; Thu, 03 Nov 2022 08:33:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EQZzYkkU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232130AbiKCPYH (ORCPT + 98 others); Thu, 3 Nov 2022 11:24:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232161AbiKCPYC (ORCPT ); Thu, 3 Nov 2022 11:24:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 309CA11162; Thu, 3 Nov 2022 08:24:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DA425B828E9; Thu, 3 Nov 2022 15:23:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9223C433D6; Thu, 3 Nov 2022 15:23:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667489038; bh=fg7hNvJiWPNnBMDzywvHNR7sYaua2ncK141ddfpOrdo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EQZzYkkUo2mOJJMcmlIl6A+bPZI4PMPBAwR7yQcBCWcvLZd8GR0o3rMY7/jG6yWab OAh94msJVke3pTVCe0e+GmvKKr2oX54eoqO3aeVtEPy3OQ4TFDxx1lCJRAo3lQF1ys /N9IrOe1t+3YlM2/XyBVq3xZLAOEK+XtdRH8XBRQEEU7+BPmrg3NM1nPGa4z+qeJgU TnvsuyC890esfZn1ylZE8aig0/cGtbqiiD+HsKlBcGe9NXQ5IUd0IBpYroOWSMtaXr sueqLf5HrHsArx9rZJuy1ojtPSi3ZcEueKhzEjAWlIdiXv/0kngawtnNlBthRZnOdz v1+9XAS+x7rYw== Date: Thu, 3 Nov 2022 10:23:55 -0500 From: Bjorn Andersson To: Johan Hovold Cc: Shazad Hussain , Stephen Boyd , bmasney@redhat.com, Andy Gross , Konrad Dybcio , Michael Turquette , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] clk: qcom: gcc-sc8280xp: add cxo as parent for gcc_ufs_ref_clkref_clk Message-ID: <20221103152355.5sfbkpsfvjzgeixi@builder.lan> References: <20221030142333.31019-1-quic_shazhuss@quicinc.com> <20221101182402.32CE5C433C1@smtp.kernel.org> <20221103024949.lw4g2tavk7uw5xt4@builder.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 03, 2022 at 10:06:20AM +0100, Johan Hovold wrote: > On Wed, Nov 02, 2022 at 09:49:49PM -0500, Bjorn Andersson wrote: > > On Wed, Nov 02, 2022 at 10:26:13AM +0100, Johan Hovold wrote: > > > On Wed, Nov 02, 2022 at 02:15:26PM +0530, Shazad Hussain wrote: > > > > On 11/2/2022 1:43 PM, Johan Hovold wrote: > > > > > > > > Right, but if the PHYs really requires CX and it is not an ancestor of > > > > > the refclk then this should be described by the binding (and not be > > > > > hidden away in the clock driver). > > > > > > > This makes sense, will be posting v2 post for the same. > > > > I assume this should use the Fixes tag then ! > > > > > > Yeah, I guess to you can add a fixes tag for the commits adding support > > > for sc8280xp to the UFS PHY binding and driver. > > > > > > But please do check with the hardware documentation first so we get this > > > right this time. > > > > > > I've already asked Bjorn to see what he can dig out as it is still not > > > clear how the two "card" refclocks (GCC_UFS_CARD_CLKREF_CLK and > > > GCC_UFS_1_CARD_CLKREF_CLK) are supposed to be used. > > > > > > > We've come full circle and Shazad's patch came from that discussion :) > > Ah, good. :) > > > In line with the downstream dts, we have GCC_UFS{,_1}_CARD_CLKREF_CLK > > providing a reference clock to the two phys. Then GCC_UFS_REF_CLKREF_CLK > > feeds the UFS refclock pads (both of them), which connect to the memory > > device(s). > > > > In other words, GCC_UFS{,_1}_CARD_CLKREF_CLK should be "ref" in > > respective phy. > > > > GCC_UFS_REF_CLKREF_CLK is the clock to the devices, but as we don't > > represent the memory device explicitly it seems suitable to use as > > "ref_clk" in the ufshc nodes - which would then match the special > > handling of the "link clock" in the UFS driver. > > Thanks for clearing that up. Using GCC_UFS_REF_CLKREF_CLK as ref_clk for > the controller sounds reasonable. > > I guess the only missing piece is which "card" ref clock is used by > which PHY. > > The ADP dts uses: > > phy ref clock > > phy@1d87000 (UFS_PHY) GCC_UFS_CARD_CLKREF_CLK > phy@1da7000 (UFS_CARD) GCC_UFS_1_CARD_CLKREF_CLK > This matches the documentation. Regards, Bjorn > but that is not what the firmware on ADP and CRD seem to enable. > > Both the ADP and CRD fw leaves GCC_UFS_1_CARD_CLKREF_CLK enabled, while > GCC_UFS_CARD_CLKREF_CLK is only enabled on ADP (which unlike the CRD > also uses the UFS_CARD controller). > > Does the ADP dts have these clocks switched or is the firmware confused? > > (Also note that experiments suggest that neither refclock appears to > has to be explicitly enabled for the controllers to function.) > > > All three clocks are sourced off the CXO pad, so I would like this patch > > to cover at least all of these. And > > > > Fixes: d65d005f9a6c ("clk: qcom: add sc8280xp GCC driver") > > > > seems to be in order for such patch. > > > > > > @Johan, would you mind writing a dts patch flipping the clocks around > > and Shazad can update this patch? > > I'll do so, but I'll wait with posting until you can confirm which > clkref is which. > > Johan