]> www.infradead.org Git - users/dwmw2/linux.git/commit
clk: qcom: add clock controller driver for qca8386/qca8084
authorLuo Jie <quic_luoj@quicinc.com>
Wed, 5 Jun 2024 12:45:41 +0000 (20:45 +0800)
committerBjorn Andersson <andersson@kernel.org>
Thu, 13 Jun 2024 04:04:26 +0000 (23:04 -0500)
commit2441b965c4c7adae0b4a7825f7acb67d44c3cd38
treed183bf24dcd1ab17bec5aa392a56a6c2f12c76c5
parent9f93a0a428606341da25bf2a00244701b58e08b9
clk: qcom: add clock controller driver for qca8386/qca8084

The clock controller driver of qca8386/qca8084 is registered
as the MDIO device, the hardware register is accessed by MDIO bus
that is normally used to access general PHY device, which is
different from the current existed qcom clock controller drivers
using ioremap to access hardware clock registers, nsscc-qca8k is
accessed via an MDIO bus.

MDIO bus is commonly utilized by both qca8386/qca8084 and other
PHY devices, so the mutex lock mdio_bus->mdio_lock should be
used instead of using the mutex lock of remap.

To access the hardware clock registers of qca8386/qca8084, there
is a special MDIO frame sequence, which needs to be sent to the
device.

Enable the reference clock before resetting the clock controller,
the reference clock rate is fixed to 50MHZ.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
Link: https://lore.kernel.org/r/20240605124541.2711467-5-quic_luoj@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/Kconfig
drivers/clk/qcom/Makefile
drivers/clk/qcom/nsscc-qca8k.c [new file with mode: 0644]