clk: qcom: Add support for IPQ8064's global clock controller (GCC)
Subsystems (5)
PATCH 1/1 clk: qcom: Add support for IPQ8064's global clock controller (GCC)
Add a driver for the global clock controller found on IPQ8064 based platforms. This should allow most non-multimedia device drivers to probe and control their clocks.
This is currently missing clocks for SATA, USB, audio and networking devices.
---
This patch is based on Stephen's qcom common clk init conslidation patch
.../devicetree/bindings/clock/qcom,gcc.txt | 1 + drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gcc-ipq806x.c | 1957 ++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-ipq806x.h | 297 +++ include/dt-bindings/reset/qcom,gcc-ipq806x.h | 124 ++ 6 files changed, 2388 insertions(+) create mode 100644 drivers/clk/qcom/gcc-ipq806x.c create mode 100644 include/dt-bindings/clock/qcom,gcc-ipq806x.h create mode 100644 include/dt-bindings/reset/qcom,gcc-ipq806x.h
Documentation/devicetree/bindings/clock/qcom,gcc.txt +1 -0
@@ -4,6 +4,7 @@ Qualcomm Global Clock & Reset Controller Binding Required properties : - compatible : shall contain only one of the following: + "qcom,gcc-ipq8064" "qcom,gcc-msm8660" "qcom,gcc-msm8960" "qcom,gcc-msm8974"
drivers/clk/qcom/Kconfig +8 -0
@@ -4,6 +4,14 @@ config COMMON_CLK_QCOM select REGMAP_MMIO select RESET_CONTROLLER +config MSM_GCC_806X + tristate "IPQ806x Global Clock Controller" + depends on COMMON_CLK_QCOM + help + Support for the global clock controller on ipq806x devices. + Say Y if you want to use peripheral devices such as UART, SPI, + i2c, USB, SD/eMMC, etc. + config MSM_GCC_8660 tristate "MSM8660 Global Clock Controller" depends on COMMON_CLK_QCOM
drivers/clk/qcom/Makefile +1 -0
@@ -8,6 +8,7 @@ clk-qcom-y += clk-rcg2.o clk-qcom-y += clk-branch.o clk-qcom-y += reset.o +obj-$(CONFIG_MSM_GCC_806X) += gcc-ipq806x.o obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o obj-$(CONFIG_MSM_GCC_8960) += gcc-msm8960.o obj-$(CONFIG_MSM_GCC_8974) += gcc-msm8974.o
drivers/clk/qcom/gcc-ipq806x.c new file +1957 -0
1,957 lines not on this page · raw message
include/dt-bindings/clock/qcom,gcc-ipq806x.h new file +297 -0
297 lines not on this page · raw message
include/dt-bindings/reset/qcom,gcc-ipq806x.h new file +124 -0
124 lines not on this page · raw message
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
Quoted 7 lines · Kumar Gala
Add a driver for the global clock controller found on IPQ8064 based platforms. This should allow most non-multimedia device drivers to probe and control their clocks.
This is currently missing clocks for SATA, USB, audio and networking devices.
There shouldn't be any audio clocks in GCC.
Quoted 17 lines
Documentation/devicetree/bindings/clock/qcom,gcc.txt +1
-0@@ -4,6 +4,7 @@ Qualcomm Global Clock & Reset Controller Binding Required properties : - compatible : shall contain only one of the following: + "qcom,gcc-ipq8064" "qcom,gcc-msm8660" "qcom,gcc-msm8960" "qcom,gcc-msm8974"drivers/clk/qcom/Kconfig +0
-0
drivers/clk/qcom/Kconfig config COMMON_CLK_QCOM · line 7
Quoted 4 lines
drivers/clk/qcom/Kconfig +1
-0@@ -4,6 +4,14 @@ config COMMON_CLK_QCOM select REGMAP_MMIO select RESET_CONTROLLER +config MSM_GCC_806X
It would be better to say IPQ_GCC_806X here instead of MSM.
Quoted 13 lines
drivers/clk/qcom/Kconfig +7
-0+ tristate "IPQ806x Global Clock Controller" + depends on COMMON_CLK_QCOM + help + Support for the global clock controller on ipq806x devices. + Say Y if you want to use peripheral devices such as UART, SPI, + i2c, USB, SD/eMMC, etc. +drivers/clk/qcom/gcc-ipq806x.c new file +0
-0
[...]
drivers/clk/qcom/gcc-ipq806x.c line 1920
Quoted 11 lines
drivers/clk/qcom/gcc-ipq806x.c new file +11
-0+static int gcc_ipq806x_probe (struct platform_device *pdev) +{ +struct clk *clk; +struct device *dev = &pdev->dev; + +/* Temporary until RPM clocks supported */ + clk =clk_register_fixed_rate (dev,"cxo" ,NULL ,CLK_IS_ROOT ,19200000 ); +if (IS_ERR (clk)) +return PTR_ERR (clk); + + clk =clk_register_fixed_rate (dev,"pxo" ,NULL ,CLK_IS_ROOT ,27000000 );
I thought PXO was 25MHz. Is there even a CXO present? It may just be PXO.
include/dt-bindings/clock/qcom,gcc-ipq806x.h
Quoted 5 lines
include/dt-bindings/clock/qcom,gcc-ipq806x.h new file +0
-0
One thing I've been considering is moving the reset defines into the same dt-binding include as the clocks. That way we cut down on the number of files that are all related to the same thing. What do you think?
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation