Skip to contentSkip to conversation

v2 [PATCH 0/2] Add Global Clock Controller (GCC) driver for SM7250

PATCH In review Sreeshankar K 2 participants 4 messages Aug 16 – Aug 17

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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

Sreeshankar K (2):
clk: qcom: Add Global Clock Controller (GCC) driver for SM7250
dt-bindings: clock: Add GCC clock bindings for SM7250

 .../bindings/clock/qcom,gcc-sm7250.yaml       |   60 +
 drivers/clk/qcom/Kconfig                      |    9 +
 drivers/clk/qcom/Makefile                     |    1 +
 drivers/clk/qcom/gcc-sm7250.c                 | 2347 +++++++++++++++++
 include/dt-bindings/clock/qcom,gcc-sm7250.h   |  163 ++
 5 files changed, 2580 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-sm7250.yaml
 create mode 100644 drivers/clk/qcom/gcc-sm7250.c
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sm7250.h
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 clk: qcom: Add Global Clock Controller (GCC) driver for SM7250

Add support for the global clock controller found on SM7250 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-sm7250.c | 2347 +++++++++++++++++++++++++++++++++
 3 files changed, 2357 insertions(+)
 create mode 100644 drivers/clk/qcom/gcc-sm7250.c
drivers/clk/qcom/Kconfig +9 -0
index 7d84c2f1d..532d8f002 100644
@@ -1416,6 +1416,15 @@ config SM_GCC_7150
 	  Say Y if you want to use peripheral devices such as UART,
 	  SPI, I2C, USB, SD/UFS, PCIe etc.
 
+config SM_GCC_7250
+	tristate "SM7250 Global Clock Controller"
+	depends on ARM64 || COMPILE_TEST
+	select QCOM_GDSC
+	help
+	  Support for the global clock controller on SM7250 devices.
+	  Say Y if you want to use peripheral devices such as UART,
+	  SPI, I2C, USB, SD/UFS etc.
+
 config SM_GCC_MILOS
 	tristate "Milos Global Clock Controller"
 	depends on ARM64 || COMPILE_TEST
drivers/clk/qcom/Makefile +1 -0
index 58f9a5eb6..18414089c 100644
@@ -174,6 +174,7 @@ obj-$(CONFIG_SM_GCC_6125) += gcc-sm6125.o
 obj-$(CONFIG_SM_GCC_6350) += gcc-sm6350.o
 obj-$(CONFIG_SM_GCC_6375) += gcc-sm6375.o
 obj-$(CONFIG_SM_GCC_7150) += gcc-sm7150.o
+obj-$(CONFIG_SM_GCC_7250) += gcc-sm7250.o
 obj-$(CONFIG_SM_GCC_8150) += gcc-sm8150.o
 obj-$(CONFIG_SM_GCC_8250) += gcc-sm8250.o
 obj-$(CONFIG_SM_GCC_8350) += gcc-sm8350.o
drivers/clk/qcom/gcc-sm7250.c new file +2347 -0

2,347 lines not on this page · raw message

Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/2 dt-bindings: clock: Add GCC clock bindings for SM7250

In reply to Sreeshankar K

Add device tree bindings for global clock controller on SM7250 SoC.

---
 .../bindings/clock/qcom,gcc-sm7250.yaml       |  60 +++++++
 include/dt-bindings/clock/qcom,gcc-sm7250.h   | 163 ++++++++++++++++++
 2 files changed, 223 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-sm7250.yaml
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sm7250.h
Documentation/devicetree/bindings/clock/qcom,gcc-sm7250.yaml new file +60 -0
new file mode 100644
index 000000000..822df7dc1
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,gcc-sm7250.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller on SM7250
+
+maintainers:
+  - Bjorn Andersson <[email protected]>
+  - Sreeshankar K <[email protected]>
+
+description: |
+  Qualcomm global clock control module provides the clocks, resets and power
+  domains on SM7250.
+
+  See also: include/dt-bindings/clock/qcom,gcc-sm7250.h
+
+properties:
+  compatible:
+    const: qcom,gcc-sm7250
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: Board active XO source
+      - description: Sleep clock source
+
+  clock-names:
+    items:
+      - const: bi_tcxo
+      - const: bi_tcxo_ao
+      - const: sleep_clk
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - '#power-domain-cells'
+
+allOf:
+  - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    clock-controller@100000 {
+      compatible = "qcom,gcc-sm7250";
+      reg = <0x00100000 0x1f0000>;
+      clocks = <&rpmhcc RPMH_CXO_CLK>,
+               <&rpmhcc RPMH_CXO_CLK_A>,
+               <&sleep_clk>;
+      clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
+      #clock-cells = <1>;
+      #reset-cells = <1>;
+      #power-domain-cells = <1>;
+    };
+...
include/dt-bindings/clock/qcom,gcc-sm7250.h new file +163 -0

163 lines not on this page · raw message

Signature · 1 line
2.43.0
#3 lore raw

Re: [PATCH 2/2] dt-bindings: clock: Add GCC clock bindings for SM7250

Quoted 3 lines · Sreeshankar K

Add device tree bindings for global clock controller on SM7250 SoC.

Please start using b4. Does this work:

b4 diff '<[email protected]>'

? No.

Quoted 30 lines
---
 .../bindings/clock/qcom,gcc-sm7250.yaml       |  60 +++++++
 include/dt-bindings/clock/qcom,gcc-sm7250.h   | 163 ++++++++++++++++++
 2 files changed, 223 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-sm7250.yaml
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sm7250.h
Documentation/devicetree/bindings/clock/qcom,gcc-sm7250.yaml new file +17 -0
new file mode 100644
index 000000000..822df7dc1
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,gcc-sm7250.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller on SM7250
+
+maintainers:
+  - Bjorn Andersson <[email protected]>
+  - Sreeshankar K <[email protected]>
+
+description: |
+  Qualcomm global clock control module provides the clocks, resets and power
+  domains on SM7250.
+
+  See also: include/dt-bindings/clock/qcom,gcc-sm7250.h

Documentation/devicetree/bindings/clock/qcom,gcc-sm7250.yaml line 27

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,gcc-sm7250.yaml new file +10 -0
+
+properties:
+  compatible:
+    const: qcom,gcc-sm7250
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: Board active XO source
+      - description: Sleep clock source

Why this cannot go to sm7150 or sm6375 files?

Best regards,
Krzysztof