Skip to content

Commit 2441b96

Browse files
Luo Jieandersson
authored andcommitted
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>
1 parent 9f93a0a commit 2441b96

3 files changed

Lines changed: 2231 additions & 0 deletions

File tree

drivers/clk/qcom/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,15 @@ config IPQ_GCC_9574
249249
i2c, USB, SD/eMMC, etc. Select this for the root clock
250250
of ipq9574.
251251

252+
config IPQ_NSSCC_QCA8K
253+
tristate "QCA8K(QCA8386 or QCA8084) NSS Clock Controller"
254+
depends on MDIO_BUS || COMPILE_TEST
255+
help
256+
Support for NSS(Network SubSystem) clock controller on
257+
qca8386/qca8084 chip.
258+
Say Y or M if you want to use network features of switch or
259+
PHY device. Select this for the root clock of qca8k.
260+
252261
config MSM_GCC_8660
253262
tristate "MSM8660 Global Clock Controller"
254263
depends on ARM || COMPILE_TEST

drivers/clk/qcom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o
3636
obj-$(CONFIG_IPQ_GCC_8074) += gcc-ipq8074.o
3737
obj-$(CONFIG_IPQ_GCC_9574) += gcc-ipq9574.o
3838
obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o
39+
obj-$(CONFIG_IPQ_NSSCC_QCA8K) += nsscc-qca8k.o
3940
obj-$(CONFIG_MDM_GCC_9607) += gcc-mdm9607.o
4041
obj-$(CONFIG_MDM_GCC_9615) += gcc-mdm9615.o
4142
obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o

0 commit comments

Comments
 (0)