Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5891235rdb; Thu, 14 Dec 2023 02:39:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVyJp7MHHhxTKGCsdYkI4pGNvLuloRsC5hH1ez/Z3XoABWNrDrkmLjXK2fzVcbwB2ytm2h X-Received: by 2002:a05:6808:ec6:b0:3b8:b063:5065 with SMTP id q6-20020a0568080ec600b003b8b0635065mr10644542oiv.102.1702550374459; Thu, 14 Dec 2023 02:39:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702550374; cv=none; d=google.com; s=arc-20160816; b=tQ6Ld1lO92vhOwqKfFKbs7eVUml4LY9iju8IWolbYPBXhsi2XXPlTXsrVqPnQIlIfu 2XJI03zoWSfVp1i+9tOgdvxy/vR0MlQUAviLYGbNHEQ5Zi6fcbzIeZpV+tlfjG5LCad3 HtBCKuHQSZc97wfJk7xtDW8vXFXHSzQur5qDThLRuistluZ0+6SbwGfYB7BN2aTD4ak/ g8jImhAS96d140afHdiiifgWfPMPgJcUiPgIKgD2c5vT/fXlPLWzJSgpjpHKYtDQhFhL APb1wqCqRA7hIGH3XPXQmBuDlAssQ7Vpix3R8QjuBHXHJ7YhIC17VJPxW3nrkiox0nZU pZeA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eNAUoe3VqvukVcyay40n0RbVh4jWEde5g2W+x/3K/Y4=; fh=AhfbpkHyyhgwI/YdsOuWsYHEN3EFXrUH00jzLk4QEIA=; b=rQK151OkLoMqqqCYwJycvFy8ICn8GPbytWu2fSU2c6zFK0QtzfANvKhPo8IFfbJqNb w5qGZ/umEWMt/vLSUbGDYuAqigYN7BWfz13b121gXljt67stWZC0SYqc1XS7veduTeJk YU22JKyBYyBLQMnowpovMZkGWyhsZj/Zi27QGV/IZ4nenAGG1mSZCoVHNHHW02+QXPD6 bo1emHuuCxwCBQ+s1kHACqgr1WMWIvrB1oLyN/6PAs68VOfkhPTeezclq5vAO0yZKjU2 8dH3zXVqMz6Jx7vp8v3fHOMUbjvFnuDxsAXD3B/hGsJEv+kWuhmE5ZmZrqszcI9WRatH xSRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E5w1HLkE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id gk14-20020a17090b118e00b0028ae5b19c2bsi2555361pjb.30.2023.12.14.02.39.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 02:39:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E5w1HLkE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D63C380A4F67; Thu, 14 Dec 2023 02:39:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443692AbjLNKjS (ORCPT + 99 others); Thu, 14 Dec 2023 05:39:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443641AbjLNKjQ (ORCPT ); Thu, 14 Dec 2023 05:39:16 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 741ADE3 for ; Thu, 14 Dec 2023 02:39:23 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C20BDC433C7; Thu, 14 Dec 2023 10:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702550363; bh=yCEKQFaUrCZAt0Cggx/F1wMYgUKW9axB5dGFHkP8rxE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E5w1HLkELARynQCRfDz4e/qOmrfpq/znPX7uuY+43vvYzB0JhDPZMpD90pHmb5+TS pNar2GRPHylpBIgI/yXLg6mSjR+fHWHM2uVwD2+F2k704AHEnw2/vMDfKjf8ELTWss 8eXju5pKQonG+EN/Yo1CpqF0H0SVscHiWzDnC0NVCY4kaNyXJ/g3//zAF0xokFehC0 fmBrk5E0ySQus/FAPaF6KjZxe/ESQiEWaN/g/KjbxZeOr7Z3+lqXZzEmX4ieiqil7I KmdayZLawHOGmHZMUHl8LDeyVicfnTJfI0uFpU+0YfCp/GgPDK0ggj/UhIzGnQlF3T xyyVq54yS3Wnw== Date: Thu, 14 Dec 2023 16:09:07 +0530 From: Manivannan Sadhasivam To: Johan Hovold Cc: Manivannan Sadhasivam , andersson@kernel.org, konrad.dybcio@linaro.org, vkoul@kernel.org, sboyd@kernel.org, mturquette@baylibre.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 00/16] Fix Qcom UFS PHY clocks Message-ID: <20231214103907.GL2938@thinkpad> References: <20231214091101.45713-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Dec 2023 02:39:32 -0800 (PST) On Thu, Dec 14, 2023 at 11:15:34AM +0100, Johan Hovold wrote: > On Thu, Dec 14, 2023 at 02:40:45PM +0530, Manivannan Sadhasivam wrote: > > > This series fixes the clocks supplied to QMP PHY IPs in the Qcom SoCs. All > > of the Qcom SoCs except MSM8996 require 3 clocks for QMP UFS: > > > > * ref - 19.2MHz reference clock from RPM/RPMh > > * ref_aux - Auxiliary reference clock from GCC > > * qref - QREF clock from GCC or TCSR (TCSR since SM8550) > > > > MSM8996 only requires 'ref' and 'qref' clocks. > > > > Hence, this series fixes the binding, DT and GCC driver to reflect the > > actual clock topology. > > Is this based on documentation for all the SoCs or on inference from the > current (upstream and downstream) devicetrees? > It is based on the internal documentation. Even downstream devicetrees are wrong. I should've mentioned it in the cover letter. > Are you sure that you should not just describe that some of these UFS > reference clocks are sourced from CXO in the clock driver instead? > I don't get your comment fully. Could you please elaborate? > Take a look at commits > > f446022b932a ("arm64: dts: qcom: sc8280xp: fix UFS reference clocks") > f6abcc21d943 ("clk: qcom: gcc-sc8280xp: add cxo as parent for three ufs ref clks") > Btw, these commits are not accurate. In all the SoCs before SM8550, reference clock for the UFS device comes from the UFS controller. There is a dedicated register in UFSHC memory map that is being toggled by the driver to enable/disable reference clock for the UFS device. Since SM8550, reference clock is directly sourced from RPMh. I'm preparing a series to fix it. Unfortunately, this information is not depicted correctly in the downstream devicetrees. - Mani > Johan > -- மணிவண்ணன் சதாசிவம்