]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
phy: zynqmp: Enable reference clock correctly
authorSean Anderson <sean.anderson@linux.dev>
Fri, 28 Jun 2024 20:55:36 +0000 (16:55 -0400)
committerVinod Koul <vkoul@kernel.org>
Tue, 2 Jul 2024 13:18:09 +0000 (18:48 +0530)
commit687d6bccb28238fcfa65f7c1badfdfeac498c428
tree0a41ead64a334ec564be27f016becfa8a2244b9b
parent967969cf594ed3c1678a9918d6e9bb2d1591cbe9
phy: zynqmp: Enable reference clock correctly

Lanes can use other lanes' reference clocks, as determined by refclk.
Use refclk to determine the clock to enable/disable instead of always
using the lane's own reference clock. This ensures the clock selected in
xpsgtr_configure_pll is the one enabled.

For the other half of the equation, always program REF_CLK_SEL even when
we are selecting the lane's own clock. This ensures that Linux's idea of
the reference clock matches the hardware. We use the "local" clock mux
for this instead of going through the ref clock network.

Fixes: 25d700833513 ("phy: xilinx: phy-zynqmp: dynamic clock support for power-save")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://lore.kernel.org/r/20240628205540.3098010-2-sean.anderson@linux.dev
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/xilinx/phy-zynqmp.c