* [PATCH 0/4] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC
@ 2026-05-13 13:40 Imran Shaik
2026-05-13 13:40 ` [PATCH 1/4] dt-bindings: clock: qcom: Add Shikra Display clock controller Imran Shaik
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Imran Shaik @ 2026-05-13 13:40 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm,
linux-clk, devicetree, linux-kernel, Imran Shaik
This series adds support for the Display clock controller (DISPCC) and
GPU Clock Controller (GPUCC) on Qualcomm Shikra SoC.
Shikra GCC series link:
- https://lore.kernel.org/linux-clk/20260508-shikra-gcc-rpmcc-clks-v2-0-83238ba24060@oss.qualcomm.com/
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
Imran Shaik (4):
dt-bindings: clock: qcom: Add Shikra Display clock controller
dt-bindings: clock: qcom: Add Shikra GPU clock controller
clk: qcom: Add support for Display Clock Controller on Shikra
clk: qcom: Add support for GPU Clock Controller on Shikra
.../bindings/clock/qcom,shikra-dispcc.yaml | 62 +++
.../bindings/clock/qcom,sm6115-gpucc.yaml | 6 +-
drivers/clk/qcom/Kconfig | 20 +
drivers/clk/qcom/Makefile | 2 +
drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++
drivers/clk/qcom/gpucc-shikra.c | 406 +++++++++++++++
include/dt-bindings/clock/qcom,shikra-dispcc.h | 39 ++
include/dt-bindings/clock/qcom,shikra-gpucc.h | 37 ++
8 files changed, 1136 insertions(+), 1 deletion(-)
---
base-commit: 9974969c14031a097d6b45bcb7a06bb4aa525c40
change-id: 20260513-shikra-dispcc-gpucc-6f59c23020f5
prerequisite-change-id: 20260429-shikra-gcc-rpmcc-clks-2094edfff3b0:v2
prerequisite-patch-id: 5a0fbdd458785da2d0e850c851a05046672ecadf
prerequisite-patch-id: 1f98e515a52bbeb25e2a960a804afe16c6a472a1
prerequisite-patch-id: a64476b2ba6e0f2a55928baf72ec32672ee0123c
prerequisite-patch-id: d0c8651205232862b40f942929e1efdaa3084eb3
Best regards,
--
Imran Shaik <imran.shaik@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 1/4] dt-bindings: clock: qcom: Add Shikra Display clock controller 2026-05-13 13:40 [PATCH 0/4] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik @ 2026-05-13 13:40 ` Imran Shaik 2026-05-30 11:30 ` Krzysztof Kozlowski 2026-05-13 13:40 ` [PATCH 2/4] dt-bindings: clock: qcom: Add Shikra GPU " Imran Shaik ` (2 subsequent siblings) 3 siblings, 1 reply; 15+ messages in thread From: Imran Shaik @ 2026-05-13 13:40 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel, Imran Shaik Add device tree bindings for the Display clock controller on the Qualcomm Shikra SoC. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> --- .../bindings/clock/qcom,shikra-dispcc.yaml | 62 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,shikra-dispcc.h | 39 ++++++++++++++ 2 files changed, 101 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,shikra-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,shikra-dispcc.yaml new file mode 100644 index 0000000000000000000000000000000000000000..38302eda7942ebc2e4dfecae511b75cba0b09916 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,shikra-dispcc.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,shikra-dispcc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Display Clock & Reset Controller for Qualcomm Shikra SoC + +maintainers: + - Imran Shaik <imran.shaik@oss.qualcomm.com> + +description: | + Display clock control module provides the clocks, resets and power + domains on Qualcomm Shikra SoC platform. + + See also: + - include/dt-bindings/clock/qcom,shikra-dispcc.h + +properties: + compatible: + enum: + - qcom,shikra-dispcc + + clocks: + items: + - description: Board XO source + - description: Board sleep clock + - description: GPLL0 DISP DIV clock from GCC + - description: Byte clock from DSI PHY0 + - description: Pixel clock from DSI PHY0 + - description: Byte clock from DSI PHY1 + - description: Pixel clock from DSI PHY1 + +required: + - compatible + - clocks + - '#power-domain-cells' + +allOf: + - $ref: qcom,gcc.yaml# + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/qcom,rpmcc.h> + #include <dt-bindings/clock/qcom,shikra-gcc.h> + clock-controller@5f00000 { + compatible = "qcom,shikra-dispcc"; + reg = <0x05f00000 0x20000>; + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&sleep_clk>, + <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>, + <&dsi0_phy 0>, + <&dsi0_phy 1>, + <&dsi1_phy 0>, + <&dsi1_phy 1>; + #clock-cells = <1>; + #power-domain-cells = <1>; + #reset-cells = <1>; + }; +... diff --git a/include/dt-bindings/clock/qcom,shikra-dispcc.h b/include/dt-bindings/clock/qcom,shikra-dispcc.h new file mode 100644 index 0000000000000000000000000000000000000000..088a7c692ad5d2bae38d2799ec1fc6e8ebbe6c0f --- /dev/null +++ b/include/dt-bindings/clock/qcom,shikra-dispcc.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef _DT_BINDINGS_CLK_QCOM_DISP_CC_SHIKRA_H +#define _DT_BINDINGS_CLK_QCOM_DISP_CC_SHIKRA_H + +/* DISP_CC clocks */ +#define DISP_CC_PLL0 0 +#define DISP_CC_MDSS_AHB_CLK 1 +#define DISP_CC_MDSS_AHB_CLK_SRC 2 +#define DISP_CC_MDSS_BYTE0_CLK 3 +#define DISP_CC_MDSS_BYTE0_CLK_SRC 4 +#define DISP_CC_MDSS_BYTE0_DIV_CLK_SRC 5 +#define DISP_CC_MDSS_BYTE0_INTF_CLK 6 +#define DISP_CC_MDSS_ESC0_CLK 7 +#define DISP_CC_MDSS_ESC0_CLK_SRC 8 +#define DISP_CC_MDSS_MDP_CLK 9 +#define DISP_CC_MDSS_MDP_CLK_SRC 10 +#define DISP_CC_MDSS_MDP_LUT_CLK 11 +#define DISP_CC_MDSS_NON_GDSC_AHB_CLK 12 +#define DISP_CC_MDSS_PCLK0_CLK 13 +#define DISP_CC_MDSS_PCLK0_CLK_SRC 14 +#define DISP_CC_MDSS_VSYNC_CLK 15 +#define DISP_CC_MDSS_VSYNC_CLK_SRC 16 +#define DISP_CC_SLEEP_CLK 17 +#define DISP_CC_SLEEP_CLK_SRC 18 +#define DISP_CC_XO_CLK 19 +#define DISP_CC_XO_CLK_SRC 20 + +/* DISP_CC power domains */ +#define DISP_CC_MDSS_CORE_GDSC 0 + +/* DISP_CC resets */ +#define DISP_CC_MDSS_CORE_BCR 0 +#define DISP_CC_MDSS_RSCC_BCR 1 + +#endif -- 2.34.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/4] dt-bindings: clock: qcom: Add Shikra Display clock controller 2026-05-13 13:40 ` [PATCH 1/4] dt-bindings: clock: qcom: Add Shikra Display clock controller Imran Shaik @ 2026-05-30 11:30 ` Krzysztof Kozlowski 0 siblings, 0 replies; 15+ messages in thread From: Krzysztof Kozlowski @ 2026-05-30 11:30 UTC (permalink / raw) To: Imran Shaik, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On 13/05/2026 15:40, Imran Shaik wrote: > Add device tree bindings for the Display clock controller on the > Qualcomm Shikra SoC. > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > --- > .../bindings/clock/qcom,shikra-dispcc.yaml | 62 ++++++++++++++++++++++ > include/dt-bindings/clock/qcom,shikra-dispcc.h | 39 ++++++++++++++ > 2 files changed, 101 insertions(+) Incomplete. You already sent fixes for this just creating churn - us accepting incomplete code and having to review fixup immediately. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/4] dt-bindings: clock: qcom: Add Shikra GPU clock controller 2026-05-13 13:40 [PATCH 0/4] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik 2026-05-13 13:40 ` [PATCH 1/4] dt-bindings: clock: qcom: Add Shikra Display clock controller Imran Shaik @ 2026-05-13 13:40 ` Imran Shaik 2026-05-13 13:40 ` [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra Imran Shaik 2026-05-13 13:40 ` [PATCH 4/4] clk: qcom: Add support for GPU " Imran Shaik 3 siblings, 0 replies; 15+ messages in thread From: Imran Shaik @ 2026-05-13 13:40 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel, Imran Shaik Add device tree bindings for the GPU clock controller on the Qualcomm Shikra SoC. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> --- .../bindings/clock/qcom,sm6115-gpucc.yaml | 6 +++- include/dt-bindings/clock/qcom,shikra-gpucc.h | 37 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/clock/qcom,sm6115-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm6115-gpucc.yaml index 104ba10ca5737ee1ed94fcb2df5a38bda9c86d14..5f0f94074e43034c2241283241e10551ae90ee24 100644 --- a/Documentation/devicetree/bindings/clock/qcom,sm6115-gpucc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,sm6115-gpucc.yaml @@ -7,17 +7,21 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm Graphics Clock & Reset Controller on SM6115 maintainers: + - Imran Shaik <imran.shaik@oss.qualcomm.com> - Konrad Dybcio <konradybcio@kernel.org> description: | Qualcomm graphics clock control module provides clocks, resets and power domains on Qualcomm SoCs. - See also: include/dt-bindings/clock/qcom,sm6115-gpucc.h + See also: + include/dt-bindings/clock/qcom,shikra-gpucc.h + include/dt-bindings/clock/qcom,sm6115-gpucc.h properties: compatible: enum: + - qcom,shikra-gpucc - qcom,sm6115-gpucc clocks: diff --git a/include/dt-bindings/clock/qcom,shikra-gpucc.h b/include/dt-bindings/clock/qcom,shikra-gpucc.h new file mode 100644 index 0000000000000000000000000000000000000000..60714f6cc6cd2c37a0a4caba4473259756bb9d31 --- /dev/null +++ b/include/dt-bindings/clock/qcom,shikra-gpucc.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef _DT_BINDINGS_CLK_QCOM_GPU_CC_SHIKRA_H +#define _DT_BINDINGS_CLK_QCOM_GPU_CC_SHIKRA_H + +/* GPU_CC clocks */ +#define GPU_CC_PLL0 0 +#define GPU_CC_AHB_CLK 1 +#define GPU_CC_CRC_AHB_CLK 2 +#define GPU_CC_CX_GFX3D_CLK 3 +#define GPU_CC_CX_GFX3D_SLV_CLK 4 +#define GPU_CC_CX_GMU_CLK 5 +#define GPU_CC_CX_SNOC_DVM_CLK 6 +#define GPU_CC_CXO_AON_CLK 7 +#define GPU_CC_CXO_CLK 8 +#define GPU_CC_GMU_CLK_SRC 9 +#define GPU_CC_GPU_SMMU_VOTE_CLK 10 +#define GPU_CC_GX_CXO_CLK 11 +#define GPU_CC_GX_GFX3D_CLK 12 +#define GPU_CC_GX_GFX3D_CLK_SRC 13 +#define GPU_CC_SLEEP_CLK 14 + +/* GPU_CC power domains */ +#define GPU_CC_CX_GDSC 0 +#define GPU_CC_GX_GDSC 1 + +/* GPU_CC resets */ +#define GPU_CC_CX_BCR 0 +#define GPU_CC_GFX3D_AON_BCR 1 +#define GPU_CC_GMU_BCR 2 +#define GPU_CC_GX_BCR 3 +#define GPU_CC_XO_BCR 4 + +#endif -- 2.34.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra 2026-05-13 13:40 [PATCH 0/4] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik 2026-05-13 13:40 ` [PATCH 1/4] dt-bindings: clock: qcom: Add Shikra Display clock controller Imran Shaik 2026-05-13 13:40 ` [PATCH 2/4] dt-bindings: clock: qcom: Add Shikra GPU " Imran Shaik @ 2026-05-13 13:40 ` Imran Shaik 2026-05-13 14:01 ` Dmitry Baryshkov 2026-05-13 13:40 ` [PATCH 4/4] clk: qcom: Add support for GPU " Imran Shaik 3 siblings, 1 reply; 15+ messages in thread From: Imran Shaik @ 2026-05-13 13:40 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel, Imran Shaik Add a driver for the Display clock controller on Qualcomm Shikra SoC. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> --- drivers/clk/qcom/Kconfig | 10 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 576 insertions(+) diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index 6e0549fccf3eee358ef747a34e698a6a47a02001..78efe494aaeaeefa9da917c47960cfec18259af7 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -155,6 +155,16 @@ config CLK_NORD_GCC SPI, I2C, USB, SD/UFS, PCIe etc. The clock controller is a combination of GCC, SE_GCC, NE_GCC and NW_GCC. +config CLK_SHIKRA_DISPCC + tristate "Shikra Display Clock Controller" + depends on ARM64 || COMPILE_TEST + select CLK_SHIKRA_GCC + default m if ARCH_QCOM + help + Support for the display clock controller on Qualcomm Shikra SoCs. + Say Y if you want to support display devices and functionality such as + splash screen. + config CLK_SHIKRA_GCC tristate "Shikra Global Clock Controller" depends on ARM64 || COMPILE_TEST diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile index 08a2cf68cb9cb81f05a903cfaf2deda8f8cba43e..ec4e79614348a23089454b5a20c3dc0abbaa0350 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -37,6 +37,7 @@ obj-$(CONFIG_CLK_KAANAPALI_TCSRCC) += tcsrcc-kaanapali.o obj-$(CONFIG_CLK_KAANAPALI_VIDEOCC) += videocc-kaanapali.o obj-$(CONFIG_CLK_NORD_GCC) += gcc-nord.o negcc-nord.o nwgcc-nord.o segcc-nord.o obj-$(CONFIG_CLK_NORD_TCSRCC) += tcsrcc-nord.o +obj-$(CONFIG_CLK_SHIKRA_DISPCC) += dispcc-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 diff --git a/drivers/clk/qcom/dispcc-shikra.c b/drivers/clk/qcom/dispcc-shikra.c new file mode 100644 index 0000000000000000000000000000000000000000..8fd303ddac0690d3e003057ec6ed91d104427c9f --- /dev/null +++ b/drivers/clk/qcom/dispcc-shikra.c @@ -0,0 +1,565 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#include <linux/clk-provider.h> +#include <linux/mod_devicetable.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> + +#include <dt-bindings/clock/qcom,shikra-dispcc.h> + +#include "clk-alpha-pll.h" +#include "clk-branch.h" +#include "clk-pll.h" +#include "clk-rcg.h" +#include "clk-regmap.h" +#include "clk-regmap-divider.h" +#include "clk-regmap-mux.h" +#include "common.h" +#include "gdsc.h" +#include "reset.h" + +enum { + DT_BI_TCXO, + DT_SLEEP_CLK, + DT_GPLL0, + DT_DSI0_PHY_PLL_OUT_BYTECLK, + DT_DSI0_PHY_PLL_OUT_DSICLK, + DT_DSI1_PHY_PLL_OUT_BYTECLK, + DT_DSI1_PHY_PLL_OUT_DSICLK, +}; + +enum { + P_BI_TCXO, + P_DISP_CC_PLL0_OUT_MAIN, + P_DSI0_PHY_PLL_OUT_BYTECLK, + P_DSI0_PHY_PLL_OUT_DSICLK, + P_DSI1_PHY_PLL_OUT_DSICLK, + P_GPLL0_OUT_MAIN, + P_SLEEP_CLK, +}; + +static const struct pll_vco spark_vco[] = { + { 500000000, 1000000000, 2 }, +}; + +/* 768.0 MHz Configuration */ +static const struct alpha_pll_config disp_cc_pll0_config = { + .l = 0x28, + .alpha = 0x0, + .alpha_en_mask = BIT(24), + .vco_val = BIT(21), + .vco_mask = GENMASK(21, 20), + .main_output_mask = BIT(0), + .config_ctl_val = 0x4001055b, + .test_ctl_hi1_val = 0x1, +}; + +static struct clk_alpha_pll disp_cc_pll0 = { + .offset = 0x0, + .config = &disp_cc_pll0_config, + .vco_table = spark_vco, + .num_vco = ARRAY_SIZE(spark_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_pll0", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_ops, + }, + }, +}; + +static const struct parent_map disp_cc_parent_map_0[] = { + { P_BI_TCXO, 0 }, + { P_DSI0_PHY_PLL_OUT_BYTECLK, 1 }, +}; + +static const struct clk_parent_data disp_cc_parent_data_0[] = { + { .index = DT_BI_TCXO }, + { .index = DT_DSI0_PHY_PLL_OUT_BYTECLK }, +}; + +static const struct parent_map disp_cc_parent_map_1[] = { + { P_BI_TCXO, 0 }, +}; + +static const struct clk_parent_data disp_cc_parent_data_1[] = { + { .index = DT_BI_TCXO }, +}; + +static const struct parent_map disp_cc_parent_map_2[] = { + { P_BI_TCXO, 0 }, + { P_GPLL0_OUT_MAIN, 4 }, +}; + +static const struct clk_parent_data disp_cc_parent_data_2[] = { + { .index = DT_BI_TCXO }, + { .index = DT_GPLL0 }, +}; + +static const struct parent_map disp_cc_parent_map_3[] = { + { P_BI_TCXO, 0 }, + { P_DISP_CC_PLL0_OUT_MAIN, 1 }, + { P_GPLL0_OUT_MAIN, 4 }, +}; + +static const struct clk_parent_data disp_cc_parent_data_3[] = { + { .index = DT_BI_TCXO }, + { .hw = &disp_cc_pll0.clkr.hw }, + { .index = DT_GPLL0 }, +}; + +static const struct parent_map disp_cc_parent_map_4[] = { + { P_BI_TCXO, 0 }, + { P_DSI0_PHY_PLL_OUT_DSICLK, 1 }, + { P_DSI1_PHY_PLL_OUT_DSICLK, 2 }, +}; + +static const struct clk_parent_data disp_cc_parent_data_4[] = { + { .index = DT_BI_TCXO }, + { .index = DT_DSI0_PHY_PLL_OUT_DSICLK }, + { .index = DT_DSI1_PHY_PLL_OUT_DSICLK }, +}; + +static const struct parent_map disp_cc_parent_map_5[] = { + { P_SLEEP_CLK, 0 }, +}; + +static const struct clk_parent_data disp_cc_parent_data_5[] = { + { .index = DT_SLEEP_CLK }, +}; + +static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(37500000, P_GPLL0_OUT_MAIN, 8, 0, 0), + F(75000000, P_GPLL0_OUT_MAIN, 4, 0, 0), + { } +}; + +static struct clk_rcg2 disp_cc_mdss_ahb_clk_src = { + .cmd_rcgr = 0x2154, + .mnd_width = 0, + .hid_width = 5, + .parent_map = disp_cc_parent_map_2, + .freq_tbl = ftbl_disp_cc_mdss_ahb_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_ahb_clk_src", + .parent_data = disp_cc_parent_data_2, + .num_parents = ARRAY_SIZE(disp_cc_parent_data_2), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_byte0_clk_src = { + .cmd_rcgr = 0x20a4, + .mnd_width = 0, + .hid_width = 5, + .parent_map = disp_cc_parent_map_0, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_byte0_clk_src", + .parent_data = disp_cc_parent_data_0, + .num_parents = ARRAY_SIZE(disp_cc_parent_data_0), + .flags = CLK_OPS_PARENT_ENABLE | CLK_SET_RATE_PARENT, + .ops = &clk_byte2_ops, + }, +}; + +static const struct freq_tbl ftbl_disp_cc_mdss_esc0_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + { } +}; + +static struct clk_rcg2 disp_cc_mdss_esc0_clk_src = { + .cmd_rcgr = 0x20c0, + .mnd_width = 0, + .hid_width = 5, + .parent_map = disp_cc_parent_map_0, + .freq_tbl = ftbl_disp_cc_mdss_esc0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_esc0_clk_src", + .parent_data = disp_cc_parent_data_0, + .num_parents = ARRAY_SIZE(disp_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_disp_cc_mdss_mdp_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(192000000, P_DISP_CC_PLL0_OUT_MAIN, 4, 0, 0), + F(256000000, P_DISP_CC_PLL0_OUT_MAIN, 3, 0, 0), + F(307200000, P_DISP_CC_PLL0_OUT_MAIN, 2.5, 0, 0), + F(384000000, P_DISP_CC_PLL0_OUT_MAIN, 2, 0, 0), + { } +}; + +static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = { + .cmd_rcgr = 0x2074, + .mnd_width = 0, + .hid_width = 5, + .parent_map = disp_cc_parent_map_3, + .freq_tbl = ftbl_disp_cc_mdss_mdp_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_mdp_clk_src", + .parent_data = disp_cc_parent_data_3, + .num_parents = ARRAY_SIZE(disp_cc_parent_data_3), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_pclk0_clk_src = { + .cmd_rcgr = 0x205c, + .mnd_width = 8, + .hid_width = 5, + .parent_map = disp_cc_parent_map_4, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_pclk0_clk_src", + .parent_data = disp_cc_parent_data_4, + .num_parents = ARRAY_SIZE(disp_cc_parent_data_4), + .flags = CLK_OPS_PARENT_ENABLE | CLK_SET_RATE_PARENT, + .ops = &clk_pixel_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_vsync_clk_src = { + .cmd_rcgr = 0x208c, + .mnd_width = 0, + .hid_width = 5, + .parent_map = disp_cc_parent_map_1, + .freq_tbl = ftbl_disp_cc_mdss_esc0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_vsync_clk_src", + .parent_data = disp_cc_parent_data_1, + .num_parents = ARRAY_SIZE(disp_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_disp_cc_sleep_clk_src[] = { + F(32764, P_SLEEP_CLK, 1, 0, 0), + { } +}; + +static struct clk_rcg2 disp_cc_sleep_clk_src = { + .cmd_rcgr = 0x6050, + .mnd_width = 0, + .hid_width = 5, + .parent_map = disp_cc_parent_map_5, + .freq_tbl = ftbl_disp_cc_sleep_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "disp_cc_sleep_clk_src", + .parent_data = disp_cc_parent_data_5, + .num_parents = ARRAY_SIZE(disp_cc_parent_data_5), + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_xo_clk_src = { + .cmd_rcgr = 0x6034, + .mnd_width = 0, + .hid_width = 5, + .parent_map = disp_cc_parent_map_1, + .freq_tbl = ftbl_disp_cc_mdss_esc0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "disp_cc_xo_clk_src", + .parent_data = disp_cc_parent_data_1, + .num_parents = ARRAY_SIZE(disp_cc_parent_data_1), + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_regmap_div disp_cc_mdss_byte0_div_clk_src = { + .reg = 0x20bc, + .shift = 0, + .width = 2, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_byte0_div_clk_src", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_byte0_clk_src.clkr.hw, + }, + .num_parents = 1, + .ops = &clk_regmap_div_ops, + }, +}; + +static struct clk_branch disp_cc_mdss_ahb_clk = { + .halt_reg = 0x2044, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x2044, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch disp_cc_mdss_byte0_clk = { + .halt_reg = 0x201c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x201c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_byte0_clk", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_byte0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch disp_cc_mdss_byte0_intf_clk = { + .halt_reg = 0x2020, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x2020, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_byte0_intf_clk", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_byte0_div_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch disp_cc_mdss_esc0_clk = { + .halt_reg = 0x2024, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x2024, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_esc0_clk", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_esc0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch disp_cc_mdss_mdp_clk = { + .halt_reg = 0x2008, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x2008, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_mdp_clk", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_mdp_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch disp_cc_mdss_mdp_lut_clk = { + .halt_reg = 0x2010, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x2010, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_mdp_lut_clk", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_mdp_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch disp_cc_mdss_non_gdsc_ahb_clk = { + .halt_reg = 0x4004, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x4004, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_non_gdsc_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch disp_cc_mdss_pclk0_clk = { + .halt_reg = 0x2004, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x2004, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_pclk0_clk", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_pclk0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch disp_cc_mdss_vsync_clk = { + .halt_reg = 0x2018, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x2018, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "disp_cc_mdss_vsync_clk", + .parent_hws = (const struct clk_hw*[]) { + &disp_cc_mdss_vsync_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct gdsc disp_cc_mdss_core_gdsc = { + .gdscr = 0x3000, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, + .pd = { + .name = "disp_cc_mdss_core_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, +}; + +static struct clk_regmap *disp_cc_shikra_clocks[] = { + [DISP_CC_MDSS_AHB_CLK] = &disp_cc_mdss_ahb_clk.clkr, + [DISP_CC_MDSS_AHB_CLK_SRC] = &disp_cc_mdss_ahb_clk_src.clkr, + [DISP_CC_MDSS_BYTE0_CLK] = &disp_cc_mdss_byte0_clk.clkr, + [DISP_CC_MDSS_BYTE0_CLK_SRC] = &disp_cc_mdss_byte0_clk_src.clkr, + [DISP_CC_MDSS_BYTE0_DIV_CLK_SRC] = &disp_cc_mdss_byte0_div_clk_src.clkr, + [DISP_CC_MDSS_BYTE0_INTF_CLK] = &disp_cc_mdss_byte0_intf_clk.clkr, + [DISP_CC_MDSS_ESC0_CLK] = &disp_cc_mdss_esc0_clk.clkr, + [DISP_CC_MDSS_ESC0_CLK_SRC] = &disp_cc_mdss_esc0_clk_src.clkr, + [DISP_CC_MDSS_MDP_CLK] = &disp_cc_mdss_mdp_clk.clkr, + [DISP_CC_MDSS_MDP_CLK_SRC] = &disp_cc_mdss_mdp_clk_src.clkr, + [DISP_CC_MDSS_MDP_LUT_CLK] = &disp_cc_mdss_mdp_lut_clk.clkr, + [DISP_CC_MDSS_NON_GDSC_AHB_CLK] = &disp_cc_mdss_non_gdsc_ahb_clk.clkr, + [DISP_CC_MDSS_PCLK0_CLK] = &disp_cc_mdss_pclk0_clk.clkr, + [DISP_CC_MDSS_PCLK0_CLK_SRC] = &disp_cc_mdss_pclk0_clk_src.clkr, + [DISP_CC_MDSS_VSYNC_CLK] = &disp_cc_mdss_vsync_clk.clkr, + [DISP_CC_MDSS_VSYNC_CLK_SRC] = &disp_cc_mdss_vsync_clk_src.clkr, + [DISP_CC_PLL0] = &disp_cc_pll0.clkr, + [DISP_CC_SLEEP_CLK_SRC] = &disp_cc_sleep_clk_src.clkr, + [DISP_CC_XO_CLK_SRC] = &disp_cc_xo_clk_src.clkr, +}; + +static struct gdsc *disp_cc_shikra_gdscs[] = { + [DISP_CC_MDSS_CORE_GDSC] = &disp_cc_mdss_core_gdsc, +}; + +static const struct qcom_reset_map disp_cc_shikra_resets[] = { + [DISP_CC_MDSS_CORE_BCR] = { 0x2000 }, + [DISP_CC_MDSS_RSCC_BCR] = { 0x4000 }, +}; + +static struct clk_alpha_pll *disp_cc_shikra_plls[] = { + &disp_cc_pll0, +}; + +static const u32 disp_cc_shikra_critical_cbcrs[] = { + 0x6068, /* DISP_CC_SLEEP_CLK */ + 0x604c, /* DISP_CC_XO_CLK */ +}; + +static const struct regmap_config disp_cc_shikra_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = 0x10000, + .fast_io = true, +}; + +static const struct qcom_cc_driver_data disp_cc_shikra_driver_data = { + .alpha_plls = disp_cc_shikra_plls, + .num_alpha_plls = ARRAY_SIZE(disp_cc_shikra_plls), + .clk_cbcrs = disp_cc_shikra_critical_cbcrs, + .num_clk_cbcrs = ARRAY_SIZE(disp_cc_shikra_critical_cbcrs), +}; + +static const struct qcom_cc_desc disp_cc_shikra_desc = { + .config = &disp_cc_shikra_regmap_config, + .clks = disp_cc_shikra_clocks, + .num_clks = ARRAY_SIZE(disp_cc_shikra_clocks), + .resets = disp_cc_shikra_resets, + .num_resets = ARRAY_SIZE(disp_cc_shikra_resets), + .gdscs = disp_cc_shikra_gdscs, + .num_gdscs = ARRAY_SIZE(disp_cc_shikra_gdscs), + .driver_data = &disp_cc_shikra_driver_data, +}; + +static const struct of_device_id disp_cc_shikra_match_table[] = { + { .compatible = "qcom,shikra-dispcc" }, + { } +}; +MODULE_DEVICE_TABLE(of, disp_cc_shikra_match_table); + +static int disp_cc_shikra_probe(struct platform_device *pdev) +{ + return qcom_cc_probe(pdev, &disp_cc_shikra_desc); +} + +static struct platform_driver disp_cc_shikra_driver = { + .probe = disp_cc_shikra_probe, + .driver = { + .name = "dispcc-shikra", + .of_match_table = disp_cc_shikra_match_table, + }, +}; + +module_platform_driver(disp_cc_shikra_driver); + +MODULE_DESCRIPTION("QTI DISPCC Shikra Driver"); +MODULE_LICENSE("GPL"); -- 2.34.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra 2026-05-13 13:40 ` [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra Imran Shaik @ 2026-05-13 14:01 ` Dmitry Baryshkov 2026-05-13 14:06 ` Dmitry Baryshkov 0 siblings, 1 reply; 15+ messages in thread From: Dmitry Baryshkov @ 2026-05-13 14:01 UTC (permalink / raw) To: Imran Shaik Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, May 13, 2026 at 07:10:38PM +0530, Imran Shaik wrote: > Add a driver for the Display clock controller on Qualcomm Shikra SoC. > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > --- > drivers/clk/qcom/Kconfig | 10 + > drivers/clk/qcom/Makefile | 1 + > drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++++++++++++++++++++ > 3 files changed, 576 insertions(+) > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra 2026-05-13 14:01 ` Dmitry Baryshkov @ 2026-05-13 14:06 ` Dmitry Baryshkov 2026-05-13 14:51 ` Konrad Dybcio 0 siblings, 1 reply; 15+ messages in thread From: Dmitry Baryshkov @ 2026-05-13 14:06 UTC (permalink / raw) To: Imran Shaik Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, May 13, 2026 at 05:01:16PM +0300, Dmitry Baryshkov wrote: > On Wed, May 13, 2026 at 07:10:38PM +0530, Imran Shaik wrote: > > Add a driver for the Display clock controller on Qualcomm Shikra SoC. > > > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > > --- > > drivers/clk/qcom/Kconfig | 10 + > > drivers/clk/qcom/Makefile | 1 + > > drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 576 insertions(+) > > > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> After comparing the files... Can we use dispcc-qcm2290.c instead? It uses clock-names instead of clock-indices, but I think it should be fine to use clock-names as a one-off. -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra 2026-05-13 14:06 ` Dmitry Baryshkov @ 2026-05-13 14:51 ` Konrad Dybcio 2026-05-13 15:08 ` Dmitry Baryshkov 0 siblings, 1 reply; 15+ messages in thread From: Konrad Dybcio @ 2026-05-13 14:51 UTC (permalink / raw) To: Dmitry Baryshkov, Imran Shaik Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On 5/13/26 4:06 PM, Dmitry Baryshkov wrote: > On Wed, May 13, 2026 at 05:01:16PM +0300, Dmitry Baryshkov wrote: >> On Wed, May 13, 2026 at 07:10:38PM +0530, Imran Shaik wrote: >>> Add a driver for the Display clock controller on Qualcomm Shikra SoC. >>> >>> Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> >>> --- >>> drivers/clk/qcom/Kconfig | 10 + >>> drivers/clk/qcom/Makefile | 1 + >>> drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++++++++++++++++++++ >>> 3 files changed, 576 insertions(+) >>> >> >> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > After comparing the files... > > Can we use dispcc-qcm2290.c instead? It uses clock-names instead of > clock-indices, but I think it should be fine to use clock-names as a > one-off. Or we can convert it to use indices, since those are stable for agatti too - the names would remain in the binding, just unused by the driver Konrad ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra 2026-05-13 14:51 ` Konrad Dybcio @ 2026-05-13 15:08 ` Dmitry Baryshkov 2026-05-19 4:04 ` Imran Shaik 0 siblings, 1 reply; 15+ messages in thread From: Dmitry Baryshkov @ 2026-05-13 15:08 UTC (permalink / raw) To: Konrad Dybcio Cc: Imran Shaik, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, May 13, 2026 at 04:51:03PM +0200, Konrad Dybcio wrote: > On 5/13/26 4:06 PM, Dmitry Baryshkov wrote: > > On Wed, May 13, 2026 at 05:01:16PM +0300, Dmitry Baryshkov wrote: > >> On Wed, May 13, 2026 at 07:10:38PM +0530, Imran Shaik wrote: > >>> Add a driver for the Display clock controller on Qualcomm Shikra SoC. > >>> > >>> Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > >>> --- > >>> drivers/clk/qcom/Kconfig | 10 + > >>> drivers/clk/qcom/Makefile | 1 + > >>> drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++++++++++++++++++++ > >>> 3 files changed, 576 insertions(+) > >>> > >> > >> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > > > After comparing the files... > > > > Can we use dispcc-qcm2290.c instead? It uses clock-names instead of > > clock-indices, but I think it should be fine to use clock-names as a > > one-off. > > Or we can convert it to use indices, since those are stable for agatti > too - the names would remain in the binding, just unused by the driver Either is fine for me. -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra 2026-05-13 15:08 ` Dmitry Baryshkov @ 2026-05-19 4:04 ` Imran Shaik 2026-05-20 16:29 ` Dmitry Baryshkov 0 siblings, 1 reply; 15+ messages in thread From: Imran Shaik @ 2026-05-19 4:04 UTC (permalink / raw) To: Dmitry Baryshkov, Konrad Dybcio Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On 13-05-2026 08:38 pm, Dmitry Baryshkov wrote: > On Wed, May 13, 2026 at 04:51:03PM +0200, Konrad Dybcio wrote: >> On 5/13/26 4:06 PM, Dmitry Baryshkov wrote: >>> On Wed, May 13, 2026 at 05:01:16PM +0300, Dmitry Baryshkov wrote: >>>> On Wed, May 13, 2026 at 07:10:38PM +0530, Imran Shaik wrote: >>>>> Add a driver for the Display clock controller on Qualcomm Shikra SoC. >>>>> >>>>> Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> >>>>> --- >>>>> drivers/clk/qcom/Kconfig | 10 + >>>>> drivers/clk/qcom/Makefile | 1 + >>>>> drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++++++++++++++++++++ >>>>> 3 files changed, 576 insertions(+) >>>>> >>>> >>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> >>> >>> After comparing the files... >>> >>> Can we use dispcc-qcm2290.c instead? It uses clock-names instead of >>> clock-indices, but I think it should be fine to use clock-names as a >>> one-off. >> >> Or we can convert it to use indices, since those are stable for agatti >> too - the names would remain in the binding, just unused by the driver > > Either is fine for me. > Hi, In Agatti, apart from the clock-names difference, I see that the AHB/XO clocks are not handled as always-on via the probe and instead rely on pm_clk style handling, whereas Shikra follows the newer pattern by marking required CBCRs as critical during probe. I think that attempting to modify this approach into Agatti may introduce unnecessary complexity. And the Agatti DISPCC doesn't have the DT_DSI1 bindings exposed, and updating this might break the ABI with respect to bindings, and DT. Given these and considering that Agatti is already stable, keeping the Shikra as separate GPUCC/DISPCC drivers is better to avoid the risk of regressions and complexity. Please let know your thoughts on this. Thanks, Imran ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra 2026-05-19 4:04 ` Imran Shaik @ 2026-05-20 16:29 ` Dmitry Baryshkov 2026-05-22 9:09 ` Imran Shaik 0 siblings, 1 reply; 15+ messages in thread From: Dmitry Baryshkov @ 2026-05-20 16:29 UTC (permalink / raw) To: Imran Shaik Cc: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On Tue, May 19, 2026 at 09:34:09AM +0530, Imran Shaik wrote: > > > On 13-05-2026 08:38 pm, Dmitry Baryshkov wrote: > > On Wed, May 13, 2026 at 04:51:03PM +0200, Konrad Dybcio wrote: > > > On 5/13/26 4:06 PM, Dmitry Baryshkov wrote: > > > > On Wed, May 13, 2026 at 05:01:16PM +0300, Dmitry Baryshkov wrote: > > > > > On Wed, May 13, 2026 at 07:10:38PM +0530, Imran Shaik wrote: > > > > > > Add a driver for the Display clock controller on Qualcomm Shikra SoC. > > > > > > > > > > > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > > > > > > --- > > > > > > drivers/clk/qcom/Kconfig | 10 + > > > > > > drivers/clk/qcom/Makefile | 1 + > > > > > > drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++++++++++++++++++++ > > > > > > 3 files changed, 576 insertions(+) > > > > > > > > > > > > > > > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > > > > > > > After comparing the files... > > > > > > > > Can we use dispcc-qcm2290.c instead? It uses clock-names instead of > > > > clock-indices, but I think it should be fine to use clock-names as a > > > > one-off. > > > > > > Or we can convert it to use indices, since those are stable for agatti > > > too - the names would remain in the binding, just unused by the driver > > > > Either is fine for me. > > > > Hi, > > In Agatti, apart from the clock-names difference, I see that the AHB/XO > clocks are not handled as always-on via the probe and instead rely on pm_clk There is no pm_clk handling in Agatti driver. > style handling, whereas Shikra follows the newer pattern by marking required > CBCRs as critical during probe. I think that attempting to modify this > approach into Agatti may introduce unnecessary complexity. Well, you can start by explaining what caused the difference and the result of those differences. > > And the Agatti DISPCC doesn't have the DT_DSI1 bindings exposed, and > updating this might break the ABI with respect to bindings, and DT. You can add Shikra-specific bindings. See how it's handled for other dispcc drivers. > Given these and considering that Agatti is already stable, keeping the > Shikra as separate GPUCC/DISPCC drivers is better to avoid the risk of > regressions and complexity. I think you've provided arguments for merging two drivers. It would allow us to modernize Agatti driver and also to make sure that both platforms use the well-tested code pattern. -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra 2026-05-20 16:29 ` Dmitry Baryshkov @ 2026-05-22 9:09 ` Imran Shaik 2026-05-23 10:04 ` Dmitry Baryshkov 0 siblings, 1 reply; 15+ messages in thread From: Imran Shaik @ 2026-05-22 9:09 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On 20-05-2026 09:59 pm, Dmitry Baryshkov wrote: > On Tue, May 19, 2026 at 09:34:09AM +0530, Imran Shaik wrote: >> >> >> On 13-05-2026 08:38 pm, Dmitry Baryshkov wrote: >>> On Wed, May 13, 2026 at 04:51:03PM +0200, Konrad Dybcio wrote: >>>> On 5/13/26 4:06 PM, Dmitry Baryshkov wrote: >>>>> On Wed, May 13, 2026 at 05:01:16PM +0300, Dmitry Baryshkov wrote: >>>>>> On Wed, May 13, 2026 at 07:10:38PM +0530, Imran Shaik wrote: >>>>>>> Add a driver for the Display clock controller on Qualcomm Shikra SoC. >>>>>>> >>>>>>> Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> >>>>>>> --- >>>>>>> drivers/clk/qcom/Kconfig | 10 + >>>>>>> drivers/clk/qcom/Makefile | 1 + >>>>>>> drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++++++++++++++++++++ >>>>>>> 3 files changed, 576 insertions(+) >>>>>>> >>>>>> >>>>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> >>>>> >>>>> After comparing the files... >>>>> >>>>> Can we use dispcc-qcm2290.c instead? It uses clock-names instead of >>>>> clock-indices, but I think it should be fine to use clock-names as a >>>>> one-off. >>>> >>>> Or we can convert it to use indices, since those are stable for agatti >>>> too - the names would remain in the binding, just unused by the driver >>> >>> Either is fine for me. >>> >> >> Hi, >> >> In Agatti, apart from the clock-names difference, I see that the AHB/XO >> clocks are not handled as always-on via the probe and instead rely on pm_clk > > There is no pm_clk handling in Agatti driver. > >> style handling, whereas Shikra follows the newer pattern by marking required >> CBCRs as critical during probe. I think that attempting to modify this >> approach into Agatti may introduce unnecessary complexity. > > Well, you can start by explaining what caused the difference and the > result of those differences. > >> >> And the Agatti DISPCC doesn't have the DT_DSI1 bindings exposed, and >> updating this might break the ABI with respect to bindings, and DT. > > You can add Shikra-specific bindings. See how it's handled for other > dispcc drivers. > >> Given these and considering that Agatti is already stable, keeping the >> Shikra as separate GPUCC/DISPCC drivers is better to avoid the risk of >> regressions and complexity. > > I think you've provided arguments for merging two drivers. It would > allow us to modernize Agatti driver and also to make sure that both > platforms use the well-tested code pattern. > Sure Dmitry, but we would like to proceed with Shikra as-is now since it already follows the latest upstream conventions, and will handle Agatti modernization as a follow-up series to align and reuse Shikra drivers. Thanks, Imran ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra 2026-05-22 9:09 ` Imran Shaik @ 2026-05-23 10:04 ` Dmitry Baryshkov 0 siblings, 0 replies; 15+ messages in thread From: Dmitry Baryshkov @ 2026-05-23 10:04 UTC (permalink / raw) To: Imran Shaik Cc: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On Fri, May 22, 2026 at 02:39:01PM +0530, Imran Shaik wrote: > > > On 20-05-2026 09:59 pm, Dmitry Baryshkov wrote: > > On Tue, May 19, 2026 at 09:34:09AM +0530, Imran Shaik wrote: > > > > > > > > > On 13-05-2026 08:38 pm, Dmitry Baryshkov wrote: > > > > On Wed, May 13, 2026 at 04:51:03PM +0200, Konrad Dybcio wrote: > > > > > On 5/13/26 4:06 PM, Dmitry Baryshkov wrote: > > > > > > On Wed, May 13, 2026 at 05:01:16PM +0300, Dmitry Baryshkov wrote: > > > > > > > On Wed, May 13, 2026 at 07:10:38PM +0530, Imran Shaik wrote: > > > > > > > > Add a driver for the Display clock controller on Qualcomm Shikra SoC. > > > > > > > > > > > > > > > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > > > > > > > > --- > > > > > > > > drivers/clk/qcom/Kconfig | 10 + > > > > > > > > drivers/clk/qcom/Makefile | 1 + > > > > > > > > drivers/clk/qcom/dispcc-shikra.c | 565 +++++++++++++++++++++++++++++++++++++++ > > > > > > > > 3 files changed, 576 insertions(+) > > > > > > > > > > > > > > > > > > > > > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > > > > > > > > > > > After comparing the files... > > > > > > > > > > > > Can we use dispcc-qcm2290.c instead? It uses clock-names instead of > > > > > > clock-indices, but I think it should be fine to use clock-names as a > > > > > > one-off. > > > > > > > > > > Or we can convert it to use indices, since those are stable for agatti > > > > > too - the names would remain in the binding, just unused by the driver > > > > > > > > Either is fine for me. > > > > > > > > > > Hi, > > > > > > In Agatti, apart from the clock-names difference, I see that the AHB/XO > > > clocks are not handled as always-on via the probe and instead rely on pm_clk > > > > There is no pm_clk handling in Agatti driver. > > > > > style handling, whereas Shikra follows the newer pattern by marking required > > > CBCRs as critical during probe. I think that attempting to modify this > > > approach into Agatti may introduce unnecessary complexity. > > > > Well, you can start by explaining what caused the difference and the > > result of those differences. > > > > > > > > And the Agatti DISPCC doesn't have the DT_DSI1 bindings exposed, and > > > updating this might break the ABI with respect to bindings, and DT. > > > > You can add Shikra-specific bindings. See how it's handled for other > > dispcc drivers. > > > > > Given these and considering that Agatti is already stable, keeping the > > > Shikra as separate GPUCC/DISPCC drivers is better to avoid the risk of > > > regressions and complexity. > > > > I think you've provided arguments for merging two drivers. It would > > allow us to modernize Agatti driver and also to make sure that both > > platforms use the well-tested code pattern. > > > > Sure Dmitry, but we would like to proceed with Shikra as-is now since it > already follows the latest upstream conventions, and will handle Agatti > modernization as a follow-up series to align and reuse Shikra drivers. Having two drivers for the (almost) same hw is a bad idea. Please either refresh Agatti driver to follow the conventions and then add Shikra support or add Shikra into the existing driver and then update it to follow the standards. "we would like to proceed" is not a technical argument, it's you trying to override the review for the managerial reasons, which don't apply upstream. -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 4/4] clk: qcom: Add support for GPU Clock Controller on Shikra 2026-05-13 13:40 [PATCH 0/4] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik ` (2 preceding siblings ...) 2026-05-13 13:40 ` [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra Imran Shaik @ 2026-05-13 13:40 ` Imran Shaik 2026-05-13 14:11 ` Dmitry Baryshkov 3 siblings, 1 reply; 15+ messages in thread From: Imran Shaik @ 2026-05-13 13:40 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel, Imran Shaik Add a driver for the GPU clock controller on Qualcomm Shikra SoC. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> --- drivers/clk/qcom/Kconfig | 10 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gpucc-shikra.c | 406 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 417 insertions(+) diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index 78efe494aaeaeefa9da917c47960cfec18259af7..a12cef1c4540078575e4baa2395c0d058303a8eb 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -175,6 +175,16 @@ config CLK_SHIKRA_GCC Say Y if you want to use multimedia devices or peripheral devices such as Camera, Video, UART, SPI, I2C, USB, SD/eMMC etc. +config CLK_SHIKRA_GPUCC + tristate "Shikra Graphics Clock Controller" + depends on ARM64 || COMPILE_TEST + select CLK_SHIKRA_GCC + default m if ARCH_QCOM + help + Support for the graphics clock controller on Qualcomm Shikra SoCs. + Say Y if you want to support graphics controller devices and + functionality such as 3D graphics. + config CLK_X1E80100_CAMCC tristate "X1E80100 Camera Clock Controller" depends on ARM64 || COMPILE_TEST diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile index ec4e79614348a23089454b5a20c3dc0abbaa0350..12eaa5b02e45c20392d9494a5681f45d0deb43dd 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -39,6 +39,7 @@ obj-$(CONFIG_CLK_NORD_GCC) += gcc-nord.o negcc-nord.o nwgcc-nord.o segcc-nord.o obj-$(CONFIG_CLK_NORD_TCSRCC) += tcsrcc-nord.o obj-$(CONFIG_CLK_SHIKRA_DISPCC) += dispcc-shikra.o obj-$(CONFIG_CLK_SHIKRA_GCC) += gcc-shikra.o +obj-$(CONFIG_CLK_SHIKRA_GPUCC) += gpucc-shikra.o obj-$(CONFIG_CLK_X1E80100_CAMCC) += camcc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_DISPCC) += dispcc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_GCC) += gcc-x1e80100.o diff --git a/drivers/clk/qcom/gpucc-shikra.c b/drivers/clk/qcom/gpucc-shikra.c new file mode 100644 index 0000000000000000000000000000000000000000..1ff61a51cbad10602c3f1a6fa18ca03acd394e31 --- /dev/null +++ b/drivers/clk/qcom/gpucc-shikra.c @@ -0,0 +1,406 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#include <linux/clk-provider.h> +#include <linux/mod_devicetable.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> + +#include <dt-bindings/clock/qcom,shikra-gpucc.h> + +#include "clk-alpha-pll.h" +#include "clk-branch.h" +#include "clk-pll.h" +#include "clk-rcg.h" +#include "clk-regmap.h" +#include "clk-regmap-divider.h" +#include "clk-regmap-mux.h" +#include "common.h" +#include "gdsc.h" +#include "reset.h" + +enum { + DT_BI_TCXO, + DT_GPLL0_OUT_MAIN, + DT_GPLL0_OUT_MAIN_DIV, +}; + +enum { + P_BI_TCXO, + P_GPLL0_OUT_MAIN, + P_GPLL0_OUT_MAIN_DIV, + P_GPU_CC_PLL0_2X_DIV_CLK_SRC, + P_GPU_CC_PLL0_OUT_AUX, + P_GPU_CC_PLL0_OUT_AUX2, + P_GPU_CC_PLL0_OUT_MAIN, +}; + +static const struct pll_vco huayra_vco[] = { + { 600000000, 3300000000, 0 }, + { 600000000, 2200000000, 1 }, +}; + +/* 710.4 MHz Configuration */ +static const struct alpha_pll_config gpu_cc_pll0_config = { + .l = 0x25, + .alpha = 0x0, + .config_ctl_val = 0x200d4828, + .config_ctl_hi_val = 0x6, + .config_ctl_hi1_val = 0x00000000, + .test_ctl_val = 0x1c000000, + .test_ctl_hi_val = 0x00004000, + .test_ctl_hi1_val = 0x00000000, + .user_ctl_val = 0xf, +}; + +static struct clk_alpha_pll gpu_cc_pll0 = { + .offset = 0x0, + .config = &gpu_cc_pll0_config, + .vco_table = huayra_vco, + .num_vco = ARRAY_SIZE(huayra_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA_2290], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_pll0", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_huayra_ops, + }, + }, +}; + +static const struct parent_map gpu_cc_parent_map_0[] = { + { P_BI_TCXO, 0 }, + { P_GPU_CC_PLL0_OUT_MAIN, 1 }, + { P_GPLL0_OUT_MAIN, 5 }, + { P_GPLL0_OUT_MAIN_DIV, 6 }, +}; + +static const struct clk_parent_data gpu_cc_parent_data_0[] = { + { .index = DT_BI_TCXO }, + { .hw = &gpu_cc_pll0.clkr.hw }, + { .index = DT_GPLL0_OUT_MAIN }, + { .index = DT_GPLL0_OUT_MAIN_DIV }, +}; + +static const struct parent_map gpu_cc_parent_map_1[] = { + { P_BI_TCXO, 0 }, + { P_GPU_CC_PLL0_2X_DIV_CLK_SRC, 1 }, + { P_GPU_CC_PLL0_OUT_AUX2, 2 }, + { P_GPU_CC_PLL0_OUT_AUX, 3 }, + { P_GPLL0_OUT_MAIN, 5 }, +}; + +static const struct clk_parent_data gpu_cc_parent_data_1[] = { + { .index = DT_BI_TCXO }, + { .hw = &gpu_cc_pll0.clkr.hw }, + { .hw = &gpu_cc_pll0.clkr.hw }, + { .hw = &gpu_cc_pll0.clkr.hw }, + { .index = DT_GPLL0_OUT_MAIN }, +}; + +static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = { + F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0), + { } +}; + +static struct clk_rcg2 gpu_cc_gmu_clk_src = { + .cmd_rcgr = 0x1120, + .mnd_width = 0, + .hid_width = 5, + .parent_map = gpu_cc_parent_map_0, + .freq_tbl = ftbl_gpu_cc_gmu_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_gmu_clk_src", + .parent_data = gpu_cc_parent_data_0, + .num_parents = ARRAY_SIZE(gpu_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_gpu_cc_gx_gfx3d_clk_src[] = { + F(355200000, P_GPU_CC_PLL0_OUT_AUX, 2, 0, 0), + F(537600000, P_GPU_CC_PLL0_OUT_AUX, 2, 0, 0), + F(672000000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + F(844800000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + F(921600000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + F(1017600000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + F(1142400000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + { } +}; + +static struct clk_rcg2 gpu_cc_gx_gfx3d_clk_src = { + .cmd_rcgr = 0x101c, + .mnd_width = 0, + .hid_width = 5, + .parent_map = gpu_cc_parent_map_1, + .freq_tbl = ftbl_gpu_cc_gx_gfx3d_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_gx_gfx3d_clk_src", + .parent_data = gpu_cc_parent_data_1, + .num_parents = ARRAY_SIZE(gpu_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_branch gpu_cc_crc_ahb_clk = { + .halt_reg = 0x107c, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x107c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_crc_ahb_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cx_gfx3d_clk = { + .halt_reg = 0x10a4, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x10a4, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_cx_gfx3d_clk", + .parent_hws = (const struct clk_hw*[]) { + &gpu_cc_gx_gfx3d_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cx_gfx3d_slv_clk = { + .halt_reg = 0x10a8, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x10a8, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_cx_gfx3d_slv_clk", + .parent_hws = (const struct clk_hw*[]) { + &gpu_cc_gx_gfx3d_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cx_gmu_clk = { + .halt_reg = 0x1098, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1098, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_cx_gmu_clk", + .parent_hws = (const struct clk_hw*[]) { + &gpu_cc_gmu_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cx_snoc_dvm_clk = { + .halt_reg = 0x108c, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x108c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_cx_snoc_dvm_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cxo_clk = { + .halt_reg = 0x109c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x109c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_cxo_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_gpu_smmu_vote_clk = { + .halt_reg = 0x5000, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x5000, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_gpu_smmu_vote_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_gx_gfx3d_clk = { + .halt_reg = 0x1054, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x1054, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_gx_gfx3d_clk", + .parent_hws = (const struct clk_hw*[]) { + &gpu_cc_gx_gfx3d_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_sleep_clk = { + .halt_reg = 0x1090, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x1090, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gpu_cc_sleep_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct gdsc gpu_cc_cx_gdsc = { + .gdscr = 0x106c, + .gds_hw_ctrl = 0x1540, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0x2, + .pd = { + .name = "gpu_cc_cx_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .flags = RETAIN_FF_ENABLE | VOTABLE, +}; + +static struct gdsc gpu_cc_gx_gdsc = { + .gdscr = 0x100c, + .clamp_io_ctrl = 0x1508, + .resets = (unsigned int []){ GPU_CC_GX_BCR }, + .reset_count = 1, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0x2, + .pd = { + .name = "gpu_cc_gx_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | SW_RESET | CLAMP_IO | AON_RESET, +}; + +static struct clk_regmap *gpu_cc_shikra_clocks[] = { + [GPU_CC_CRC_AHB_CLK] = &gpu_cc_crc_ahb_clk.clkr, + [GPU_CC_CX_GFX3D_CLK] = &gpu_cc_cx_gfx3d_clk.clkr, + [GPU_CC_CX_GFX3D_SLV_CLK] = &gpu_cc_cx_gfx3d_slv_clk.clkr, + [GPU_CC_CX_GMU_CLK] = &gpu_cc_cx_gmu_clk.clkr, + [GPU_CC_CX_SNOC_DVM_CLK] = &gpu_cc_cx_snoc_dvm_clk.clkr, + [GPU_CC_CXO_CLK] = &gpu_cc_cxo_clk.clkr, + [GPU_CC_GMU_CLK_SRC] = &gpu_cc_gmu_clk_src.clkr, + [GPU_CC_GPU_SMMU_VOTE_CLK] = &gpu_cc_gpu_smmu_vote_clk.clkr, + [GPU_CC_GX_GFX3D_CLK] = &gpu_cc_gx_gfx3d_clk.clkr, + [GPU_CC_GX_GFX3D_CLK_SRC] = &gpu_cc_gx_gfx3d_clk_src.clkr, + [GPU_CC_PLL0] = &gpu_cc_pll0.clkr, + [GPU_CC_SLEEP_CLK] = &gpu_cc_sleep_clk.clkr, +}; + +static struct gdsc *gpu_cc_shikra_gdscs[] = { + [GPU_CC_CX_GDSC] = &gpu_cc_cx_gdsc, + [GPU_CC_GX_GDSC] = &gpu_cc_gx_gdsc, +}; + +static const struct qcom_reset_map gpu_cc_shikra_resets[] = { + [GPU_CC_CX_BCR] = { 0x1068 }, + [GPU_CC_GFX3D_AON_BCR] = { 0x10a0 }, + [GPU_CC_GMU_BCR] = { 0x111c }, + [GPU_CC_GX_BCR] = { 0x1008 }, + [GPU_CC_XO_BCR] = { 0x1000 }, +}; + +static struct clk_alpha_pll *gpu_cc_shikra_plls[] = { + &gpu_cc_pll0, +}; + +static const u32 gpu_cc_shikra_critical_cbcrs[] = { + 0x1078, /* GPU_CC_AHB_CLK */ + 0x1004, /* GPU_CC_CXO_AON_CLK */ + 0x1060, /* GPU_CC_GX_CXO_CLK */ +}; + +static const struct regmap_config gpu_cc_shikra_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = 0x7008, + .fast_io = true, +}; + +static const struct qcom_cc_driver_data gpu_cc_shikra_driver_data = { + .alpha_plls = gpu_cc_shikra_plls, + .num_alpha_plls = ARRAY_SIZE(gpu_cc_shikra_plls), + .clk_cbcrs = gpu_cc_shikra_critical_cbcrs, + .num_clk_cbcrs = ARRAY_SIZE(gpu_cc_shikra_critical_cbcrs), +}; + +static const struct qcom_cc_desc gpu_cc_shikra_desc = { + .config = &gpu_cc_shikra_regmap_config, + .clks = gpu_cc_shikra_clocks, + .num_clks = ARRAY_SIZE(gpu_cc_shikra_clocks), + .resets = gpu_cc_shikra_resets, + .num_resets = ARRAY_SIZE(gpu_cc_shikra_resets), + .gdscs = gpu_cc_shikra_gdscs, + .num_gdscs = ARRAY_SIZE(gpu_cc_shikra_gdscs), + .driver_data = &gpu_cc_shikra_driver_data, +}; + +static const struct of_device_id gpu_cc_shikra_match_table[] = { + { .compatible = "qcom,shikra-gpucc" }, + { } +}; +MODULE_DEVICE_TABLE(of, gpu_cc_shikra_match_table); + +static int gpu_cc_shikra_probe(struct platform_device *pdev) +{ + return qcom_cc_probe(pdev, &gpu_cc_shikra_desc); +} + +static struct platform_driver gpu_cc_shikra_driver = { + .probe = gpu_cc_shikra_probe, + .driver = { + .name = "gpucc-shikra", + .of_match_table = gpu_cc_shikra_match_table, + }, +}; + +module_platform_driver(gpu_cc_shikra_driver); + +MODULE_DESCRIPTION("QTI GPUCC Shikra Driver"); +MODULE_LICENSE("GPL"); -- 2.34.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/4] clk: qcom: Add support for GPU Clock Controller on Shikra 2026-05-13 13:40 ` [PATCH 4/4] clk: qcom: Add support for GPU " Imran Shaik @ 2026-05-13 14:11 ` Dmitry Baryshkov 0 siblings, 0 replies; 15+ messages in thread From: Dmitry Baryshkov @ 2026-05-13 14:11 UTC (permalink / raw) To: Imran Shaik Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, May 13, 2026 at 07:10:39PM +0530, Imran Shaik wrote: > Add a driver for the GPU clock controller on Qualcomm Shikra SoC. > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > --- > drivers/clk/qcom/Kconfig | 10 + > drivers/clk/qcom/Makefile | 1 + > drivers/clk/qcom/gpucc-shikra.c | 406 ++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 417 insertions(+) > The same question, can we use the one targeting Aggatti? -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2026-05-30 11:30 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-05-13 13:40 [PATCH 0/4] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik 2026-05-13 13:40 ` [PATCH 1/4] dt-bindings: clock: qcom: Add Shikra Display clock controller Imran Shaik 2026-05-30 11:30 ` Krzysztof Kozlowski 2026-05-13 13:40 ` [PATCH 2/4] dt-bindings: clock: qcom: Add Shikra GPU " Imran Shaik 2026-05-13 13:40 ` [PATCH 3/4] clk: qcom: Add support for Display Clock Controller on Shikra Imran Shaik 2026-05-13 14:01 ` Dmitry Baryshkov 2026-05-13 14:06 ` Dmitry Baryshkov 2026-05-13 14:51 ` Konrad Dybcio 2026-05-13 15:08 ` Dmitry Baryshkov 2026-05-19 4:04 ` Imran Shaik 2026-05-20 16:29 ` Dmitry Baryshkov 2026-05-22 9:09 ` Imran Shaik 2026-05-23 10:04 ` Dmitry Baryshkov 2026-05-13 13:40 ` [PATCH 4/4] clk: qcom: Add support for GPU " Imran Shaik 2026-05-13 14:11 ` Dmitry Baryshkov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®