Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Koichiro Den <den@valinux.co.jp>
To: Marek Vasut <marek.vasut@mailbox.org>
Cc: linux-pci@vger.kernel.org,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] PCI: rcar-gen4: Set SRIS mode in rcar_gen4_pcie_common_init()
Date: Thu, 3 Dec 2026 13:57:27 +0900	[thread overview]
Message-ID: <axC_EV9j-MH0sb3d@z790sl> (raw)
In-Reply-To: <50c4e389-1664-4fc1-9034-f59b8351aa64@mailbox.org>

On Wed, Dec 02, 2026 at 09:12:41PM +0100, Marek Vasut wrote:
> On 12/2/26 3:54 PM, Koichiro Den wrote:
> > On Wed, Dec 02, 2026 at 04:10:57AM +0100, Marek Vasut wrote:
> > > On 11/30/26 9:34 AM, Koichiro Den wrote:
> > > > Hi Marek, thanks for informing me via cc.
> > > 
> > > Hello Den-san, gladly, thank you for your good feedback.
> > > 
> > > > On Sun, Nov 29, 2026 at 04:40:52PM +0100, Marek Vasut wrote:
> > > > > Except for R-Car S4 variant of this controller, all other variants of
> > > > > this PCIe controller set PCIEMSR0 APP_SRIS_MODE bit as part of their
> > > > > .link_up callback. Simplify this, introduce .sris_mode flag in driver
> > > >     ^^^^^^^^
> > > > nit: is this a typo for .ltssm_control?
> > > 
> > > This should have been .start_link , which yes, invokes ->ltssm_control .
> > > 
> > > > > data and set it for all but R-Car S4 controller, and then set PCIEMSR0
> > > > > APP_SRIS_MODE bit based on this flag in rcar_gen4_pcie_common_init()
> > > > > already. Removes one read-modify-write round. No functional change.
> > > > 
> > > > For R-Car Gen5 PCIe4, is this really no functional change? If not, would it be
> > > > better to split the Gen5 change into a separate patch?
> > > Looking at the input from Niklas, I think this entire patch will be
> > > superseded by something even better.
> > 
> > Since I believe this was meant as a clean-up, I agree we can wait for the
> > generic binding to settle. Thanks!
> 
> Likewise, thank you for keeping an eye on these patches!
> 
> > P.S. Just thinking out loud about S4 and Niklas's RFC v2...
> > As you might remember, I've got two Spiders connected at a remote site, one as
> > RC and the other as EP. Going by the schematic (around R377/R378 marked "Do not
> > stuff"), I'd expect each board to use its own REFCLK in the stock configuration.
> 
> I was always wondering whether you modified those S4 Spiders somehow, or
> whether you simply connected them with an Oculink cable.

Just the cable in my case. The two Spiders connected directly with a LINKUP
OCuLink cable. I was told this cable had already been tested with two Spiders.
(I suspect it's an Internal crossover cable, but I haven't checked the
plug-to-plug wiring myself.)

The boards weren't supplied as EP-only boards, and I'm not aware of any rework
around CN16 (including R377/R378). Per the schematic, OUT4 of U36 (the clock
generator) feeds the local PCIe0 PHY and OUT5 goes to CN16 on both boards.
So I'd expect the endpoint Spider to use its own REFCLK even when the host
supplies one at CN16. The link comes up fine in this setup.

> I have multiple
> M.2-to-Oculink adapters here now, but I never got around to figuring out
> what to do about the clock lane, especially on the EP end.

I was thinking of separate clocks for a two-board setup, but were you thinking
of having the endpoint take REFCLK from the host through the adapter? I've had a
quick glance at the White/Sparrow Hawk schematics, and the Sparrow Hawk one
appears to spell out which 0-ohm links to change for what.
I'm sure I'm not telling you anything new here. Also, I don't have either Hawk
to try it.

> 
> > The link still comes up with the S4 driver effectively following the "Common
> > REFCLK" branch in Figure 104.5 of the S4 UM. The same figure shows a single
> > "Separate REFCLK" branch for both SRNS and SRIS. The host can supply REFCLK at
> > the OcuLink connector (pls see c588e1c9846b for the GPIO control). Since a
> > different endpoint may use that clock, I'd imagine we'd leave refclk-mode
> > unspecified in the stock Spider host DTS with the binding as proposed in v2.
> 
> For Spider, I agree. Also, I think we might need to model the oculink
> connector in DT, with its clock (control) property to enable/disable the
> PCIe clock on the connector ?

I'm not sure what that would look like on Spider. Do you have a particular use
case in mind for controlling the clock at CN16? E.g. leaving it off at boot in a
fixed setup where we know the peer EP uses its own REFCLK? I'd appreciate it if
you could elaborate a bit, maybe with a rough DTS snippet.

Thanks for taking your time to discuss with me.

Best regards,
Koichiro Den

> 
> [...]
> 
> -- 
> Best regards,
> Marek Vasut

  reply	other threads:[~2026-12-03  4:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 15:40 [PATCH] PCI: rcar-gen4: Set SRIS mode in rcar_gen4_pcie_common_init() Marek Vasut
2026-11-30  8:34 ` Koichiro Den
2026-12-02  3:10   ` Marek Vasut
2026-12-02 14:54     ` Koichiro Den
2026-12-02 20:12       ` Marek Vasut
2026-12-03  4:57         ` Koichiro Den [this message]
2026-11-30 20:22 ` Niklas Cassel
2026-12-02 20:15   ` Marek Vasut

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=axC_EV9j-MH0sb3d@z790sl \
    --to=den@valinux.co.jp \
    --cc=bhelgaas@google.com \
    --cc=geert+renesas@glider.be \
    --cc=kwilczynski@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mani@kernel.org \
    --cc=marek.vasut@mailbox.org \
    --cc=robh@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /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