Skip to contentSkip to conversation

dt-bindings: clock: Add YAML schemas for CAMCC clocks on SC7280

PATCH Applied Taniya Das 2 participants 4 messages Oct 7, 2021 – Oct 13, 2021

Subsystems (4)
lore
Share & tools
lore
author
#1 lore raw

PATCH 2/2 clk: qcom: camcc: Add camera clock controller driver for SC7280

In reply to Taniya Das

Add support for the camera clock controller found on SC7280 based devices.
This would allow camera drivers to probe and control their clocks.

---
 drivers/clk/qcom/Kconfig        |    9 +
 drivers/clk/qcom/Makefile       |    1 +
 drivers/clk/qcom/camcc-sc7280.c | 2484 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 2494 insertions(+)
 create mode 100644 drivers/clk/qcom/camcc-sc7280.c
drivers/clk/qcom/Kconfig +9 -0
index 622cde4..20a4bdb 100644
@@ -340,6 +340,15 @@ config SC_CAMCC_7180
 	  Say Y if you want to support camera devices and functionality such as
 	  capturing pictures.
 
+config SC_CAMCC_7280
+	tristate "SC7280 Camera Clock Controller"
+	select SC_GCC_7280
+	help
+	  Support for the camera clock controller on Qualcomm Technologies, Inc
+	  SC7280 devices.
+	  Say Y if you want to support camera devices and functionality such as
+	  capturing pictures.
+
 config SC_DISPCC_7180
 	tristate "SC7180 Display Clock Controller"
 	select SC_GCC_7180
drivers/clk/qcom/Makefile +1 -0
index 8b9b01e..9176bee 100644
@@ -58,6 +58,7 @@ obj-$(CONFIG_QCS_GCC_404) += gcc-qcs404.o
 obj-$(CONFIG_QCS_Q6SSTOP_404) += q6sstop-qcs404.o
 obj-$(CONFIG_QCS_TURING_404) += turingcc-qcs404.o
 obj-$(CONFIG_SC_CAMCC_7180) += camcc-sc7180.o
+obj-$(CONFIG_SC_CAMCC_7280) += camcc-sc7280.o
 obj-$(CONFIG_SC_DISPCC_7180) += dispcc-sc7180.o
 obj-$(CONFIG_SC_DISPCC_7280) += dispcc-sc7280.o
 obj-$(CONFIG_SC_GCC_7180) += gcc-sc7180.o
drivers/clk/qcom/camcc-sc7280.c new file +2484 -0

2,484 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.

Taniya Das

author
#0 lore raw

PATCH 1/2 dt-bindings: clock: Add YAML schemas for CAMCC clocks on SC7280

The camera clock controller clock provider have a bunch of generic properties that are needed in a device tree. Add the CAMCC clock IDs for camera client to request for the clocks.

---
 .../bindings/clock/qcom,sc7280-camcc.yaml          |  71 ++++++++++++
 include/dt-bindings/clock/qcom,camcc-sc7280.h      | 127 +++++++++++++++++++++
 2 files changed, 198 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7280-camcc.yaml
 create mode 100644 include/dt-bindings/clock/qcom,camcc-sc7280.h
Documentation/devicetree/bindings/clock/qcom,sc7280-camcc.yaml new file +71 -0
new file mode 100644
index 0000000..f27ca6f
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,sc7280-camcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Camera Clock & Reset Controller Binding for SC7280
+
+maintainers:
+  - Taniya Das <[email protected]>
+
+description: |
+  Qualcomm camera clock control module which supports the clocks, resets and
+  power domains on SC7280.
+
+  See also dt-bindings/clock/qcom,camcc-sc7280.h
+
+properties:
+  compatible:
+    const: qcom,sc7280-camcc
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: Board XO active source
+      - description: Sleep clock source
+
+  clock-names:
+    items:
+      - const: bi_tcxo
+      - const: bi_tcxo_ao
+      - const: sleep_clk
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+  '#power-domain-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - '#clock-cells'
+  - '#reset-cells'
+  - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    clock-controller@ad00000 {
+      compatible = "qcom,sc7280-camcc";
+      reg = <0x0ad00000 0x10000>;
+      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,camcc-sc7280.h new file +127 -0

127 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
#3 lore raw

Quoting Taniya Das (2021-10-06 17:43:44)

Quoted 6 lines

The camera clock controller clock provider have a bunch of generic properties that are needed in a device tree. Add the CAMCC clock IDs for camera client to request for the clocks.

---

Applied to clk-next

maintainer Applied
#2 lore raw

Re: [PATCH v1 2/2] clk: qcom: camcc: Add camera clock controller driver for SC7280

In reply to Taniya Das

Quoting Taniya Das (2021-10-06 17:43:45)

Quoted 6 lines

Add support for the camera clock controller found on SC7280 based devices.
This would allow camera drivers to probe and control their clocks.

---

Applied to clk-next