From: Manivannan Sadhasivam <mani@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
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,
Shazad Hussain <quic_shazhuss@quicinc.com>,
quic_cang@quicinc.com
Subject: Re: [PATCH 00/16] Fix Qcom UFS PHY clocks
Date: Thu, 14 Dec 2023 17:19:59 +0530 [thread overview]
Message-ID: <20231214114959.GC48078@thinkpad> (raw)
In-Reply-To: <ZXrnZeDYOsteY5zT@hovoldconsulting.com>
On Thu, Dec 14, 2023 at 12:30:45PM +0100, Johan Hovold wrote:
> On Thu, Dec 14, 2023 at 04:44:09PM +0530, Manivannan Sadhasivam wrote:
> > + Can
> >
> > On Thu, Dec 14, 2023 at 12:00:40PM +0100, Johan Hovold wrote:
> > > [ +CC: Shazad ]
> > >
> > > On Thu, Dec 14, 2023 at 04:09:07PM +0530, Manivannan Sadhasivam wrote:
> > > > 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:
>
> > > Unless the PHY consumes CXO directly, it should not be included in the
> > > binding as you are suggesting here.
> >
> > PHY is indeed directly consuming CXO. That's why I included it in the binding.
>
> Ok, good. It's a bit frustrating that people can even seem to agree on
> answers to direct questions about that.
>
I can understand that.
> > > We discussed this at some length at the time with Bjorn and Shazad who
> > > had access to the documentation and the conclusion was that, at least on
> > > sc8280xp, the PHY does not use CXO directly and instead it should be
> > > described as a parent to the UFS refclocks in the clock driver:
> > >
> > > https://lore.kernel.org/lkml/Y2OEjNAPXg5BfOxH@hovoldconsulting.com/
> > >
> > > The downstream devicetrees have a bad habit of including parent clocks
> > > directly in the consumer node instead of modelling this in clock driver
> > > also for other peripherals.
> > >
> >
> > No, I can assure that you got the wrong info. UFS PHY consumes the clock
> > directly from RPMh. It took me several days to dig through the UFS and PHY docs
> > and special thanks to Can Guo from UFS team, who provided much valuable
> > information about these clocks.
>
> Sounds like you've done your research.
>
> > > What exactly is wrong with those commits? We know that the controller
> > > does not consume GCC_UFS_REF_CLKREF_CLK directly, but describing that as
> > > such for now was a deliberate choice:
> > >
> > > 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.
> > >
> >
> > No, GCC_UFS_REF_CLKREF_CLK is _not_ the clock to UFS devices. I haven't found
> > information about this specific register in GCC. Initially I thought this is for
> > enabling QREF clocks for the UFS MEM phy, but I haven't found the answer yet.
>
> Just quoting Bjorn.
>
> > But as I said earlier, reference clock to UFS devices comes directly from the
> > controller and there is a specfic register for controlling that. Starting from
> > SM8550, reference clock comes from RPMh.
>
> Sure, but that was only part of what those commits did or claimed. Bjorn
> also explicitly stated that those refclocks were sourced from CXO, even
> though I now see a claim from Shazad in that thread claiming the
> opposite:
>
> https://lore.kernel.org/all/Y2Imnf1+v5j5CH9r@hovoldconsulting.com/
To clarify further, what Shazad said about GCC_UFS_REF_CLKREF_CLK is correct.
This clock is not directly sourced by CXO, so it should be voted by the
_PHY_ driver separately along with CXO (which still feeds PHY). That's what I
represented in the binding.
>
> Without access to docs I can only ask questions and try to do tedious
> inferences from incomplete open sources (e.g. downstream devicetrees).
>
That's the life for most of us :) Even with access to internal docs, it is
difficult to find the information we are looking for. Because, a very few people
know where the information is buried.
- Mani
> Johan
--
மணிவண்ணன் சதாசிவம்
prev parent reply other threads:[~2023-12-14 11:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 9:10 [PATCH 00/16] Fix Qcom UFS PHY clocks Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 01/16] dt-bindings: phy: qmp-ufs: Fix " Manivannan Sadhasivam
2023-12-14 15:55 ` Conor Dooley
2023-12-14 17:20 ` Rob Herring
2023-12-18 11:48 ` Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 02/16] phy: qcom-qmp-ufs: Switch to devm_clk_bulk_get_all() API Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 03/16] dt-bindings: clock: qcom: Add missing UFS QREF clocks Manivannan Sadhasivam
2023-12-14 15:44 ` Conor Dooley
2023-12-14 9:10 ` [PATCH 04/16] clk: qcom: gcc-sc8180x: " Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 05/16] arm64: dts: qcom: msm8996: Fix UFS PHY clocks Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 06/16] arm64: dts: qcom: msm8998: " Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 07/16] arm64: dts: qcom: sdm845: " Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 08/16] arm64: dts: qcom: sm6115: " Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 09/16] arm64: dts: qcom: sm6125: " Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 10/16] arm64: dts: qcom: sm6350: " Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 11/16] arm64: dts: qcom: sm8150: " Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 12/16] arm64: dts: qcom: sm8250: " Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 13/16] arm64: dts: qcom: sc8180x: " Manivannan Sadhasivam
2023-12-14 9:10 ` [PATCH 14/16] arm64: dts: qcom: sc8280xp: " Manivannan Sadhasivam
2023-12-14 9:11 ` [PATCH 15/16] arm64: dts: qcom: sm8350: " Manivannan Sadhasivam
2023-12-14 9:11 ` [PATCH 16/16] arm64: dts: qcom: sm8550: " Manivannan Sadhasivam
2023-12-14 10:15 ` [PATCH 00/16] Fix Qcom " Johan Hovold
2023-12-14 10:39 ` Manivannan Sadhasivam
2023-12-14 11:00 ` Johan Hovold
2023-12-14 11:14 ` Manivannan Sadhasivam
2023-12-14 11:30 ` Johan Hovold
2023-12-14 11:49 ` Manivannan Sadhasivam [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231214114959.GC48078@thinkpad \
--to=mani@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=johan@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mturquette@baylibre.com \
--cc=quic_cang@quicinc.com \
--cc=quic_shazhuss@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).