Add QCOM video clock controller driver
v2 cover Add QCOM video clock controller driver
Changes in v2:
https://lkml.org/lkml/2018/5/8/918
- Added #defines for resets in the header file.
Changes in v1:
https://lkml.org/lkml/2018/4/24/545
Addressed below review comments given by Rob
- Change the compatible property as per '<vendor>,<soc>-<block>' format.
- Add header definitions for resets and power-domain cells.
This patch series adds a driver and device tree documentation binding for the video clock controller on some Qualcomm Technologies, Inc, SoCs such as SDM845. This would allow video drivers to probe and control their clocks.
The video clock driver depends upon the RPMh driver[1], command DB driver[2], RPMh clock driver[3], rcg2 shared ops[4] and GCC clock driver[5] changes which are undergoing review.
[1]: https://lkml.org/lkml/2018/4/19/914
[2]: https://lkml.org/lkml/2018/4/5/451
[3]: https://lkml.org/lkml/2018/4/24/390
[4]: https://lkml.org/lkml/2018/4/18/367
[5]: https://lkml.org/lkml/2018/4/30/533
[v1]: https://lkml.org/lkml/2018/5/3/386
Amit Nischal (2):
dt-bindings: clock: Introduce QCOM Video clock bindings
clk: qcom: Add video clock controller driver for SDM845
.../devicetree/bindings/clock/qcom,videocc.txt | 19 ++ drivers/clk/qcom/Kconfig | 11 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/videocc-sdm845.c | 358 +++++++++++++++++++++ include/dt-bindings/clock/qcom,videocc-sdm845.h | 35 ++ 5 files changed, 424 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,videocc.txt create mode 100644 drivers/clk/qcom/videocc-sdm845.c create mode 100644 include/dt-bindings/clock/qcom,videocc-sdm845.h
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH v2 1/2 dt-bindings: clock: Introduce QCOM Video clock bindings
Add device tree bindings for video clock controller for Qualcomm Technology Inc's SoCs.
--- .../devicetree/bindings/clock/qcom,videocc.txt | 19 ++++++++++++ include/dt-bindings/clock/qcom,videocc-sdm845.h | 35 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,videocc.txt create mode 100644 include/dt-bindings/clock/qcom,videocc-sdm845.h
Documentation/devicetree/bindings/clock/qcom,videocc.txt new file +19 -0
@@ -0,0 +1,19 @@ +Qualcomm Video Clock & Reset Controller Binding +----------------------------------------------- + +Required properties : +- compatible : shall contain "qcom,sdm845-videocc" +- reg : shall contain base register location and length +- #clock-cells : from common clock binding, shall contain 1. +- #power-domain-cells : from generic power domain binding, shall contain 1. + +Optional properties : +- #reset-cells : from common reset binding, shall contain 1. + +Example: + videocc: clock-controller@ab00000 { + compatible = "qcom,sdm845-videocc"; + reg = <0xab00000 0x10000>; + #clock-cells = <1>; + #power-domain-cells = <1>; + };
include/dt-bindings/clock/qcom,videocc-sdm845.h new file +35 -0
@@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (c) 2018, The Linux Foundation. All rights reserved. +*/ + +#ifndef _DT_BINDINGS_CLK_SDM_VIDEO_CC_SDM845_H +#define _DT_BINDINGS_CLK_SDM_VIDEO_CC_SDM845_H + +/* VIDEO_CC clock registers */ +#define VIDEO_CC_APB_CLK 0 +#define VIDEO_CC_AT_CLK 1 +#define VIDEO_CC_QDSS_TRIG_CLK 2 +#define VIDEO_CC_QDSS_TSCTR_DIV8_CLK 3 +#define VIDEO_CC_VCODEC0_AXI_CLK 4 +#define VIDEO_CC_VCODEC0_CORE_CLK 5 +#define VIDEO_CC_VCODEC1_AXI_CLK 6 +#define VIDEO_CC_VCODEC1_CORE_CLK 7 +#define VIDEO_CC_VENUS_AHB_CLK 8 +#define VIDEO_CC_VENUS_CLK_SRC 9 +#define VIDEO_CC_VENUS_CTL_AXI_CLK 10 +#define VIDEO_CC_VENUS_CTL_CORE_CLK 11 +#define VIDEO_PLL0 12 + +/* VIDEO_CC Resets */ +#define VIDEO_CC_VENUS_BCR 0 +#define VIDEO_CC_VCODEC0_BCR 1 +#define VIDEO_CC_VCODEC1_BCR 2 +#define VIDEO_CC_INTERFACE_BCR 3 + +/* VIDEO_CC GDSCRs */ +#define VENUS_GDSC 0 +#define VCODEC0_GDSC 1 +#define VCODEC1_GDSC 2 + +#endif
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH v2 1/2] dt-bindings: clock: Introduce QCOM Video clock bindings
Quoting Amit Nischal (2018-05-09 04:32:30)
Quoted 5 lines
Add device tree bindings for video clock controller for Qualcomm Technology Inc's SoCs.
Signed-off-by Amit Nischal <[email protected]>---
Applied to clk-next
PATCH v2 2/2 clk: qcom: Add video clock controller driver for SDM845
In reply to Amit NischalAdd support for the video clock controller found on SDM845 based devices. This would allow video drivers to probe and control their clocks.
--- drivers/clk/qcom/Kconfig | 11 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/videocc-sdm845.c | 358 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 370 insertions(+) create mode 100644 drivers/clk/qcom/videocc-sdm845.c
drivers/clk/qcom/Kconfig +11 -0
@@ -235,6 +235,17 @@ config SDM_GCC_845 Say Y if you want to use peripheral devices such as UART, SPI, I2C, USB, UFS, SDDC, PCIe, etc. +config SDM_VIDEOCC_845 + tristate "SDM845 Video Clock Controller" + depends on COMMON_CLK_QCOM + select SDM_GCC_845 + select QCOM_GDSC + help + Support for the video clock controller on Qualcomm Technologies, Inc + SDM845 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 (COMMON_CLK_QCOM && SPMI) || COMPILE_TEST
drivers/clk/qcom/Makefile +1 -0
@@ -39,4 +39,5 @@ obj-$(CONFIG_QCOM_CLK_APCS_MSM8916) += apcs-msm8916.o obj-$(CONFIG_QCOM_CLK_RPM) += clk-rpm.o obj-$(CONFIG_QCOM_CLK_SMD_RPM) += clk-smd-rpm.o obj-$(CONFIG_SDM_GCC_845) += gcc-sdm845.o +obj-$(CONFIG_SDM_VIDEOCC_845) += videocc-sdm845.o obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o
drivers/clk/qcom/videocc-sdm845.c new file +358 -0
358 lines not on this page · raw message
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH v2 2/2] clk: qcom: Add video clock controller driver for SDM845
Quoting Amit Nischal (2018-05-09 04:32:31)
Quoted 6 lines
Add support for the video clock controller found on SDM845 based devices. This would allow video drivers to probe and control their clocks.
Signed-off-by Amit Nischal <[email protected]>---
Applied to clk-next