Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/qcom/nord-embedded.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/

#include <dt-bindings/clock/qcom,glymur-videocc.h>
#include <dt-bindings/clock/qcom,nord-camcc.h>
#include <dt-bindings/clock/qcom,nord-dispcc.h>
#include <dt-bindings/clock/qcom,nord-gcc.h>
Expand All @@ -11,7 +12,6 @@
#include <dt-bindings/clock/qcom,nord-nwgcc.h>
#include <dt-bindings/clock/qcom,nord-segcc.h>
#include <dt-bindings/clock/qcom,nord-tcsrcc.h>
#include <dt-bindings/clock/qcom,nord-videocc.h>
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/interconnect/qcom,icc.h>
#include <dt-bindings/interconnect/qcom,nord-rpmh.h>
Expand Down
44 changes: 22 additions & 22 deletions drivers/clk/qcom/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,6 @@ config CLK_KAANAPALI_VIDEOCC
Say Y if you want to support video devices and functionality such as
video encode/decode.

config CLK_NORD_CAMCC
tristate "Nord Camera Clock Controller"
depends on ARM64 || COMPILE_TEST
select CLK_NORD_GCC
default m if ARCH_QCOM
help
Support for the camera clock controller on Qualcomm Technologies, Inc
Nord devices.
Say Y if you want to support camera devices and functionality such as
capturing pictures.

config CLK_NORD_DISPCC
tristate "Nord Display Clock Controller"
depends on ARM64 || COMPILE_TEST
Expand All @@ -219,6 +208,17 @@ config CLK_NORD_DISPCC
Say Y if you want to support display devices and functionality such as
splash screen.

config CLK_NORD_CAMCC
tristate "Nord Camera Clock Controller"
depends on ARM64 || COMPILE_TEST
select CLK_NORD_GCC
default m if ARCH_QCOM
help
Support for the camera clock controller on Qualcomm Technologies, Inc
Nord devices.
Say Y if you want to support camera devices and functionality such as
capturing pictures.

config CLK_NORD_GCC
tristate "Nord Global Clock Controller"
depends on ARM64 || COMPILE_TEST
Expand All @@ -240,17 +240,6 @@ config CLK_NORD_GPUCC
Say Y if you want to support graphics controller devices and
functionality such as 3D graphics.

config CLK_NORD_VIDEOCC
tristate "Nord VIDEO Clock Controller"
depends on ARM64 || COMPILE_TEST
select CLK_NORD_GCC
default m if ARCH_QCOM
help
Support for the video clock controller on Qualcomm Technologies, Inc.
Nord devices.
Say Y if you want to support video devices and functionality such as
video encode/decode.

config CLK_SHIKRA_AUDIOCORECC
tristate "Shikra Audio Core Clock Controller"
depends on ARM64 || COMPILE_TEST
Expand All @@ -262,6 +251,17 @@ config CLK_SHIKRA_AUDIOCORECC
Say Y if you want to use AudioCoreCC clocks required to support audio
devices and it's functionality.

config CLK_NORD_VIDEOCC
tristate "Nord VIDEO Clock Controller"
depends on ARM64 || COMPILE_TEST
select CLK_NORD_GCC
default m if ARCH_QCOM
help
Support for the video clock controller on Qualcomm Technologies, Inc.
Nord devices.
Say Y if you want to support video devices and functionality such as
video encode/decode.

