Add QCOM camera clock controller driver
Subsystems (3)
PATCH v2 1/1 Add QCOM camera clock controller driver
Changes in v2:
Addressed below review comments - https://lkml.org/lkml/2018/7/23/377
1. Add comment to use clk_rcg2_shared_ops and CLK_SET_RATE_PARENT flag.
2. Replace commas with semicolon for PLL configuration in probe function.
Changes in v1:
This patch series adds a driver and device tree documentation binding for the camera clock controller on some Qualcomm Technologies, Inc, SoCs such as SDM845. This would allow camera drivers to probe and control their clocks.
[v1] : https://lkml.org/lkml/2018/7/23/377
Amit Nischal (1):
clk: qcom: Add camera clock controller driver for SDM845
drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/camcc-sdm845.c | 1744 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 1753 insertions(+) create mode 100644 drivers/clk/qcom/camcc-sdm845.c
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH v2 1/1 clk: qcom: Add camera clock controller driver for SDM845
Add support for the camera clock controller found on SDM845 based devices. This would allow camera drivers to probe and control their clocks.
--- drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/camcc-sdm845.c | 1744 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 1753 insertions(+) create mode 100644 drivers/clk/qcom/camcc-sdm845.c
drivers/clk/qcom/Kconfig +8 -0
@@ -235,6 +235,14 @@ config MSM_GCC_8998 Say Y if you want to use peripheral devices such as UART, SPI, i2c, USB, UFS, SD/eMMC, PCIe, etc. +config SDM_CAMCC_845 + tristate "SDM845 Camera Clock Controller" + depends on COMMON_CLK_QCOM + select SDM_GCC_845 + help + Support for the camera clock controller on SDM845 devices. + Say Y if you want to support camera devices and camera functionality. + config SDM_GCC_845 tristate "SDM845 Global Clock Controller" select QCOM_GDSC
drivers/clk/qcom/Makefile +1 -0
@@ -40,6 +40,7 @@ obj-$(CONFIG_QCOM_CLK_APCS_MSM8916) += apcs-msm8916.o obj-$(CONFIG_QCOM_CLK_RPM) += clk-rpm.o obj-$(CONFIG_QCOM_CLK_RPMH) += clk-rpmh.o obj-$(CONFIG_QCOM_CLK_SMD_RPM) += clk-smd-rpm.o +obj-$(CONFIG_SDM_CAMCC_845) += camcc-sdm845.o obj-$(CONFIG_SDM_GCC_845) += gcc-sdm845.o obj-$(CONFIG_SDM_GPUCC_845) += gpucc-sdm845.o obj-$(CONFIG_SDM_VIDEOCC_845) += videocc-sdm845.o
drivers/clk/qcom/camcc-sdm845.c new file +1744 -0
1,744 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
maintainerRe: [PATCH v2] clk: qcom: Add camera clock controller driver for SDM845
Quoting Amit Nischal (2018-07-30 02:22:20)
Quoted 12 lines
drivers/clk/qcom/camcc-sdm845.c new file +6
-0@@ -0,0 +1,1744 @@ + }, +}; + +static const struct freq_tbl ftbl_cam_cc_bps_clk_src[] = { +F (19200000 ,P_BI_TCXO ,1 ,0 ,0 ), +F (100000000 ,P_CAM_CC_PLL0_OUT_EVEN ,6 ,0 ,0 ),
drivers/clk/qcom/camcc-sdm845.c line 16
Quoted 10 lines
drivers/clk/qcom/camcc-sdm845.c new file +10
-0+F (200000000 ,P_CAM_CC_PLL0_OUT_EVEN ,3 ,0 ,0 ), +F (404000000 ,P_CAM_CC_PLL1_OUT_EVEN ,2 ,0 ,0 ), +F (480000000 ,P_CAM_CC_PLL2_OUT_EVEN ,1 ,0 ,0 ), + F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0), + { } +}; + +/* +* As per HW design, some of the CAMCC RCGs needs to +* move to XO clock during their clock disable so using
Per hw design sure, but what about hw design is causing this?
drivers/clk/qcom/camcc-sdm845.c line 180
Quoted 3 lines
drivers/clk/qcom/camcc-sdm845.c new file +3
-0+* clk_rcg2_shared_ops for such RCGs. +* Also, use CLK_SET_RATE_PARENT flag for the RCGs which +* have non-fixed PLL as parent source and requires
Mention the PLL that isn't fixed?
Quoted 5 lines
drivers/clk/qcom/camcc-sdm845.c new file +5
-0+* reconfiguration of the PLL frequency. +*/ +static struct clk_rcg2 cam_cc_bps_clk_src = { + .cmd_rcgr =0x600c , + .mnd_width =0 ,
Re: [PATCH v2] clk: qcom: Add camera clock controller driver for SDM845
Quoted 17 lines · Stephen Boyd
Quoting Amit Nischal (2018-07-30 02:22:20)
Quoted 16 lines
drivers/clk/qcom/camcc-sdm845.c new file +10
-0@@ -0,0 +1,1744 @@ + }, +}; + +static const struct freq_tbl ftbl_cam_cc_bps_clk_src[] = { +F (19200000 ,P_BI_TCXO ,1 ,0 ,0 ), +F (100000000 ,P_CAM_CC_PLL0_OUT_EVEN ,6 ,0 ,0 ), +F (200000000 ,P_CAM_CC_PLL0_OUT_EVEN ,3 ,0 ,0 ), +F (404000000 ,P_CAM_CC_PLL1_OUT_EVEN ,2 ,0 ,0 ), +F (480000000 ,P_CAM_CC_PLL2_OUT_EVEN ,1 ,0 ,0 ), +F (600000000 ,P_CAM_CC_PLL0_OUT_EVEN ,1 ,0 ,0 ),
Quoted 8 lines
drivers/clk/qcom/camcc-sdm845.c line 177
Quoted 6 lines
drivers/clk/qcom/camcc-sdm845.c new file +6
-0+ { } +}; + +/* +* As per HW design, some of the CAMCC RCGs needs to +* move to XO clock during their clock disable so using Per hw design sure, but what about hw design is causing this?
The RCGs which sources to the CBCRs further connected to the camera memory blocks needs to be moved to XO clock during clock disable. This is required to power down the camera memories gracefully as these memories cannot be powered down instantly. And after memory power down, HW will gate the clock.
Quoted 7 lines
drivers/clk/qcom/camcc-sdm845.c line 180
Quoted 4 lines
drivers/clk/qcom/camcc-sdm845.c new file +3
-0+* clk_rcg2_shared_ops for such RCGs. +* Also, use CLK_SET_RATE_PARENT flag for the RCGs which +* have non-fixed PLL as parent source and requires Mention the PLL that isn't fixed?
Yes sure. I will mention the PLL's name in the next patch.
Quoted 9 lines
drivers/clk/qcom/camcc-sdm845.c line 185
Quoted 5 lines
drivers/clk/qcom/camcc-sdm845.c new file +5
-0+* reconfiguration of the PLL frequency. +*/ +static struct clk_rcg2 cam_cc_bps_clk_src = { + .cmd_rcgr =0x600c , + .mnd_width =0 ,--
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