Add QCOM video clock controller driver
cover Add QCOM video clock controller driver
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
Amit Nischal (2):
dt-bindings: clock: Introduce QCOM Video clock controller bindings
clk: qcom: Add video clock controller driver for SDM845
.../devicetree/bindings/clock/qcom,videocc.txt | 18 ++ 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 | 25 ++ 5 files changed, 413 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 1/2 dt-bindings: clock: Introduce QCOM Video clock controller bindings
Add device tree bindings for video clock controller for Qualcomm Technology Inc's SoCs.
--- .../devicetree/bindings/clock/qcom,videocc.txt | 18 ++++++++++++++++ include/dt-bindings/clock/qcom,videocc-sdm845.h | 25 ++++++++++++++++++++++ 2 files changed, 43 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 +18 -0
@@ -0,0 +1,18 @@ +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. +- #reset-cells : from common reset binding, shall contain 1. +- #power-domain-cells : from generic power domain binding, shall contain 1. + +Example: + videocc: clock-controller@ab00000 { + compatible = "qcom,sdm845-videocc"; + reg = <0xab00000 0x10000>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + };
include/dt-bindings/clock/qcom,videocc-sdm845.h new file +25 -0
@@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2018, The Linux Foundation. All rights reserved. */ + +#ifndef _DT_BINDINGS_CLK_MSM_VIDEO_CC_SDM845_H +#define _DT_BINDINGS_CLK_MSM_VIDEO_CC_SDM845_H + +#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 + +#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
PATCH 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
Stephen Boyd
maintainerQuoting Amit Nischal (2018-05-03 05:35:23)
Quoted 5 lines
Changes in v1:
https://lkml.org/lkml/2018/4/24/545Addressed 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.
You didn't add any reset definitions though?
Quoted 9 lines · Stephen Boyd
Quoting Amit Nischal (2018-05-03 05:35:23)
Quoted 6 lines
Changes in v1:
https://lkml.org/lkml/2018/4/24/545Addressed 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.You didn't add any reset definitions though?
We haven't added the reset definitions for videocc as there is no video reset client.
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Rob Herring
maintainerQuoted 9 lines · Amit Nischal
Quoted 8 lines · Stephen Boyd
Quoting Amit Nischal (2018-05-03 05:35:23)
Quoted 6 lines
Changes in v1:
https://lkml.org/lkml/2018/4/24/545Addressed 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.
Quoted 4 lines
Quoted 1 line
You didn't add any reset definitions though?
We haven't added the reset definitions for videocc as there is no video reset client.
So? You don't know what resets there are?
Rob
Quoted 10 lines · Rob Herring
Quoted 9 lines · Amit Nischal
Quoted 8 lines · Stephen Boyd
Quoting Amit Nischal (2018-05-03 05:35:23)
Quoted 6 lines
Changes in v1:
https://lkml.org/lkml/2018/4/24/545Addressed 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.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
You didn't add any reset definitions though?
We haven't added the reset definitions for videocc as there is no video reset client.
So? You don't know what resets there are?
We know the resets, but video driver doesn't do any block resets prior to accessing the video subsystem so that's the reason we do not want to expose the resets in videocc driver.
Quoted 5 lines
Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Rob Herring
maintainerQuoted 19 lines · Amit Nischal
Quoted 18 lines · Rob Herring
Quoted 14 lines · Amit Nischal
Quoted 9 lines · Stephen Boyd
Quoting Amit Nischal (2018-05-03 05:35:23)
Quoted 6 lines
Changes in v1:
https://lkml.org/lkml/2018/4/24/545Addressed 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.You didn't add any reset definitions though?
We haven't added the reset definitions for videocc as there is no video reset client.
Quoted 6 lines
Quoted 2 lines
So? You don't know what resets there are?
We know the resets, but video driver doesn't do any block resets prior to accessing the video subsystem so that's the reason we do not want to expose the resets in videocc driver.
Bindings don't have to match what drivers currently use but should be complete as possible.
Rob
Stephen Boyd
maintainerQuoting Rob Herring (2018-05-08 05:48:07)
Quoted 23 lines · Amit Nischal
Quoted 22 lines · Rob Herring
Quoted 20 lines · Amit Nischal
Quoted 10 lines · Stephen Boyd
Quoted 8 lines
Quoting Amit Nischal (2018-05-03 05:35:23)
Quoted 6 lines
Changes in v1:
https://lkml.org/lkml/2018/4/24/545Addressed 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.Quoted 4 lines
Quoted 1 line
You didn't add any reset definitions though?
We haven't added the reset definitions for videocc as there is no video reset client.
So? You don't know what resets there are?
Quoted 6 lines
Quoted 3 lines
We know the resets, but video driver doesn't do any block resets prior to accessing the video subsystem so that's the reason we do not want to expose the resets in videocc driver.
Bindings don't have to match what drivers currently use but should be complete as possible.
Right. Please add the #defines in the header file for the resets. You can leave them out of the driver if you really want to, but typically we still add them and then rely on not touching them if they shouldn't be used.
Quoted 28 lines · Stephen Boyd
Quoting Rob Herring (2018-05-08 05:48:07)
Quoted 27 lines · Amit Nischal
Quoted 25 lines · Rob Herring
Quoted 12 lines · Amit Nischal
Quoted 10 lines · Stephen Boyd
Quoted 8 lines
Quoting Amit Nischal (2018-05-03 05:35:23)
Quoted 6 lines
Changes in v1:
https://lkml.org/lkml/2018/4/24/545Addressed 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.Quoted 8 lines
Quoted 4 lines
Quoted 1 line
You didn't add any reset definitions though?
We haven't added the reset definitions for videocc as there is no video reset client.
So? You don't know what resets there are?
We know the resets, but video driver doesn't do any block resets prior to accessing the video subsystem so that's the reason we do not want to expose the resets in videocc driver.
Quoted 7 lines
Quoted 2 lines
Bindings don't have to match what drivers currently use but should be complete as possible.
Right. Please add the #defines in the header file for the resets. You can leave them out of the driver if you really want to, but typically we still add them and then rely on not touching them if they shouldn't be used.
Thanks for the suggestion.
I will add the videocc resets in the header file.