Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] phy: qcom: qmp-pcie: Add PCIe PHY no_csr reset support
@ 2025-02-14 10:45 Wenbin Yao
  2025-02-14 10:45 ` [PATCH v3 1/2] phy: qcom: pcie: Determine has_nocsr_reset dynamically Wenbin Yao
  2025-02-14 10:45 ` [PATCH v3 2/2] phy: qcom: qmp-pcie: Add PHY register retention support Wenbin Yao
  0 siblings, 2 replies; 7+ messages in thread
From: Wenbin Yao @ 2025-02-14 10:45 UTC (permalink / raw)
  To: vkoul, kishon, p.zabel, dmitry.baryshkov, abel.vesa, quic_qianyu,
	neil.armstrong, manivannan.sadhasivam, quic_devipriy,
	konrad.dybcio, linux-arm-msm, linux-phy, linux-kernel
  Cc: Wenbin Yao

The series aims to skip phy register programming and drive PCIe PHY with
register setting programmed in bootloader by simply toggling no_csr reset,
which once togglled, PHY hardware will be reset while PHY registers are
retained.

First, determine whether PHY setting can be skipped by checking
QPHY_START_CTRL register and the existence of nocsr reset. If it is
programmed and no_csr reset is supported, do no_csr reset and skip BCR
reset which will reset entire PHY.

This series also remove has_nocsr_reset flag in qmp_phy_cfg structure and
decide whether the PHY supports nocsr reset by checking the existence of
nocsr reset in device tree.

The series are tested on X1E80100-QCP and HDK8550.

The commit messages of this patchset have been modified based on comments
and suggestions.

Changes in v3:
- Replace devm_reset_control_get_exclusive with
  devm_reset_control_get_optional_exclusive when get phy_nocsr reset
  control in Patch 1/2.
- Do not ignore -EINVAL when get phy_nocsr reset control in Patch 1/2.
- Replace phy_initialized with skip_init in struct qmp_pcie in Patch 2/2.
- Add a comment to why not check qmp->skip_init in function
  qmp_pcie_power_off in Patch 2/2.
- Link to v2: https://lore.kernel.org/all/20250211094231.1813558-1-quic_wenbyao@quicinc.com/

Changes in v2:
- Add Abel's and Manivannan's Reviewed-by tag to Patch 1/2.
- Refine commit msg of Patch 2/2.
- Link to v1: https://lore.kernel.org/all/20250121094140.4006801-1-quic_wenbyao@quicinc.com/

Konrad Dybcio (1):
  phy: qcom: pcie: Determine has_nocsr_reset dynamically

Qiang Yu (1):
  phy: qcom: qmp-pcie: Add PHY register retention support

 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 113 ++++++++++++++---------
 1 file changed, 67 insertions(+), 46 deletions(-)


base-commit: bcf2acd8f64b0a5783deeeb5fd70c6163ec5acd7
-- 
2.34.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

end of thread, other threads:[~2025-02-17 10:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14 10:45 [PATCH v3 0/2] phy: qcom: qmp-pcie: Add PCIe PHY no_csr reset support Wenbin Yao
2025-02-14 10:45 ` [PATCH v3 1/2] phy: qcom: pcie: Determine has_nocsr_reset dynamically Wenbin Yao
2025-02-14 10:49   ` Philipp Zabel
2025-02-14 10:45 ` [PATCH v3 2/2] phy: qcom: qmp-pcie: Add PHY register retention support Wenbin Yao
2025-02-14 14:46   ` Manivannan Sadhasivam
2025-02-17 10:05     ` Qiang Yu
2025-02-17 10:08     ` Wenbin Yao (Consultant)

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