Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/4] PCI: qcom: Recalibrate the PHY on temperature drift
@ 2026-11-25 10:17 Manivannan Sadhasivam via B4 Relay
  2026-11-25 10:17 ` [PATCH 1/4] thermal/of: Add thermal_zone_get_zone_by_node() API Manivannan Sadhasivam via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-11-25 10:17 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Konrad Dybcio,
	Abel Vesa
  Cc: linux-pm, linux-kernel, linux-arm-msm, linux-pci, devicetree,
	Manivannan Sadhasivam

Problem Statement
=================

Some PCIe PHY instances on SoCs like Glymur benefit from periodic
recalibration to compensate for temperature-related drift and maintain
stable link operation. Otherwise there is a potential for a link drop.

The PHY gets calibrated when the link trains and it cannot recalibrate
itself while the link is up, so the recalibration has to be driven by
software.

Proposal
========

The PCIe controller driver triggers the recalibration with a PCIe link
speed switch once the temperature change on a polled sensor exceeds the
defined threshold. For this purpose, the driver needs to know which
sensors track the PHY temperature and the drift temperature. Both of them
vary per platform, so they come from DT.

Once a zone has drifted far enough, the driver performs the link speed
switching by scaling down the Target Link Speed to 2.5 GT/s and then
restoring the original Target Link Speed. This forces the link to run
Equalization again, which recalibrates the PHY against the current
temperature, thereby maintaining stable link operation. Equalization only
runs on a speed change to 8.0 GT/s or above.

Patch 1 adds a lookup from a DT node to its thermal zone, which the driver
needs for resolving the phandles it is handed. Patch 2 adds the new DT
binding property to specify the tuples of thermal zones and their drift
temperature. Patch 3 adds support for reading those zones on an interval
and recalibrating the PHY once one of them has drifted far enough.

Finally, patch 4 wires up the two Glymur PCIe controllers that use this,
pointing each one at the sensor that tracks the temperature of the PHY it
feeds.

Testing
=======

Tested on the Glymur CRD, on the two controllers patch 4 describes.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
Manivannan Sadhasivam (4):
      thermal/of: Add thermal_zone_get_zone_by_node() API
      dt-bindings: PCI: qcom,pcie-x1e80100: Add qcom,pcie-recalibration-thermal-zones
      PCI: qcom: Recalibrate the PHY on temperature drift
      arm64: dts: qcom: glymur: Describe the PCIe thermal inputs

 .../bindings/pci/qcom,pcie-x1e80100.yaml           |  31 +++
 arch/arm64/boot/dts/qcom/glymur.dtsi               |   4 +
 drivers/pci/controller/dwc/pcie-qcom.c             | 224 +++++++++++++++++++++
 drivers/thermal/thermal_of.c                       |  21 ++
 include/linux/thermal.h                            |   8 +
 5 files changed, 288 insertions(+)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261013-glymur-thermal-fix-17fdc3a0a762

Best regards,
--  
மணிவண்ணன் சதாசிவம்



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-25 10:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 10:17 [PATCH 0/4] PCI: qcom: Recalibrate the PHY on temperature drift Manivannan Sadhasivam via B4 Relay
2026-11-25 10:17 ` [PATCH 1/4] thermal/of: Add thermal_zone_get_zone_by_node() API Manivannan Sadhasivam via B4 Relay
2026-11-25 10:17 ` [PATCH 2/4] dt-bindings: PCI: qcom,pcie-x1e80100: Add qcom,pcie-recalibration-thermal-zones Manivannan Sadhasivam via B4 Relay
2026-11-25 10:17 ` [PATCH 3/4] PCI: qcom: Recalibrate the PHY on temperature drift Manivannan Sadhasivam via B4 Relay
2026-11-25 10:45   ` sashiko-bot
2026-11-25 10:17 ` [PATCH 4/4] arm64: dts: qcom: glymur: Describe the PCIe thermal inputs Manivannan Sadhasivam via B4 Relay
2026-11-25 10:33   ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox