Skip to contentSkip to conversation

SM8350 VIDEOCC

PATCH Applied Konrad Dybcio 3 participants 5 messages Apr 20, 2023 – May 25, 2023

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

v4 cover SM8350 VIDEOCC

v3 -> v4:
- pick up rb
- include qcom,gcc.yaml in the binding

v3: https://lore.kernel.org/r/[email protected]

v2 -> v3:
- Use a consistent VIDEO_CC_ prefix for resets
- Separate out the binding (and don't pick up the rb as a consequence)
- drop all pm_clks code

v2: https://lore.kernel.org/r/[email protected]

v1 -> v2:
- "){" -> ") {"
- subsys_initcall -> module_platform_driver
- constify lucid_5lpe_vco & .hw.init
- devm_add_action_or_reset -> devm_pm_runtime_enable

v1: https://lore.kernel.org/r/[email protected]

This serires brings support for SM8350 videocc and updates the related dt-bindings.

---
Konrad Dybcio (2):
dt-bindings: clock: Add SM8350 VIDEOCC
clk: qcom: Introduce SM8350 VIDEOCC

 .../bindings/clock/qcom,sm8350-videocc.yaml        |  68 +++
 drivers/clk/qcom/Kconfig                           |   9 +
 drivers/clk/qcom/Makefile                          |   1 +
 drivers/clk/qcom/videocc-sm8350.c                  | 552 +++++++++++++++++++++
 include/dt-bindings/clock/qcom,sm8350-videocc.h    |  35 ++
 include/dt-bindings/reset/qcom,sm8350-videocc.h    |  18 +
 6 files changed, 683 insertions(+)

---
base-commit: 67d5d9f013d6c3829383c08162939cabff14fccc
change-id: 20230413-topic-lahaina_vidcc-bcdabb475542

Best regards,

Signature · 1 line
Konrad Dybcio <[email protected]>
#1 lore raw

PATCH v4 1/2 dt-bindings: clock: Add SM8350 VIDEOCC

SM8350, like most recent higher-end chips has a separate clock controller block just for the Venus IP. Document it.

The binding was separated as the driver, unlike the earlier ones, doesn't expect clock-names to keep it easier to maintain.

---
 .../bindings/clock/qcom,sm8350-videocc.yaml        | 68 ++++++++++++++++++++++
 include/dt-bindings/clock/qcom,sm8350-videocc.h    | 35 +++++++++++
 include/dt-bindings/reset/qcom,sm8350-videocc.h    | 18 ++++++
 3 files changed, 121 insertions(+)
Documentation/devicetree/bindings/clock/qcom,sm8350-videocc.yaml new file +68 -0
new file mode 100644
index 000000000000..23505c8c3dbd
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,sm8350-videocc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM8350 Video Clock & Reset Controller
+
+maintainers:
+  - Konrad Dybcio <[email protected]>
+
+description: |
+  Qualcomm video clock control module provides the clocks, resets and power
+  domains on Qualcomm SoCs.
+
+  See also::
+    include/dt-bindings/clock/qcom,videocc-sm8350.h
+    include/dt-bindings/reset/qcom,videocc-sm8350.h
+
+properties:
+  compatible:
+    const: qcom,sm8350-videocc
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: Board active XO source
+      - description: Board sleep clock
+
+  power-domains:
+    description:
+      A phandle and PM domain specifier for the MMCX power domain.
+    maxItems: 1
+
+  required-opps:
+    description:
+      A phandle to an OPP node describing required MMCX performance point.
+    maxItems: 1
+
+required:
+  - compatible
+  - clocks
+  - power-domains
+  - required-opps
+
+allOf:
+  - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    #include <dt-bindings/power/qcom-rpmpd.h>
+
+    clock-controller@abf0000 {
+      compatible = "qcom,sm8350-videocc";
+      reg = <0x0abf0000 0x10000>;
+      clocks = <&rpmhcc RPMH_CXO_CLK>,
+               <&rpmhcc RPMH_CXO_CLK_A>,
+               <&sleep_clk>;
+      power-domains = <&rpmhpd SM8350_MMCX>;
+      required-opps = <&rpmhpd_opp_low_svs>;
+      #clock-cells = <1>;
+      #reset-cells = <1>;
+      #power-domain-cells = <1>;
+    };
+...
include/dt-bindings/clock/qcom,sm8350-videocc.h new file +35 -0
new file mode 100644
index 000000000000..b6945a448676
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_VIDEO_CC_SM8350_H
+#define _DT_BINDINGS_CLK_QCOM_VIDEO_CC_SM8350_H
+
+/* Clocks */
+#define VIDEO_CC_AHB_CLK_SRC					0
+#define VIDEO_CC_MVS0_CLK					1
+#define VIDEO_CC_MVS0_CLK_SRC					2
+#define VIDEO_CC_MVS0_DIV_CLK_SRC				3
+#define VIDEO_CC_MVS0C_CLK					4
+#define VIDEO_CC_MVS0C_DIV2_DIV_CLK_SRC				5
+#define VIDEO_CC_MVS1_CLK					6
+#define VIDEO_CC_MVS1_CLK_SRC					7
+#define VIDEO_CC_MVS1_DIV2_CLK					8
+#define VIDEO_CC_MVS1_DIV_CLK_SRC				9
+#define VIDEO_CC_MVS1C_CLK					10
+#define VIDEO_CC_MVS1C_DIV2_DIV_CLK_SRC				11
+#define VIDEO_CC_SLEEP_CLK					12
+#define VIDEO_CC_SLEEP_CLK_SRC					13
+#define VIDEO_CC_XO_CLK_SRC					14
+#define VIDEO_PLL0						15
+#define VIDEO_PLL1						16
+
+/* GDSCs */
+#define MVS0C_GDSC						0
+#define MVS1C_GDSC						1
+#define MVS0_GDSC						2
+#define MVS1_GDSC						3
+
+#endif
include/dt-bindings/reset/qcom,sm8350-videocc.h new file +18 -0
new file mode 100644
index 000000000000..cd356b207a4a
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef _DT_BINDINGS_RESET_QCOM_VIDEO_CC_SM8350_H
+#define _DT_BINDINGS_RESET_QCOM_VIDEO_CC_SM8350_H
+
+#define VIDEO_CC_CVP_INTERFACE_BCR				0
+#define VIDEO_CC_CVP_MVS0_BCR					1
+#define VIDEO_CC_MVS0C_CLK_ARES					2
+#define VIDEO_CC_CVP_MVS0C_BCR					3
+#define VIDEO_CC_CVP_MVS1_BCR					4
+#define VIDEO_CC_MVS1C_CLK_ARES					5
+#define VIDEO_CC_CVP_MVS1C_BCR					6
+
+#endif
Signature · 1 line
2.40.0
Reviewed-by on v4 1/2
#2 lore raw

Re: [PATCH v4 1/2] dt-bindings: clock: Add SM8350 VIDEOCC

Quoted 8 lines · Konrad Dybcio

SM8350, like most recent higher-end chips has a separate clock controller block just for the Venus IP. Document it.

The binding was separated as the driver, unlike the earlier ones, doesn't expect clock-names to keep it easier to maintain.

---

Best regards,
Krzysztof

#3 lore raw

PATCH v4 2/2 clk: qcom: Introduce SM8350 VIDEOCC

In reply to Konrad Dybcio

Add support for the Video Clock Controller found on the SM8350 SoC.

---
 drivers/clk/qcom/Kconfig          |   9 +
 drivers/clk/qcom/Makefile         |   1 +
 drivers/clk/qcom/videocc-sm8350.c | 552 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 562 insertions(+)
drivers/clk/qcom/Kconfig +9 -0
index 12be3e2371b3..32e1302d86ab 100644
@@ -925,6 +925,15 @@ config SM_VIDEOCC_8250
 	  Say Y if you want to support video devices and functionality such as
 	  video encode and decode.
 
+config SM_VIDEOCC_8350
+	tristate "SM8350 Video Clock Controller"
+	select SM_GCC_8350
+	select QCOM_GDSC
+	help
+	  Support for the video clock controller on SM8350 devices.
+	  Say Y if you want to support video devices and functionality such as
+	  video encode and decode.
+
 config SPMI_PMIC_CLKDIV
 	tristate "SPMI PMIC clkdiv Support"
 	depends on SPMI || COMPILE_TEST
drivers/clk/qcom/Makefile +1 -0
index 9ff4c373ad95..79405b19b85d 100644
@@ -127,6 +127,7 @@ obj-$(CONFIG_SM_GPUCC_8350) += gpucc-sm8350.o
 obj-$(CONFIG_SM_TCSRCC_8550) += tcsrcc-sm8550.o
 obj-$(CONFIG_SM_VIDEOCC_8150) += videocc-sm8150.o
 obj-$(CONFIG_SM_VIDEOCC_8250) += videocc-sm8250.o
+obj-$(CONFIG_SM_VIDEOCC_8350) += videocc-sm8350.o
 obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o
 obj-$(CONFIG_KPSS_XCC) += kpss-xcc.o
 obj-$(CONFIG_QCOM_HFPLL) += hfpll.o
drivers/clk/qcom/videocc-sm8350.c new file +552 -0

552 lines not on this page · raw message

Signature · 1 line
2.40.0
maintainer Applied
#4 lore raw
In reply to Konrad Dybcio
Quoted 4 lines · Konrad Dybcio

v3 -> v4:
- pick up rb
- include qcom,gcc.yaml in the binding

Quoted 8 lines

v3: https://lore.kernel.org/r/[email protected]

v2 -> v3:
- Use a consistent VIDEO_CC_ prefix for resets
- Separate out the binding (and don't pick up the rb as a consequence)
- drop all pm_clks code

[...]

Applied, thanks!

[1/2] dt-bindings: clock: Add SM8350 VIDEOCC

      commit: 2aae5eaa941e356b5f6e78c207c7dc3a93286622
[2/2] clk: qcom: Introduce SM8350 VIDEOCC
      commit: fd0b5b106fcab4b1127c72eb818e0e24f0447fc7

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>