Commit 2441b965 authored by Luo Jie's avatar Luo Jie Committed by Bjorn Andersson
Browse files

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: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarLuo Jie <quic_luoj@quicinc.com>
Link: https://lore.kernel.org/r/20240605124541.2711467-5-quic_luoj@quicinc.com


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 9f93a0a4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -249,6 +249,15 @@ config IPQ_GCC_9574
	  i2c, USB, SD/eMMC, etc. Select this for the root clock
	  of ipq9574.

config IPQ_NSSCC_QCA8K
	tristate "QCA8K(QCA8386 or QCA8084) NSS Clock Controller"
	depends on MDIO_BUS || COMPILE_TEST
	help
	  Support for NSS(Network SubSystem) clock controller on
	  qca8386/qca8084 chip.
	  Say Y or M if you want to use network features of switch or
	  PHY device. Select this for the root clock of qca8k.

config MSM_GCC_8660
	tristate "MSM8660 Global Clock Controller"
	depends on ARM || COMPILE_TEST
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o
obj-$(CONFIG_IPQ_GCC_8074) += gcc-ipq8074.o
obj-$(CONFIG_IPQ_GCC_9574) += gcc-ipq9574.o
obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o
obj-$(CONFIG_IPQ_NSSCC_QCA8K) += nsscc-qca8k.o
obj-$(CONFIG_MDM_GCC_9607) += gcc-mdm9607.o
obj-$(CONFIG_MDM_GCC_9615) += gcc-mdm9615.o
obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o
+2221 −0

File added.

Preview size limit exceeded, changes collapsed.