All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: "Niklas Cassel" <cassel@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Abraham I" <kishon@kernel.org>,
	dlemoal@kernel.org, linux-pci@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: PCI: pci-ep: Add ref-clk-mode
Date: Fri, 9 May 2025 13:18:27 -0500	[thread overview]
Message-ID: <20250509181827.GA3879057-robh@kernel.org> (raw)
In-Reply-To: <dxgs3wuekwjh6f22ftkmi7dcw7xpw3fa7lm74fwm5thvol42z3@wuovkynp3jey>

On Wed, Apr 30, 2025 at 01:23:03PM +0530, Manivannan Sadhasivam wrote:
> On Wed, Apr 30, 2025 at 09:16:56AM +0200, Niklas Cassel wrote:
> > Hello Mani,
> > 
> > On Wed, Apr 30, 2025 at 12:35:18PM +0530, Manivannan Sadhasivam wrote:
> > > On Fri, Apr 25, 2025 at 11:20:12AM +0200, Niklas Cassel wrote:
> > > > While some boards designs support multiple reference clocking schemes
> > > > (e.g. Common Clock and SRNS), and can choose the clocking scheme using
> > > > e.g. a DIP switch, most boards designs only support a single clocking
> > > > scheme (even if the SoC might support multiple clocking schemes).
> > > > 
> > > > This property is needed such that the PCI controller driver, in endpoint
> > > > mode, can set the proper bits, e.g. the Common Clock Configuration bit and
> > > > the SRIS Clocking bit, in the PCIe Link Control Register (Offset 10h).
> > > > (Sometimes, there are also specific bits that needs to be set in the PHY.)
> > > > 
> > > 
> > > Thanks for adding the property. I did plan to submit something similar to allow
> > > Qcom PCIe EP controllers to run in SRIS mode.
> > > 
> > > > Some device tree bindings have already implemented vendor specific
> > > > properties to handle this, e.g. "nvidia,enable-ext-refclk" (Common Clock)
> > > > and "nvidia,enable-srns" (SRNS). However, since this property is common
> > > > for all PCI controllers running in endpoint mode, this really ought to be
> > > > a property in the common pcie-ep.yaml device tree binding.
> > > > 
> > > 
> > > We should also mark the nvidia specific properties deprecated and use this one.
> > > But that's for another follow up series.
> > > 
> > > > Add a new ref-clk-mode property that describes the reference clocking
> > > > scheme used by the endpoint. (We do not add a common-clk-ssc option, since
> > > > we cannot know/control if the common clock provided by the host uses SSC.)
> > > > 
> > > > Signed-off-by: Niklas Cassel <cassel@kernel.org>
> > > > ---
> > > >  Documentation/devicetree/bindings/pci/pci-ep.yaml | 9 +++++++++
> > > >  1 file changed, 9 insertions(+)
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/pci/pci-ep.yaml b/Documentation/devicetree/bindings/pci/pci-ep.yaml
> > > > index f75000e3093d..206c1dc2ab82 100644
> > > > --- a/Documentation/devicetree/bindings/pci/pci-ep.yaml
> > > > +++ b/Documentation/devicetree/bindings/pci/pci-ep.yaml
> > > > @@ -42,6 +42,15 @@ properties:
> > > >      default: 1
> > > >      maximum: 16
> > > >  
> > > > +  ref-clk-mode:
> > > 
> > > How about 'refclk-mode' instead of 'ref-clk-mode'? 'refclk' is the most widely
> > > used terminology in the bindings.
> > 
> > I does seem that way.
> > Will use your suggestion in V2.
> > 
> > 
> > > 
> > > > +    description: Reference clocking architechture
> > > > +    enum:
> > > > +      - common-clk        # Common Reference Clock (provided by RC side)
> > > 
> > > Can we use 'common-clk-host' so that it is explicit that the clock is coming
> > > from the host side?
> > 
> > Sure.
> > 
> > I take it that you prefer 'common-clk-host' over 'common-clk-rc' ?
> > 
> 
> That's what I intended previously, but thinking more, I feel that we should
> stick to '-rc'i, as that's what the PCIe spec uses.

Couldn't this apply to any link, not just a RC? Is there PCIe 
terminology for upstream and downstream ends of a link?

The 'common-clk' part seems redundant to me with '-rc' or whatever we 
end up with added.

Finally, this[1] seems related. Figure out a common solution.

Rob

[1] https://lore.kernel.org/all/20250406144822.21784-2-marek.vasut+renesas@mailbox.org

  reply	other threads:[~2025-05-09 18:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25  9:20 [PATCH] dt-bindings: PCI: pci-ep: Add ref-clk-mode Niklas Cassel
2025-04-30  7:05 ` Manivannan Sadhasivam
2025-04-30  7:16   ` Niklas Cassel
2025-04-30  7:53     ` Manivannan Sadhasivam
2025-05-09 18:18       ` Rob Herring [this message]
2025-05-09 19:31         ` Manivannan Sadhasivam
2025-05-10 11:04           ` Niklas Cassel
2025-05-12 13:59             ` Rob Herring
2025-05-13 17:25               ` Niklas Cassel
2025-05-14  6:51                 ` Niklas Cassel
2025-05-19 14:56                 ` Rob Herring
2025-04-30  7:18   ` Krzysztof Kozlowski

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=20250509181827.GA3879057-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=kishon@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.