config CLK_SHIKRA_GCC
tristate "Shikra Global Clock Controller"
depends on ARM64 || COMPILE_TEST
Expand Down
3 changes: 2 additions & 1 deletion drivers/clk/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ obj-$(CONFIG_CLK_NORD_DISPCC) += dispcc0-nord.o dispcc1-nord.o
obj-$(CONFIG_CLK_NORD_GCC) += gcc-nord.o negcc-nord.o nwgcc-nord.o segcc-nord.o
obj-$(CONFIG_CLK_NORD_GPUCC) += gpucc-nord.o gpu2cc-nord.o
obj-$(CONFIG_CLK_NORD_TCSRCC) += tcsrcc-nord.o
obj-$(CONFIG_CLK_NORD_VIDEOCC) += videocc-nord.o
obj-$(CONFIG_CLK_NORD_VIDEOCC) += videocc-glymur.o
obj-$(CONFIG_CLK_SHIKRA_AUDIOCORECC) += audiocorecc-shikra.o
obj-$(CONFIG_CLK_SHIKRA_GCC) += gcc-shikra.o
obj-$(CONFIG_CLK_X1E80100_CAMCC) += camcc-x1e80100.o
obj-$(CONFIG_CLK_X1E80100_DISPCC) += dispcc-x1e80100.o
Expand Down
3 changes: 3 additions & 0 deletions drivers/clk/qcom/nwgcc-nord.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,9 @@ static const struct qcom_reset_map nw_gcc_nord_resets[] = {
[NW_GCC_GPU_2_BCR] = { 0x24000 },
[NW_GCC_GPU_BCR] = { 0x23000 },
[NW_GCC_VIDEO_BCR] = { 0x1a000 },
[NW_GCC_VIDEO_AXI0_CLK_ARES] = { 0x1a008, 2 },
[NW_GCC_VIDEO_AXI0C_CLK_ARES] = { 0x1a01c, 2 },
[NW_GCC_VIDEO_AXI1_CLK_ARES] = { 0x1a030, 2 },
};

static const u32 nw_gcc_nord_critical_cbcrs[] = {
Expand Down
38 changes: 38 additions & 0 deletions drivers/clk/qcom/videocc-glymur.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ static const struct pll_vco taycan_eko_t_vco[] = {
{ 249600000, 2500000000, 0 },
};

static const struct pll_vco lucid_ole_vco[] = {
{ 249600000, 2300000000, 0 },
};

/* 720.0 MHz Configuration */
static const struct alpha_pll_config video_cc_pll0_config = {
.l = 0x25,
Expand All @@ -48,6 +52,21 @@ static const struct alpha_pll_config video_cc_pll0_config = {
.user_ctl_hi_val = 0x00000002,
};

/* 720.0 MHz Configuration */
static const struct alpha_pll_config video_cc_pll0_config_nord = {
.l = 0x25,
.alpha = 0x8000,
.config_ctl_val = 0x20485699,
.config_ctl_hi_val = 0x00182261,
.config_ctl_hi1_val = 0x82aa299c,
.test_ctl_val = 0x00000000,
.test_ctl_hi_val = 0x00000003,
.test_ctl_hi1_val = 0x00009000,
.test_ctl_hi2_val = 0x00000034,
.user_ctl_val = 0x00000000,
.user_ctl_hi_val = 0x00400005,
};

static struct clk_alpha_pll video_cc_pll0 = {
.offset = 0x0,
.config = &video_cc_pll0_config,
Expand Down Expand Up @@ -112,6 +131,15 @@ static struct clk_rcg2 video_cc_ahb_clk_src = {
},
};

static const struct freq_tbl ftbl_video_cc_mvs0_clk_src_nord[] = {
F(720000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0),
F(1305000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0),
F(1440000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0),
F(1600000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0),
F(1680000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0),
{ }
};

static const struct freq_tbl ftbl_video_cc_mvs0_clk_src[] = {
F(720000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0),
F(1014000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0),
Expand Down Expand Up @@ -508,12 +536,22 @@ static const struct qcom_cc_desc video_cc_glymur_desc = {

static const struct of_device_id video_cc_glymur_match_table[] = {
{ .compatible = "qcom,glymur-videocc" },
{ .compatible = "qcom,nord-videocc" },
{ }
};
MODULE_DEVICE_TABLE(of, video_cc_glymur_match_table);

static int video_cc_glymur_probe(struct platform_device *pdev)
{
if (of_device_is_compatible(pdev->dev.of_node, "qcom,nord-videocc")) {
video_cc_pll0.vco_table = lucid_ole_vco;
video_cc_pll0.num_vco = ARRAY_SIZE(lucid_ole_vco);
video_cc_pll0.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE];
video_cc_pll0.config = &video_cc_pll0_config_nord;

video_cc_mvs0_clk_src.freq_tbl = ftbl_video_cc_mvs0_clk_src_nord;
}

return qcom_cc_probe(pdev, &video_cc_glymur_desc);
}

Expand Down
Loading
Loading