Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Rob Herring <robh@kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org
Cc: linux-pci@vger.kernel.org,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Koichiro Den" <den@valinux.co.jp>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Manivannan Sadhasivam" <mani@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: Mon, 30 Nov 2026 21:22:06 +0100	[thread overview]
Message-ID: <aw3a7iOx369PG8Ge@ryzen> (raw)
In-Reply-To: <20261129154135.277882-1-marek.vasut+renesas@mailbox.org>

Hello Marek,

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
> 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.

Which clocking modes a controller supports is a property of the SoC,
but which mode (Common Clock, SRNS or SRIS) should actually be used is
a property of the board, i.e. it depends on how the board provides the
reference clock (from the slot, or from an on-board clock generator,
and in the latter case, with or without SSC).

So I don't think that per-compatible driver data is the right place to
decide this.

This is even more apparent in endpoint mode, where whether the refclk
is sourced from the PCIe slot or from an on-board clock generator is
entirely up to the board design.

We have discussed this a few times before, see:
https://lore.kernel.org/linux-pci/aCQ9ge1eROhh9RVE@ryzen/
https://lore.kernel.org/linux-pci/aMp0hNnBUwTV5cbp@ryzen/

In the first thread, Rob agreed that this information is needed in DT
(although he suggested to describe the clock source using the clock
binding, with SSC described separately):
https://lore.kernel.org/linux-pci/20250519145636.GA2090206-robh@kernel.org/

In the second thread, the S32G driver dropped its vendor specific
"nxp,phy-mode" property "until we agreed on a generic binding", and
simply uses CRNS for now:
https://lore.kernel.org/linux-pci/20251121164920.2008569-1-vincent.guittot@linaro.org/

So rather than adding more per-SoC hardcoding, I would much prefer if
we could finally agree on a generic DT property for this. At least
Tegra, Qcom, Rockchip and S32G would benefit from such a property as
well.


Kind regards,
Niklas

      parent reply	other threads:[~2026-11-30 20:22 UTC|newest]

Thread overview: 3+ 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-11-30 20:22 ` Niklas Cassel [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=aw3a7iOx369PG8Ge@ryzen \
    --to=cassel@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=den@valinux.co.jp \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=krzk+dt@kernel.org \
    --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+renesas@mailbox.org \
    --cc=robh@kernel.org \
    --cc=vincent.guittot@linaro.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