Skip to content

RFC phy: qcom-qmp: add support for pipe clock muxing

Johan Hovold linux-arm-msm linux-devicetree linux-pci linux-phy lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5phy: qcom-qmp: add support for pipe clock muxingdrivers/phy/qualcomm/phy-qcom-qmp.c+65 -69 replies
2/5arm64: dts: qcom: sc7280: move pipe mux handling to phyarch/arm64/boot/dts/qcom/sc7280.dtsi+6 -123 replies
3/5PCI: qcom: Remove unnecessary pipe_clk handlingdrivers/pci/controller/dwc/pcie-qcom.c+3 -410 replies
4/5PCI: qcom: Drop pipe clock muxingdrivers/pci/controller/dwc/pcie-qcom.c+1 -380 replies
5/5PCI: qcom: Drop unused post-init callbacksdrivers/pci/controller/dwc/pcie-qcom.c+2 -130 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchBjorn Andersson
1/5
2/5
3/5R-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH RFC 0/5] phy: qcom-qmp: add support for pipe clock muxing

Some QMP PHYs need to remux to their pipe clock input to the pipe clock output generated by the PHY before powering on the PHY and restore the default source during power down.

         +---------------+
         |   PHY block   |<<---------------------------------------+
         |               |                   +-----+               |
         |   +-------+   |                   | GCC |               |
   I/P---^-->|  PLL  |---^--->pipe_clksrc--->|-\   |		   |
    clk  |   +-------+   |                   |  +--|--->pipe_clk---+
    	 |		 |	       xo--->|-/   |  
         +---------------+	             +-----|

This series moves the pipe clock mux handling from PCIe controller driver into the PHY driver which already manages the pipe clock as the PHY is both the producer of the pipe clock as well as its (primary) consumer.

This is an alternative to the series posted here

	https://lore.kernel.org/r/[email protected]

which instead moves the mux handling into the clock drivers and ties remuxing to the gating/ungating of the pipe clock in the GCC. That approach means that it is still possible to have the pipe clock ungated without providing a valid source, somethings which can cause hangs when enabling/disabling the GDSC (presumably as some entity is consuming the pipe clock).

Implementing this in the clock drivers also means that the implementation is spread out over multiple files and makes it harder to add support for new SoCs as it may not be clear that every pipe clock mux definition needs to be updated with safe and non-safe parent-clock indexes and an ad-hoc mux ops implementation.

The custom mux implementation currently also hides the actual topology of the clock tree by always reporting the pipe mux source as being provided by the PHY (e.g. as reported by debugfs).

This series, by contrast, ties the muxing to when the pipe clock source is enabled, that is, when the PHY is powered on, so that the GCC pipe clock always has a valid source.

The implementation is more straight-forward, avoids the one-off clock mux implementation, and allows for documenting this once and for all in the PHY driver.

Note that the devicetree bindings remains to be updated but that this was left out of this RFC.

This series depends on the two qcom-qmp fixlets posted here:

	https://lore.kernel.org/all/[email protected]/

Johan

Dmitry Baryshkov (1):
PCI: qcom: Remove unnecessary pipe_clk handling

Johan Hovold (4):
phy: qcom-qmp: add support for pipe clock muxing
arm64: dts: qcom: sc7280: move pipe mux handling to phy
PCI: qcom: Drop pipe clock muxing
PCI: qcom: Drop unused post-init callbacks

 arch/arm64/boot/dts/qcom/sc7280.dtsi   | 18 ++---
 drivers/pci/controller/dwc/pcie-qcom.c | 96 ++------------------------
 drivers/phy/qualcomm/phy-qcom-qmp.c    | 71 +++++++++++++++++--
 3 files changed, 76 insertions(+), 109 deletions(-)
Signature · 7 lines
2.35.1


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy