Skip to contentSkip to conversation

Add Global Clock controller (GCC) driver for SC7280

PATCH Applied Taniya Das 2 participants 5 messages Feb 10, 2021 – Feb 13, 2021

Subsystems (4)
lore
Share & tools
lore

Taniya Das

author
#0 lore raw

v2 cover Add Global Clock controller (GCC) driver for SC7280

Add driver support for Global Clock controller for SC7280 and also update device tree bindings for the various clocks supported in the clock controller.

[v2]
* Add UFS phy rx/tx symbol clocks in bindings.
* Remove protected-clocks node & description.
* Add support for extra clocks for QSPI/WPSS/MSS/LPASS/PCIE clocks.
* Update the floor rcg ops for SDCC/QSPI clock.
* Add comment for cpuss critical clocks.

[v1]
* Documentation binding for GCC clock for SC7280.
* GCC clock driver for SC7280.

Taniya Das (2):
dt-bindings: clock: Add SC7280 GCC clock binding
clk: qcom: Add Global Clock controller (GCC) driver for SC7280

 .../devicetree/bindings/clock/qcom,gcc-sc7280.yaml |   92 +
 drivers/clk/qcom/Kconfig                           |    9 +
 drivers/clk/qcom/Makefile                          |    1 +
 drivers/clk/qcom/gcc-sc7280.c                      | 3603 ++++++++++++++++++++
 include/dt-bindings/clock/qcom,gcc-sc7280.h        |  226 ++
 5 files changed, 3931 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml
 create mode 100644 drivers/clk/qcom/gcc-sc7280.c
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sc7280.h

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

author
#1 lore raw

PATCH v2 1/2 dt-bindings: clock: Add SC7280 GCC clock binding

Add device tree bindings for global clock subsystem clock controller for Qualcomm Technology Inc's SC7280 SoCs.

---
 .../devicetree/bindings/clock/qcom,gcc-sc7280.yaml |  92 +++++++++
 include/dt-bindings/clock/qcom,gcc-sc7280.h        | 226 +++++++++++++++++++++
 2 files changed, 318 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sc7280.h
Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml new file +92 -0
new file mode 100644
index 0000000..5693b899
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,gcc-sc7280.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller Binding for SC7280
+
+maintainers:
+  - Taniya Das <[email protected]>
+
+description: |
+  Qualcomm global clock control module which supports the clocks, resets and
+  power domains on SC7280.
+
+  See also:
+  - dt-bindings/clock/qcom,gcc-sc7280.h
+
+properties:
+  compatible:
+    const: qcom,gcc-sc7280
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: Board active XO source
+      - description: Sleep clock source
+      - description: PCIE-0 pipe clock source
+      - description: PCIE-1 pipe clock source
+      - description: USF phy rx symbol 0 clock source
+      - description: USF phy rx symbol 1 clock source
+      - description: USF phy tx symbol 0 clock source
+      - description: USB30 phy wrapper pipe clock source
+
+  clock-names:
+    items:
+      - const: bi_tcxo
+      - const: bi_tcxo_ao
+      - const: sleep_clk
+      - const: pcie_0_pipe_clk
+      - const: pcie_1_pipe_clk
+      - const: ufs_phy_rx_symbol_0_clk
+      - const: ufs_phy_rx_symbol_1_clk
+      - const: ufs_phy_tx_symbol_0_clk
+      - const: usb3_phy_wrapper_gcc_usb30_pipe_clk
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+  '#power-domain-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - reg
+  - '#clock-cells'
+  - '#reset-cells'
+  - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    clock-controller@100000 {
+      compatible = "qcom,gcc-sc7280";
+      reg = <0x00100000 0x1f0000>;
+      clocks = <&rpmhcc RPMH_CXO_CLK>,
+               <&rpmhcc RPMH_CXO_CLK_A>,
+               <&sleep_clk>,
+               <&pcie_0_pipe_clk>, <&pcie_1_pipe_clk>,
+               <&ufs_phy_rx_symbol_0_clk>, <&ufs_phy_rx_symbol_1_clk>,
+               <&ufs_phy_tx_symbol_0_clk>,
+               <&usb3_phy_wrapper_gcc_usb30_pipe_clk>;
+
+      clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk", "pcie_0_pipe_clk",
+                     "pcie_1_pipe_clk", "ufs_phy_rx_symbol_0_clk",
+                     "ufs_phy_rx_symbol_1_clk", "ufs_phy_tx_symbol_0_clk",
+                     "usb3_phy_wrapper_gcc_usb30_pipe_clk";
+      #clock-cells = <1>;
+      #reset-cells = <1>;
+      #power-domain-cells = <1>;
+    };
+...
include/dt-bindings/clock/qcom,gcc-sc7280.h new file +226 -0

226 lines not on this page · raw message

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

maintainer Applied
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: clock: Add SC7280 GCC clock binding

Quoting Taniya Das (2021-02-10 10:26:18)

Quoted 5 lines

Add device tree bindings for global clock subsystem clock controller for Qualcomm Technology Inc's SC7280 SoCs.

---

Applied to clk-next

author
#3 lore raw

PATCH v2 2/2 clk: qcom: Add Global Clock controller (GCC) driver for SC7280

In reply to Taniya Das

Add support for the global clock controller found on SC7280 based devices. This should allow most non-multimedia device drivers to probe and control their clocks.

---
 drivers/clk/qcom/Kconfig      |    9 +
 drivers/clk/qcom/Makefile     |    1 +
 drivers/clk/qcom/gcc-sc7280.c | 3603 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 3613 insertions(+)
 create mode 100644 drivers/clk/qcom/gcc-sc7280.c
drivers/clk/qcom/Kconfig +9 -0
index d32bb12..7992ed9 100644
@@ -317,6 +317,15 @@ config SC_GCC_7180
 	  Say Y if you want to use peripheral devices such as UART, SPI,
 	  I2C, USB, UFS, SDCC, etc.
 
+config SC_GCC_7280
+	tristate "SC7280 Global Clock Controller"
+	select QCOM_GDSC
+	depends on COMMON_CLK_QCOM
+	help
+	  Support for the global clock controller on SC7280 devices.
+	  Say Y if you want to use peripheral devices such as UART, SPI,
+	  I2C, USB, UFS, SDCC, PCIe etc.
+
 config SC_LPASS_CORECC_7180
 	tristate "SC7180 LPASS Core Clock Controller"
 	select SC_GCC_7180
drivers/clk/qcom/Makefile +1 -0
index 9e5e0e3..db62d40 100644
@@ -55,6 +55,7 @@ obj-$(CONFIG_QCS_TURING_404) += turingcc-qcs404.o
 obj-$(CONFIG_SC_CAMCC_7180) += camcc-sc7180.o
 obj-$(CONFIG_SC_DISPCC_7180) += dispcc-sc7180.o
 obj-$(CONFIG_SC_GCC_7180) += gcc-sc7180.o
+obj-$(CONFIG_SC_GCC_7280) += gcc-sc7280.o
 obj-$(CONFIG_SC_GPUCC_7180) += gpucc-sc7180.o
 obj-$(CONFIG_SC_LPASS_CORECC_7180) += lpasscorecc-sc7180.o
 obj-$(CONFIG_SC_MSS_7180) += mss-sc7180.o
drivers/clk/qcom/gcc-sc7280.c new file +3603 -0

2,978 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

Part of the diff is not shown here. View the raw message.

maintainer Applied
#4 lore raw

Re: [PATCH v2 2/2] clk: qcom: Add Global Clock controller (GCC) driver for SC7280

Quoting Taniya Das (2021-02-10 10:26:19)

Quoted 6 lines

Add support for the global clock controller found on SC7280 based devices. This should allow most non-multimedia device drivers to probe and control their clocks.

---

Applied to clk-next