* Re: [PATCH] PCI: rcar-gen4: Set SRIS mode in rcar_gen4_pcie_common_init() [not found] <20261129154135.277882-1-marek.vasut+renesas@mailbox.org> @ 2026-11-30 20:22 ` Niklas Cassel 2026-12-02 20:15 ` Marek Vasut 0 siblings, 1 reply; 3+ messages in thread From: Niklas Cassel @ 2026-11-30 20:22 UTC (permalink / raw) To: Marek Vasut, Rob Herring, Vincent Guittot, Krzysztof Kozlowski, Conor Dooley, devicetree Cc: linux-pci, Krzysztof Wilczyński, Bjorn Helgaas, Geert Uytterhoeven, Koichiro Den, Lorenzo Pieralisi, Magnus Damm, Manivannan Sadhasivam, Yoshihiro Shimoda, linux-renesas-soc 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: rcar-gen4: Set SRIS mode in rcar_gen4_pcie_common_init() 2026-11-30 20:22 ` [PATCH] PCI: rcar-gen4: Set SRIS mode in rcar_gen4_pcie_common_init() Niklas Cassel @ 2026-12-02 20:15 ` Marek Vasut 2026-12-03 15:06 ` Niklas Cassel 0 siblings, 1 reply; 3+ messages in thread From: Marek Vasut @ 2026-12-02 20:15 UTC (permalink / raw) To: Niklas Cassel, Rob Herring, Vincent Guittot, Krzysztof Kozlowski, Conor Dooley, devicetree Cc: linux-pci, Krzysztof Wilczyński, Bjorn Helgaas, Geert Uytterhoeven, Koichiro Den, Lorenzo Pieralisi, Magnus Damm, Manivannan Sadhasivam, Yoshihiro Shimoda, linux-renesas-soc On 11/30/26 9:22 PM, Niklas Cassel wrote: Hello Niklas, > 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. I agree with 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. I agree with this as well. I think "[RFC PATCH v2 0/3] PCI: Describe the reference clock architecture of a Link" is the proposal ? (I need to catch up on all the threads yet) -- Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: rcar-gen4: Set SRIS mode in rcar_gen4_pcie_common_init() 2026-12-02 20:15 ` Marek Vasut @ 2026-12-03 15:06 ` Niklas Cassel 0 siblings, 0 replies; 3+ messages in thread From: Niklas Cassel @ 2026-12-03 15:06 UTC (permalink / raw) To: Marek Vasut Cc: Rob Herring, Vincent Guittot, Krzysztof Kozlowski, Conor Dooley, devicetree, linux-pci, Krzysztof Wilczyński, Bjorn Helgaas, Geert Uytterhoeven, Koichiro Den, Lorenzo Pieralisi, Magnus Damm, Manivannan Sadhasivam, Yoshihiro Shimoda, linux-renesas-soc On Wed, Dec 02, 2026 at 09:15:34PM +0100, Marek Vasut wrote: > On 11/30/26 9:22 PM, Niklas Cassel wrote: (snip) > > 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. > > I agree with this as well. I think "[RFC PATCH v2 0/3] PCI: Describe the > reference clock architecture of a Link" is the proposal ? Yes. I can send a RFC v3 or a non-RFC version, but I would like some feedback from DT maintainers first. Kind regards, Niklas ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-03 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261129154135.277882-1-marek.vasut+renesas@mailbox.org>
2026-11-30 20:22 ` [PATCH] PCI: rcar-gen4: Set SRIS mode in rcar_gen4_pcie_common_init() Niklas Cassel
2026-12-02 20:15 ` Marek Vasut
2026-12-03 15:06 ` Niklas Cassel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox