phy: qcom: qmp-pcie: register second optional PHY AUX clock
authorNeil Armstrong <neil.armstrong@linaro.org>
Fri, 22 Mar 2024 09:42:40 +0000 (10:42 +0100)
committerVinod Koul <vkoul@kernel.org>
Fri, 5 Apr 2024 17:04:00 +0000 (22:34 +0530)
commit583ca9ccfa806605ae1391aafa3f78a8a2cc0b48
tree20d5292a9d7328abfe6031685ef51ba9bef79ecb
parent677b45114b4430a43d2602296617efc4d3f2ab7a
phy: qcom: qmp-pcie: register second optional PHY AUX clock

The PCIe Gen4x2 PHY found in the SM8[456]50 SoCs have a second clock,
add the code to register it for PHYs configs that sets a aux_clock_rate.

In order to get the right clock, add qmp_pcie_clk_hw_get() which uses
the newly introduced QMP_PCIE_PIPE_CLK & QMP_PCIE_PHY_AUX_CLK clock
IDs and also supports the legacy bindings by returning the PIPE clock
when #clock-cells=0.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240322-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v2-3-3ec0a966d52f@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c