* [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform
@ 2026-01-27 19:26 Jagadeesh Kona
2026-01-27 19:26 ` [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller Jagadeesh Kona
` (7 more replies)
0 siblings, 8 replies; 35+ messages in thread
From: Jagadeesh Kona @ 2026-01-27 19:26 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona,
Bryan O'Donoghue, Konrad Dybcio
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Jagadeesh Kona, Vladimir Zapolskiy,
Konrad Dybcio
Add support for video and camera clock controllers on
X1P42100 platform.
The purwa(X1P42100) platform includes the hamoa dtsi file
and camcc node is already posted upstream on hamoa(X1E80100)
platform in Bryan's series[1]. Hence included the camcc node
patch[PATCH 06/15] from Bryan's series[1] and extended it for
purwa(X1P42100).
[1]: https://lore.kernel.org/all/20250711-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v7-6-0bc5da82f526@linaro.org/
The camcc node was added in x1e80100.dtsi in above Bryan's series
but moved it to hamoa.dtsi in this series to align as per the latest
changes.
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
---
Bryan O'Donoghue (1):
arm64: dts: qcom: x1e80100: Add CAMCC block definition
Jagadeesh Kona (7):
dt-bindings: clock: qcom: Add X1P42100 video clock controller
dt-bindings: clock: qcom: Add X1P42100 camera clock controller
clk: qcom: videocc-x1p42100: Add support for video clock controller
clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks
clk: qcom: camcc-x1p42100: Add support for camera clock controller
arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa
arm64: defconfig: Enable VIDEOCC and CAMCC drivers on Qualcomm X1P42100
.../bindings/clock/qcom,sm8450-videocc.yaml | 2 +
.../bindings/clock/qcom,x1e80100-camcc.yaml | 1 +
arch/arm64/boot/dts/qcom/hamoa.dtsi | 17 +
arch/arm64/boot/dts/qcom/purwa.dtsi | 10 +
arch/arm64/configs/defconfig | 2 +
drivers/clk/qcom/Kconfig | 20 +
drivers/clk/qcom/Makefile | 2 +
drivers/clk/qcom/camcc-x1e80100.c | 64 +
drivers/clk/qcom/camcc-x1p42100.c | 2223 ++++++++++++++++++++
drivers/clk/qcom/videocc-x1p42100.c | 585 ++++++
include/dt-bindings/clock/qcom,x1e80100-camcc.h | 3 +
include/dt-bindings/clock/qcom,x1p42100-videocc.h | 21 +
12 files changed, 2950 insertions(+)
---
base-commit: ca3a02fda4da8e2c1cb6baee5d72352e9e2cfaea
change-id: 20260126-purwa-videocc-camcc-00e709474bef
Best regards,
--
Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 35+ messages in thread* [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller 2026-01-27 19:26 [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform Jagadeesh Kona @ 2026-01-27 19:26 ` Jagadeesh Kona 2026-01-27 20:34 ` Dmitry Baryshkov ` (2 more replies) 2026-01-27 19:26 ` [PATCH 2/8] dt-bindings: clock: qcom: Add X1P42100 camera " Jagadeesh Kona ` (6 subsequent siblings) 7 siblings, 3 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-01-27 19:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel, Jagadeesh Kona X1P42100 video clock controller has most clocks same as SM8650, but it also has few additional clocks and resets. Add device tree bindings for the video clock controller on Qualcomm X1P42100 platform by defining these additional clocks and resets on top of SM8650. Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> --- .../bindings/clock/qcom,sm8450-videocc.yaml | 2 ++ include/dt-bindings/clock/qcom,x1p42100-videocc.h | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml index e6beebd6a36ee1ce213a816f60df8a76fa5c44d6..e8bf3fcad3fabc4f3b7e8e692c6c634d1aed9605 100644 --- a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml @@ -30,6 +30,7 @@ properties: - qcom,sm8650-videocc - qcom,sm8750-videocc - qcom,x1e80100-videocc + - qcom,x1p42100-videocc clocks: items: @@ -67,6 +68,7 @@ allOf: - qcom,sm8450-videocc - qcom,sm8550-videocc - qcom,sm8750-videocc + - qcom,x1p42100-videocc then: required: - required-opps diff --git a/include/dt-bindings/clock/qcom,x1p42100-videocc.h b/include/dt-bindings/clock/qcom,x1p42100-videocc.h new file mode 100644 index 0000000000000000000000000000000000000000..eb6c9b7264f8cbced7cfa0001903238ffa168431 --- /dev/null +++ b/include/dt-bindings/clock/qcom,x1p42100-videocc.h @@ -0,0 +1,21 @@ +/* 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_VIDEO_CC_X1P42100_H +#define _DT_BINDINGS_CLK_QCOM_VIDEO_CC_X1P42100_H + +#include "qcom,sm8650-videocc.h" + +/* X1P42100 introduces below new clocks and resets compared to SM8650 */ + +/* VIDEO_CC clocks */ +#define VIDEO_CC_MVS0_BSE_CLK 17 +#define VIDEO_CC_MVS0_BSE_CLK_SRC 18 +#define VIDEO_CC_MVS0_BSE_DIV4_DIV_CLK_SRC 19 + +/* VIDEO_CC resets */ +#define VIDEO_CC_MVS0_BSE_BCR 8 + +#endif -- 2.34.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller 2026-01-27 19:26 ` [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller Jagadeesh Kona @ 2026-01-27 20:34 ` Dmitry Baryshkov 2026-01-28 10:26 ` Konrad Dybcio 2026-02-04 17:44 ` Jagadeesh Kona 2026-01-28 10:08 ` Konrad Dybcio 2026-01-28 11:43 ` Krzysztof Kozlowski 2 siblings, 2 replies; 35+ messages in thread From: Dmitry Baryshkov @ 2026-01-27 20:34 UTC (permalink / raw) To: Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, Jan 28, 2026 at 12:56:32AM +0530, Jagadeesh Kona wrote: > X1P42100 video clock controller has most clocks same as SM8650, > but it also has few additional clocks and resets. Add device > tree bindings for the video clock controller on Qualcomm > X1P42100 platform by defining these additional clocks and resets > on top of SM8650. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- > .../bindings/clock/qcom,sm8450-videocc.yaml | 2 ++ > include/dt-bindings/clock/qcom,x1p42100-videocc.h | 21 +++++++++++++++++++++ > 2 files changed, 23 insertions(+) > > diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml > index e6beebd6a36ee1ce213a816f60df8a76fa5c44d6..e8bf3fcad3fabc4f3b7e8e692c6c634d1aed9605 100644 > --- a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml > +++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml > @@ -30,6 +30,7 @@ properties: > - qcom,sm8650-videocc > - qcom,sm8750-videocc > - qcom,x1e80100-videocc > + - qcom,x1p42100-videocc > > clocks: > items: > @@ -67,6 +68,7 @@ allOf: > - qcom,sm8450-videocc > - qcom,sm8550-videocc > - qcom,sm8750-videocc > + - qcom,x1p42100-videocc > then: > required: > - required-opps > diff --git a/include/dt-bindings/clock/qcom,x1p42100-videocc.h b/include/dt-bindings/clock/qcom,x1p42100-videocc.h > new file mode 100644 > index 0000000000000000000000000000000000000000..eb6c9b7264f8cbced7cfa0001903238ffa168431 > --- /dev/null > +++ b/include/dt-bindings/clock/qcom,x1p42100-videocc.h > @@ -0,0 +1,21 @@ > +/* 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_VIDEO_CC_X1P42100_H > +#define _DT_BINDINGS_CLK_QCOM_VIDEO_CC_X1P42100_H > + > +#include "qcom,sm8650-videocc.h" > + > +/* X1P42100 introduces below new clocks and resets compared to SM8650 */ And then someone introduces new clocks or resets into SM8650 bindings and this gets busted. Please extend the existing header. > + > +/* VIDEO_CC clocks */ > +#define VIDEO_CC_MVS0_BSE_CLK 17 > +#define VIDEO_CC_MVS0_BSE_CLK_SRC 18 > +#define VIDEO_CC_MVS0_BSE_DIV4_DIV_CLK_SRC 19 > + > +/* VIDEO_CC resets */ > +#define VIDEO_CC_MVS0_BSE_BCR 8 > + > +#endif > > -- > 2.34.1 > -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller 2026-01-27 20:34 ` Dmitry Baryshkov @ 2026-01-28 10:26 ` Konrad Dybcio 2026-02-04 17:44 ` Jagadeesh Kona 1 sibling, 0 replies; 35+ messages in thread From: Konrad Dybcio @ 2026-01-28 10:26 UTC (permalink / raw) To: Dmitry Baryshkov, Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/27/26 9:34 PM, Dmitry Baryshkov wrote: > On Wed, Jan 28, 2026 at 12:56:32AM +0530, Jagadeesh Kona wrote: >> X1P42100 video clock controller has most clocks same as SM8650, >> but it also has few additional clocks and resets. Add device >> tree bindings for the video clock controller on Qualcomm >> X1P42100 platform by defining these additional clocks and resets >> on top of SM8650. >> >> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> >> --- >> .../bindings/clock/qcom,sm8450-videocc.yaml | 2 ++ >> include/dt-bindings/clock/qcom,x1p42100-videocc.h | 21 +++++++++++++++++++++ >> 2 files changed, 23 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml >> index e6beebd6a36ee1ce213a816f60df8a76fa5c44d6..e8bf3fcad3fabc4f3b7e8e692c6c634d1aed9605 100644 >> --- a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml >> +++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml >> @@ -30,6 +30,7 @@ properties: >> - qcom,sm8650-videocc >> - qcom,sm8750-videocc >> - qcom,x1e80100-videocc >> + - qcom,x1p42100-videocc >> >> clocks: >> items: >> @@ -67,6 +68,7 @@ allOf: >> - qcom,sm8450-videocc >> - qcom,sm8550-videocc >> - qcom,sm8750-videocc >> + - qcom,x1p42100-videocc >> then: >> required: >> - required-opps >> diff --git a/include/dt-bindings/clock/qcom,x1p42100-videocc.h b/include/dt-bindings/clock/qcom,x1p42100-videocc.h >> new file mode 100644 >> index 0000000000000000000000000000000000000000..eb6c9b7264f8cbced7cfa0001903238ffa168431 >> --- /dev/null >> +++ b/include/dt-bindings/clock/qcom,x1p42100-videocc.h >> @@ -0,0 +1,21 @@ >> +/* 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_VIDEO_CC_X1P42100_H >> +#define _DT_BINDINGS_CLK_QCOM_VIDEO_CC_X1P42100_H >> + >> +#include "qcom,sm8650-videocc.h" >> + >> +/* X1P42100 introduces below new clocks and resets compared to SM8650 */ > > And then someone introduces new clocks or resets into SM8650 bindings > and this gets busted. Please extend the existing header. This is funny.. $ rg sm8450-videocc.h arch/ -l arch/arm64/boot/dts/qcom/hamoa.dtsi arch/arm64/boot/dts/qcom/sm8550.dtsi arch/arm64/boot/dts/qcom/sm8450.dtsi $ rg sm8450-videocc.h drivers/ -l drivers/clk/qcom/videocc-sm8450.c hmm! :) Checking further, we have videocc-sm8550.c catering: { .compatible = "qcom,sm8550-videocc" }, { .compatible = "qcom,sm8650-videocc" }, { .compatible = "qcom,x1e80100-videocc" }, and including qcom,sm8*6*50-videocc.h BUT it doesn't end there qcom,sm8650-videocc.h starts with #include "qcom,sm8450-videocc.h" So it's quite a matryoshka.. Konrad ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller 2026-01-27 20:34 ` Dmitry Baryshkov 2026-01-28 10:26 ` Konrad Dybcio @ 2026-02-04 17:44 ` Jagadeesh Kona 1 sibling, 0 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-02-04 17:44 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/28/2026 2:04 AM, Dmitry Baryshkov wrote: > On Wed, Jan 28, 2026 at 12:56:32AM +0530, Jagadeesh Kona wrote: >> X1P42100 video clock controller has most clocks same as SM8650, >> but it also has few additional clocks and resets. Add device >> tree bindings for the video clock controller on Qualcomm >> X1P42100 platform by defining these additional clocks and resets >> on top of SM8650. >> >> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> >> --- >> .../bindings/clock/qcom,sm8450-videocc.yaml | 2 ++ >> include/dt-bindings/clock/qcom,x1p42100-videocc.h | 21 +++++++++++++++++++++ >> 2 files changed, 23 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml >> index e6beebd6a36ee1ce213a816f60df8a76fa5c44d6..e8bf3fcad3fabc4f3b7e8e692c6c634d1aed9605 100644 >> --- a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml >> +++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml >> @@ -30,6 +30,7 @@ properties: >> - qcom,sm8650-videocc >> - qcom,sm8750-videocc >> - qcom,x1e80100-videocc >> + - qcom,x1p42100-videocc >> >> clocks: >> items: >> @@ -67,6 +68,7 @@ allOf: >> - qcom,sm8450-videocc >> - qcom,sm8550-videocc >> - qcom,sm8750-videocc >> + - qcom,x1p42100-videocc >> then: >> required: >> - required-opps >> diff --git a/include/dt-bindings/clock/qcom,x1p42100-videocc.h b/include/dt-bindings/clock/qcom,x1p42100-videocc.h >> new file mode 100644 >> index 0000000000000000000000000000000000000000..eb6c9b7264f8cbced7cfa0001903238ffa168431 >> --- /dev/null >> +++ b/include/dt-bindings/clock/qcom,x1p42100-videocc.h >> @@ -0,0 +1,21 @@ >> +/* 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_VIDEO_CC_X1P42100_H >> +#define _DT_BINDINGS_CLK_QCOM_VIDEO_CC_X1P42100_H >> + >> +#include "qcom,sm8650-videocc.h" >> + >> +/* X1P42100 introduces below new clocks and resets compared to SM8650 */ > > And then someone introduces new clocks or resets into SM8650 bindings > and this gets busted. Please extend the existing header. > Yes, I will drop this and extend the SM8650 bindings to include the new clocks and BCR. Thanks, Jagadeesh >> + >> +/* VIDEO_CC clocks */ >> +#define VIDEO_CC_MVS0_BSE_CLK 17 >> +#define VIDEO_CC_MVS0_BSE_CLK_SRC 18 >> +#define VIDEO_CC_MVS0_BSE_DIV4_DIV_CLK_SRC 19 >> + >> +/* VIDEO_CC resets */ >> +#define VIDEO_CC_MVS0_BSE_BCR 8 >> + >> +#endif >> >> -- >> 2.34.1 >> > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller 2026-01-27 19:26 ` [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller Jagadeesh Kona 2026-01-27 20:34 ` Dmitry Baryshkov @ 2026-01-28 10:08 ` Konrad Dybcio 2026-02-04 17:48 ` Jagadeesh Kona 2026-01-28 11:43 ` Krzysztof Kozlowski 2 siblings, 1 reply; 35+ messages in thread From: Konrad Dybcio @ 2026-01-28 10:08 UTC (permalink / raw) To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/27/26 8:26 PM, Jagadeesh Kona wrote: > X1P42100 video clock controller has most clocks same as SM8650, > but it also has few additional clocks and resets. Add device > tree bindings for the video clock controller on Qualcomm > X1P42100 platform by defining these additional clocks and resets > on top of SM8650. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- [...] > +#include "qcom,sm8650-videocc.h" > + > +/* X1P42100 introduces below new clocks and resets compared to SM8650 */ > + > +/* VIDEO_CC clocks */ > +#define VIDEO_CC_MVS0_BSE_CLK 17 > +#define VIDEO_CC_MVS0_BSE_CLK_SRC 18 > +#define VIDEO_CC_MVS0_BSE_DIV4_DIV_CLK_SRC 19 I checked a number of platforms and the _BSE clocks are only present on Purwa, without any explanation in the corresponding docs. What are they used for? Konrad ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller 2026-01-28 10:08 ` Konrad Dybcio @ 2026-02-04 17:48 ` Jagadeesh Kona 0 siblings, 0 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-02-04 17:48 UTC (permalink / raw) To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/28/2026 3:38 PM, Konrad Dybcio wrote: > On 1/27/26 8:26 PM, Jagadeesh Kona wrote: >> X1P42100 video clock controller has most clocks same as SM8650, >> but it also has few additional clocks and resets. Add device >> tree bindings for the video clock controller on Qualcomm >> X1P42100 platform by defining these additional clocks and resets >> on top of SM8650. >> >> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> >> --- > > [...] > >> +#include "qcom,sm8650-videocc.h" >> + >> +/* X1P42100 introduces below new clocks and resets compared to SM8650 */ >> + >> +/* VIDEO_CC clocks */ >> +#define VIDEO_CC_MVS0_BSE_CLK 17 >> +#define VIDEO_CC_MVS0_BSE_CLK_SRC 18 >> +#define VIDEO_CC_MVS0_BSE_DIV4_DIV_CLK_SRC 19 > > I checked a number of platforms and the _BSE clocks are only present on > Purwa, without any explanation in the corresponding docs. > > What are they used for? > These clocks are used to drive Bin stream engine, which is a sub-block of video codec HW, which seems to be present only on Purwa. Thanks, Jagadeesh ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller 2026-01-27 19:26 ` [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller Jagadeesh Kona 2026-01-27 20:34 ` Dmitry Baryshkov 2026-01-28 10:08 ` Konrad Dybcio @ 2026-01-28 11:43 ` Krzysztof Kozlowski 2026-02-04 17:46 ` Jagadeesh Kona 2 siblings, 1 reply; 35+ messages in thread From: Krzysztof Kozlowski @ 2026-01-28 11:43 UTC (permalink / raw) To: Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, Jan 28, 2026 at 12:56:32AM +0530, Jagadeesh Kona wrote: > diff --git a/include/dt-bindings/clock/qcom,x1p42100-videocc.h b/include/dt-bindings/clock/qcom,x1p42100-videocc.h > new file mode 100644 > index 0000000000000000000000000000000000000000..eb6c9b7264f8cbced7cfa0001903238ffa168431 > --- /dev/null > +++ b/include/dt-bindings/clock/qcom,x1p42100-videocc.h > @@ -0,0 +1,21 @@ > +/* 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_VIDEO_CC_X1P42100_H > +#define _DT_BINDINGS_CLK_QCOM_VIDEO_CC_X1P42100_H > + > +#include "qcom,sm8650-videocc.h" Don't do this. It's already a mess and was allowed as an exception. Now you grow exception into pattern of chained bindings. > + > +/* X1P42100 introduces below new clocks and resets compared to SM8650 */ Best regards, Krzysztof ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller 2026-01-28 11:43 ` Krzysztof Kozlowski @ 2026-02-04 17:46 ` Jagadeesh Kona 0 siblings, 0 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-02-04 17:46 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/28/2026 5:13 PM, Krzysztof Kozlowski wrote: > On Wed, Jan 28, 2026 at 12:56:32AM +0530, Jagadeesh Kona wrote: >> diff --git a/include/dt-bindings/clock/qcom,x1p42100-videocc.h b/include/dt-bindings/clock/qcom,x1p42100-videocc.h >> new file mode 100644 >> index 0000000000000000000000000000000000000000..eb6c9b7264f8cbced7cfa0001903238ffa168431 >> --- /dev/null >> +++ b/include/dt-bindings/clock/qcom,x1p42100-videocc.h >> @@ -0,0 +1,21 @@ >> +/* 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_VIDEO_CC_X1P42100_H >> +#define _DT_BINDINGS_CLK_QCOM_VIDEO_CC_X1P42100_H >> + >> +#include "qcom,sm8650-videocc.h" > > Don't do this. It's already a mess and was allowed as an exception. Now > you grow exception into pattern of chained bindings. > Yes, will drop this approach and extend the existing SM8650 bindings to include new clocks and BCR. Thanks, Jagadeesh > >> + >> +/* X1P42100 introduces below new clocks and resets compared to SM8650 */ > > Best regards, > Krzysztof > ^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 2/8] dt-bindings: clock: qcom: Add X1P42100 camera clock controller 2026-01-27 19:26 [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform Jagadeesh Kona 2026-01-27 19:26 ` [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller Jagadeesh Kona @ 2026-01-27 19:26 ` Jagadeesh Kona 2026-01-28 11:45 ` Krzysztof Kozlowski 2026-01-27 19:26 ` [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video " Jagadeesh Kona ` (5 subsequent siblings) 7 siblings, 1 reply; 35+ messages in thread From: Jagadeesh Kona @ 2026-01-27 19:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel, Jagadeesh Kona Add X1P42100 camera clock controller support and clock bindings for camera QDSS debug clocks which are applicable for both X1E80100 and X1P42100 platforms. Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> --- Documentation/devicetree/bindings/clock/qcom,x1e80100-camcc.yaml | 1 + include/dt-bindings/clock/qcom,x1e80100-camcc.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,x1e80100-camcc.yaml b/Documentation/devicetree/bindings/clock/qcom,x1e80100-camcc.yaml index 938a2f1ff3fca899b5708101df7f8aa07e943336..b28614186cc098268ab0d8c32b21d9dd9508c9f9 100644 --- a/Documentation/devicetree/bindings/clock/qcom,x1e80100-camcc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,x1e80100-camcc.yaml @@ -23,6 +23,7 @@ properties: compatible: enum: - qcom,x1e80100-camcc + - qcom,x1p42100-camcc reg: maxItems: 1 diff --git a/include/dt-bindings/clock/qcom,x1e80100-camcc.h b/include/dt-bindings/clock/qcom,x1e80100-camcc.h index d72fdfb06a7c716ed2ec376e061e4f0ca35f42c5..06c316022fb0d26ec6243b28477564d97f228c8e 100644 --- a/include/dt-bindings/clock/qcom,x1e80100-camcc.h +++ b/include/dt-bindings/clock/qcom,x1e80100-camcc.h @@ -115,6 +115,9 @@ #define CAM_CC_SLEEP_CLK_SRC 105 #define CAM_CC_SLOW_AHB_CLK_SRC 106 #define CAM_CC_XO_CLK_SRC 107 +#define CAM_CC_QDSS_DEBUG_CLK 108 +#define CAM_CC_QDSS_DEBUG_CLK_SRC 109 +#define CAM_CC_QDSS_DEBUG_XO_CLK 110 /* CAM_CC power domains */ #define CAM_CC_BPS_GDSC 0 -- 2.34.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 2/8] dt-bindings: clock: qcom: Add X1P42100 camera clock controller 2026-01-27 19:26 ` [PATCH 2/8] dt-bindings: clock: qcom: Add X1P42100 camera " Jagadeesh Kona @ 2026-01-28 11:45 ` Krzysztof Kozlowski 0 siblings, 0 replies; 35+ messages in thread From: Krzysztof Kozlowski @ 2026-01-28 11:45 UTC (permalink / raw) To: Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, Jan 28, 2026 at 12:56:33AM +0530, Jagadeesh Kona wrote: > Add X1P42100 camera clock controller support and clock bindings > for camera QDSS debug clocks which are applicable for both > X1E80100 and X1P42100 platforms. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- > Documentation/devicetree/bindings/clock/qcom,x1e80100-camcc.yaml | 1 + > include/dt-bindings/clock/qcom,x1e80100-camcc.h | 3 +++ > 2 files changed, 4 insertions(+) Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video clock controller 2026-01-27 19:26 [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform Jagadeesh Kona 2026-01-27 19:26 ` [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller Jagadeesh Kona 2026-01-27 19:26 ` [PATCH 2/8] dt-bindings: clock: qcom: Add X1P42100 camera " Jagadeesh Kona @ 2026-01-27 19:26 ` Jagadeesh Kona 2026-01-28 7:21 ` Taniya Das 2026-01-29 0:37 ` Dmitry Baryshkov 2026-01-27 19:26 ` [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks Jagadeesh Kona ` (4 subsequent siblings) 7 siblings, 2 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-01-27 19:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel, Jagadeesh Kona Add support for the video clock controller for video clients to be able to request for videocc clocks on X1P42100 platform. Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> --- drivers/clk/qcom/Kconfig | 10 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/videocc-x1p42100.c | 585 ++++++++++++++++++++++++++++++++++++ 3 files changed, 596 insertions(+) diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index a8a86ea6bb7445e396048a5bba23fce8d719281f..b1b1ed70871c1b348985d6f5149152e57637d904 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -155,6 +155,16 @@ config CLK_X1P42100_GPUCC Say Y if you want to support graphics controller devices and functionality such as 3D graphics. +config CLK_X1P42100_VIDEOCC + tristate "X1P42100 Video Clock Controller" + depends on ARM64 || COMPILE_TEST + select CLK_X1E80100_GCC + help + Support for the video clock controller on Qualcomm Technologies, Inc. + X1P42100 devices. + Say Y if you want to support video devices and functionality such as + video encode/decode. + config CLK_QCM2290_GPUCC tristate "QCM2290 Graphics Clock Controller" depends on ARM64 || COMPILE_TEST diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile index 6b0ad8832b55f1914079f15323b8cdd1608ad4c0..b746e5046774259cebe3da8dad1f226561268a8b 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -36,6 +36,7 @@ obj-$(CONFIG_CLK_X1E80100_GCC) += gcc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_GPUCC) += gpucc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_TCSRCC) += tcsrcc-x1e80100.o obj-$(CONFIG_CLK_X1P42100_GPUCC) += gpucc-x1p42100.o +obj-$(CONFIG_CLK_X1P42100_VIDEOCC) += videocc-x1p42100.o obj-$(CONFIG_CLK_QCM2290_GPUCC) += gpucc-qcm2290.o obj-$(CONFIG_IPQ_APSS_PLL) += apss-ipq-pll.o obj-$(CONFIG_IPQ_APSS_5424) += apss-ipq5424.o diff --git a/drivers/clk/qcom/videocc-x1p42100.c b/drivers/clk/qcom/videocc-x1p42100.c new file mode 100644 index 0000000000000000000000000000000000000000..2bb40ac6fcc57e817ce8f0b6727a571c7c072ffa --- /dev/null +++ b/drivers/clk/qcom/videocc-x1p42100.c @@ -0,0 +1,585 @@ +// 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,x1p42100-videocc.h> + +#include "clk-alpha-pll.h" +#include "clk-branch.h" +#include "clk-rcg.h" +#include "clk-regmap.h" +#include "clk-regmap-divider.h" +#include "common.h" +#include "gdsc.h" +#include "reset.h" + +enum { + DT_BI_TCXO, +}; + +enum { + P_BI_TCXO, + P_VIDEO_CC_PLL0_OUT_MAIN, + P_VIDEO_CC_PLL1_OUT_MAIN, +}; + +static const struct pll_vco lucid_ole_vco[] = { + { 249600000, 2300000000, 0 }, +}; + +/* 420.0 MHz Configuration */ +static const struct alpha_pll_config video_cc_pll0_config = { + .l = 0x15, + .alpha = 0xe000, + .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 = 0x00000005, +}; + +static struct clk_alpha_pll video_cc_pll0 = { + .offset = 0x0, + .config = &video_cc_pll0_config, + .vco_table = lucid_ole_vco, + .num_vco = ARRAY_SIZE(lucid_ole_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_pll0", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_lucid_evo_ops, + }, + }, +}; + +/* 1050.0 MHz Configuration */ +static const struct alpha_pll_config video_cc_pll1_config = { + .l = 0x36, + .alpha = 0xb000, + .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 = 0x00000005, +}; + +static struct clk_alpha_pll video_cc_pll1 = { + .offset = 0x1000, + .config = &video_cc_pll1_config, + .vco_table = lucid_ole_vco, + .num_vco = ARRAY_SIZE(lucid_ole_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_pll1", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_lucid_evo_ops, + }, + }, +}; + +static const struct parent_map video_cc_parent_map_0[] = { + { P_BI_TCXO, 0 }, +}; + +static const struct clk_parent_data video_cc_parent_data_0[] = { + { .index = DT_BI_TCXO }, +}; + +static const struct parent_map video_cc_parent_map_1[] = { + { P_BI_TCXO, 0 }, + { P_VIDEO_CC_PLL0_OUT_MAIN, 1 }, +}; + +static const struct clk_parent_data video_cc_parent_data_1[] = { + { .index = DT_BI_TCXO }, + { .hw = &video_cc_pll0.clkr.hw }, +}; + +static const struct parent_map video_cc_parent_map_2[] = { + { P_BI_TCXO, 0 }, + { P_VIDEO_CC_PLL1_OUT_MAIN, 1 }, +}; + +static const struct clk_parent_data video_cc_parent_data_2[] = { + { .index = DT_BI_TCXO }, + { .hw = &video_cc_pll1.clkr.hw }, +}; + +static const struct freq_tbl ftbl_video_cc_mvs0_bse_clk_src[] = { + F(420000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), + F(600000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), + F(670000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), + F(848000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), + F(920000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), + { } +}; + +static struct clk_rcg2 video_cc_mvs0_bse_clk_src = { + .cmd_rcgr = 0x8154, + .mnd_width = 0, + .hid_width = 5, + .parent_map = video_cc_parent_map_1, + .freq_tbl = ftbl_video_cc_mvs0_bse_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs0_bse_clk_src", + .parent_data = video_cc_parent_data_1, + .num_parents = ARRAY_SIZE(video_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_video_cc_mvs0_clk_src[] = { + F(210000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), + F(300000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), + F(335000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), + F(424000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), + F(460000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), + { } +}; + +static struct clk_rcg2 video_cc_mvs0_clk_src = { + .cmd_rcgr = 0x8000, + .mnd_width = 0, + .hid_width = 5, + .parent_map = video_cc_parent_map_1, + .freq_tbl = ftbl_video_cc_mvs0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs0_clk_src", + .parent_data = video_cc_parent_data_1, + .num_parents = ARRAY_SIZE(video_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_video_cc_mvs1_clk_src[] = { + F(1050000000, P_VIDEO_CC_PLL1_OUT_MAIN, 1, 0, 0), + F(1350000000, P_VIDEO_CC_PLL1_OUT_MAIN, 1, 0, 0), + F(1650000000, P_VIDEO_CC_PLL1_OUT_MAIN, 1, 0, 0), + { } +}; + +static struct clk_rcg2 video_cc_mvs1_clk_src = { + .cmd_rcgr = 0x8018, + .mnd_width = 0, + .hid_width = 5, + .parent_map = video_cc_parent_map_2, + .freq_tbl = ftbl_video_cc_mvs1_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs1_clk_src", + .parent_data = video_cc_parent_data_2, + .num_parents = ARRAY_SIZE(video_cc_parent_data_2), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_video_cc_xo_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + { } +}; + +static struct clk_rcg2 video_cc_xo_clk_src = { + .cmd_rcgr = 0x810c, + .mnd_width = 0, + .hid_width = 5, + .parent_map = video_cc_parent_map_0, + .freq_tbl = ftbl_video_cc_xo_clk_src, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "video_cc_xo_clk_src", + .parent_data = video_cc_parent_data_0, + .num_parents = ARRAY_SIZE(video_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_regmap_div video_cc_mvs0_bse_div4_div_clk_src = { + .reg = 0x817c, + .shift = 0, + .width = 4, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs0_bse_div4_div_clk_src", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_mvs0_bse_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_regmap_div_ro_ops, + }, +}; + +static struct clk_regmap_div video_cc_mvs1_div_clk_src = { + .reg = 0x80ec, + .shift = 0, + .width = 4, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs1_div_clk_src", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_mvs1_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_regmap_div_ro_ops, + }, +}; + +static struct clk_regmap_div video_cc_mvs1c_div2_div_clk_src = { + .reg = 0x809c, + .shift = 0, + .width = 4, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs1c_div2_div_clk_src", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_mvs1_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_regmap_div_ro_ops, + }, +}; + +static struct clk_branch video_cc_mvs0_bse_clk = { + .halt_reg = 0x8170, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x8170, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs0_bse_clk", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_mvs0_bse_div4_div_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch video_cc_mvs0_clk = { + .halt_reg = 0x80b8, + .halt_check = BRANCH_HALT_VOTED, + .hwcg_reg = 0x80b8, + .hwcg_bit = 1, + .clkr = { + .enable_reg = 0x80b8, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs0_clk", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_mvs0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch video_cc_mvs0_shift_clk = { + .halt_reg = 0x8128, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x8128, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs0_shift_clk", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_xo_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch video_cc_mvs0c_clk = { + .halt_reg = 0x8064, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x8064, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs0c_clk", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_mvs0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch video_cc_mvs0c_shift_clk = { + .halt_reg = 0x812c, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x812c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs0c_shift_clk", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_xo_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch video_cc_mvs1_clk = { + .halt_reg = 0x80e0, + .halt_check = BRANCH_HALT_VOTED, + .hwcg_reg = 0x80e0, + .hwcg_bit = 1, + .clkr = { + .enable_reg = 0x80e0, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs1_clk", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_mvs1_div_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch video_cc_mvs1_shift_clk = { + .halt_reg = 0x8130, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x8130, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs1_shift_clk", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_xo_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch video_cc_mvs1c_clk = { + .halt_reg = 0x8090, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x8090, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs1c_clk", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_mvs1c_div2_div_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch video_cc_mvs1c_shift_clk = { + .halt_reg = 0x8134, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x8134, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "video_cc_mvs1c_shift_clk", + .parent_hws = (const struct clk_hw*[]) { + &video_cc_xo_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct gdsc video_cc_mvs0c_gdsc = { + .gdscr = 0x804c, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0x6, + .pd = { + .name = "video_cc_mvs0c_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, +}; + +static struct gdsc video_cc_mvs0_gdsc = { + .gdscr = 0x80a4, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0x6, + .pd = { + .name = "video_cc_mvs0_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .parent = &video_cc_mvs0c_gdsc.pd, + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, +}; + +static struct gdsc video_cc_mvs1c_gdsc = { + .gdscr = 0x8078, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, + .pd = { + .name = "video_cc_mvs1c_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, +}; + +static struct gdsc video_cc_mvs1_gdsc = { + .gdscr = 0x80cc, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, + .pd = { + .name = "video_cc_mvs1_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .parent = &video_cc_mvs1c_gdsc.pd, + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, +}; + +static struct clk_regmap *video_cc_x1p42100_clocks[] = { + [VIDEO_CC_MVS0_BSE_CLK] = &video_cc_mvs0_bse_clk.clkr, + [VIDEO_CC_MVS0_BSE_CLK_SRC] = &video_cc_mvs0_bse_clk_src.clkr, + [VIDEO_CC_MVS0_BSE_DIV4_DIV_CLK_SRC] = &video_cc_mvs0_bse_div4_div_clk_src.clkr, + [VIDEO_CC_MVS0_CLK] = &video_cc_mvs0_clk.clkr, + [VIDEO_CC_MVS0_CLK_SRC] = &video_cc_mvs0_clk_src.clkr, + [VIDEO_CC_MVS0_SHIFT_CLK] = &video_cc_mvs0_shift_clk.clkr, + [VIDEO_CC_MVS0C_CLK] = &video_cc_mvs0c_clk.clkr, + [VIDEO_CC_MVS0C_SHIFT_CLK] = &video_cc_mvs0c_shift_clk.clkr, + [VIDEO_CC_MVS1_CLK] = &video_cc_mvs1_clk.clkr, + [VIDEO_CC_MVS1_CLK_SRC] = &video_cc_mvs1_clk_src.clkr, + [VIDEO_CC_MVS1_DIV_CLK_SRC] = &video_cc_mvs1_div_clk_src.clkr, + [VIDEO_CC_MVS1_SHIFT_CLK] = &video_cc_mvs1_shift_clk.clkr, + [VIDEO_CC_MVS1C_CLK] = &video_cc_mvs1c_clk.clkr, + [VIDEO_CC_MVS1C_DIV2_DIV_CLK_SRC] = &video_cc_mvs1c_div2_div_clk_src.clkr, + [VIDEO_CC_MVS1C_SHIFT_CLK] = &video_cc_mvs1c_shift_clk.clkr, + [VIDEO_CC_PLL0] = &video_cc_pll0.clkr, + [VIDEO_CC_PLL1] = &video_cc_pll1.clkr, + [VIDEO_CC_XO_CLK_SRC] = &video_cc_xo_clk_src.clkr, +}; + +static struct gdsc *video_cc_x1p42100_gdscs[] = { + [VIDEO_CC_MVS0_GDSC] = &video_cc_mvs0_gdsc, + [VIDEO_CC_MVS0C_GDSC] = &video_cc_mvs0c_gdsc, + [VIDEO_CC_MVS1_GDSC] = &video_cc_mvs1_gdsc, + [VIDEO_CC_MVS1C_GDSC] = &video_cc_mvs1c_gdsc, +}; + +static const struct qcom_reset_map video_cc_x1p42100_resets[] = { + [CVP_VIDEO_CC_INTERFACE_BCR] = { 0x80f0 }, + [CVP_VIDEO_CC_MVS0_BCR] = { 0x80a0 }, + [CVP_VIDEO_CC_MVS0C_BCR] = { 0x8048 }, + [CVP_VIDEO_CC_MVS1_BCR] = { 0x80c8 }, + [CVP_VIDEO_CC_MVS1C_BCR] = { 0x8074 }, + [VIDEO_CC_MVS0_BSE_BCR] = { 0x816c }, + [VIDEO_CC_MVS0C_CLK_ARES] = { 0x8064, 2 }, + [VIDEO_CC_MVS1C_CLK_ARES] = { 0x8090, 2 }, + [VIDEO_CC_XO_CLK_ARES] = { 0x8124, 2 }, +}; + +static struct clk_alpha_pll *video_cc_x1p42100_plls[] = { + &video_cc_pll0, + &video_cc_pll1, +}; + +static u32 video_cc_x1p42100_critical_cbcrs[] = { + 0x80f4, /* VIDEO_CC_AHB_CLK */ + 0x8150, /* VIDEO_CC_SLEEP_CLK */ + 0x8124, /* VIDEO_CC_XO_CLK */ +}; + +static const struct regmap_config video_cc_x1p42100_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = 0x9f54, + .fast_io = true, +}; + +static struct qcom_cc_driver_data video_cc_x1p42100_driver_data = { + .alpha_plls = video_cc_x1p42100_plls, + .num_alpha_plls = ARRAY_SIZE(video_cc_x1p42100_plls), + .clk_cbcrs = video_cc_x1p42100_critical_cbcrs, + .num_clk_cbcrs = ARRAY_SIZE(video_cc_x1p42100_critical_cbcrs), +}; + +static const struct qcom_cc_desc video_cc_x1p42100_desc = { + .config = &video_cc_x1p42100_regmap_config, + .clks = video_cc_x1p42100_clocks, + .num_clks = ARRAY_SIZE(video_cc_x1p42100_clocks), + .resets = video_cc_x1p42100_resets, + .num_resets = ARRAY_SIZE(video_cc_x1p42100_resets), + .gdscs = video_cc_x1p42100_gdscs, + .num_gdscs = ARRAY_SIZE(video_cc_x1p42100_gdscs), + .use_rpm = true, + .driver_data = &video_cc_x1p42100_driver_data, +}; + +static const struct of_device_id video_cc_x1p42100_match_table[] = { + { .compatible = "qcom,x1p42100-videocc" }, + { } +}; +MODULE_DEVICE_TABLE(of, video_cc_x1p42100_match_table); + +static int video_cc_x1p42100_probe(struct platform_device *pdev) +{ + return qcom_cc_probe(pdev, &video_cc_x1p42100_desc); +} + +static struct platform_driver video_cc_x1p42100_driver = { + .probe = video_cc_x1p42100_probe, + .driver = { + .name = "videocc-x1p42100", + .of_match_table = video_cc_x1p42100_match_table, + }, +}; + +module_platform_driver(video_cc_x1p42100_driver); + +MODULE_DESCRIPTION("QTI VIDEOCC X1P42100 Driver"); +MODULE_LICENSE("GPL"); -- 2.34.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video clock controller 2026-01-27 19:26 ` [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video " Jagadeesh Kona @ 2026-01-28 7:21 ` Taniya Das 2026-01-28 8:18 ` Abel Vesa 2026-01-29 0:37 ` Dmitry Baryshkov 1 sibling, 1 reply; 35+ messages in thread From: Taniya Das @ 2026-01-28 7:21 UTC (permalink / raw) To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/28/2026 12:56 AM, Jagadeesh Kona wrote: > Add support for the video clock controller for video clients to be > able to request for videocc clocks on X1P42100 platform. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- > drivers/clk/qcom/Kconfig | 10 + > drivers/clk/qcom/Makefile | 1 + > drivers/clk/qcom/videocc-x1p42100.c | 585 ++++++++++++++++++++++++++++++++++++ > 3 files changed, 596 insertions(+) > > diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig > index a8a86ea6bb7445e396048a5bba23fce8d719281f..b1b1ed70871c1b348985d6f5149152e57637d904 100644 > --- a/drivers/clk/qcom/Kconfig > +++ b/drivers/clk/qcom/Kconfig > @@ -155,6 +155,16 @@ config CLK_X1P42100_GPUCC > Say Y if you want to support graphics controller devices and > functionality such as 3D graphics. > > +config CLK_X1P42100_VIDEOCC > + tristate "X1P42100 Video Clock Controller" > + depends on ARM64 || COMPILE_TEST > + select CLK_X1E80100_GCC > + help > + Support for the video clock controller on Qualcomm Technologies, Inc. > + X1P42100 devices. > + Say Y if you want to support video devices and functionality such as > + video encode/decode. > + > config CLK_QCM2290_GPUCC > tristate "QCM2290 Graphics Clock Controller" > depends on ARM64 || COMPILE_TEST > diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile > index 6b0ad8832b55f1914079f15323b8cdd1608ad4c0..b746e5046774259cebe3da8dad1f226561268a8b 100644 > --- a/drivers/clk/qcom/Makefile > +++ b/drivers/clk/qcom/Makefile > @@ -36,6 +36,7 @@ obj-$(CONFIG_CLK_X1E80100_GCC) += gcc-x1e80100.o > obj-$(CONFIG_CLK_X1E80100_GPUCC) += gpucc-x1e80100.o > obj-$(CONFIG_CLK_X1E80100_TCSRCC) += tcsrcc-x1e80100.o > obj-$(CONFIG_CLK_X1P42100_GPUCC) += gpucc-x1p42100.o > +obj-$(CONFIG_CLK_X1P42100_VIDEOCC) += videocc-x1p42100.o > obj-$(CONFIG_CLK_QCM2290_GPUCC) += gpucc-qcm2290.o > obj-$(CONFIG_IPQ_APSS_PLL) += apss-ipq-pll.o > obj-$(CONFIG_IPQ_APSS_5424) += apss-ipq5424.o > diff --git a/drivers/clk/qcom/videocc-x1p42100.c b/drivers/clk/qcom/videocc-x1p42100.c > new file mode 100644 > index 0000000000000000000000000000000000000000..2bb40ac6fcc57e817ce8f0b6727a571c7c072ffa > --- /dev/null > +++ b/drivers/clk/qcom/videocc-x1p42100.c > @@ -0,0 +1,585 @@ > +// 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,x1p42100-videocc.h> > + > +#include "clk-alpha-pll.h" > +#include "clk-branch.h" > +#include "clk-rcg.h" > +#include "clk-regmap.h" > +#include "clk-regmap-divider.h" > +#include "common.h" > +#include "gdsc.h" > +#include "reset.h" > + > +enum { > + DT_BI_TCXO, > +}; > + > +enum { > + P_BI_TCXO, > + P_VIDEO_CC_PLL0_OUT_MAIN, > + P_VIDEO_CC_PLL1_OUT_MAIN, > +}; > + > +static const struct pll_vco lucid_ole_vco[] = { > + { 249600000, 2300000000, 0 }, > +}; > + > +/* 420.0 MHz Configuration */ > +static const struct alpha_pll_config video_cc_pll0_config = { > + .l = 0x15, > + .alpha = 0xe000, > + .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 = 0x00000005, > +}; > + > +static struct clk_alpha_pll video_cc_pll0 = { > + .offset = 0x0, > + .config = &video_cc_pll0_config, > + .vco_table = lucid_ole_vco, > + .num_vco = ARRAY_SIZE(lucid_ole_vco), > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr = { > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_pll0", > + .parent_data = &(const struct clk_parent_data) { > + .index = DT_BI_TCXO, > + }, > + .num_parents = 1, > + .ops = &clk_alpha_pll_lucid_evo_ops, > + }, > + }, > +}; > + > +/* 1050.0 MHz Configuration */ > +static const struct alpha_pll_config video_cc_pll1_config = { > + .l = 0x36, > + .alpha = 0xb000, > + .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 = 0x00000005, > +}; > + > +static struct clk_alpha_pll video_cc_pll1 = { > + .offset = 0x1000, > + .config = &video_cc_pll1_config, > + .vco_table = lucid_ole_vco, > + .num_vco = ARRAY_SIZE(lucid_ole_vco), > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr = { > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_pll1", > + .parent_data = &(const struct clk_parent_data) { > + .index = DT_BI_TCXO, > + }, > + .num_parents = 1, > + .ops = &clk_alpha_pll_lucid_evo_ops, > + }, > + }, > +}; > + > +static const struct parent_map video_cc_parent_map_0[] = { > + { P_BI_TCXO, 0 }, > +}; > + > +static const struct clk_parent_data video_cc_parent_data_0[] = { > + { .index = DT_BI_TCXO }, > +}; > + > +static const struct parent_map video_cc_parent_map_1[] = { > + { P_BI_TCXO, 0 }, > + { P_VIDEO_CC_PLL0_OUT_MAIN, 1 }, > +}; > + > +static const struct clk_parent_data video_cc_parent_data_1[] = { > + { .index = DT_BI_TCXO }, > + { .hw = &video_cc_pll0.clkr.hw }, > +}; > + > +static const struct parent_map video_cc_parent_map_2[] = { > + { P_BI_TCXO, 0 }, > + { P_VIDEO_CC_PLL1_OUT_MAIN, 1 }, > +}; > + > +static const struct clk_parent_data video_cc_parent_data_2[] = { > + { .index = DT_BI_TCXO }, > + { .hw = &video_cc_pll1.clkr.hw }, > +}; > + > +static const struct freq_tbl ftbl_video_cc_mvs0_bse_clk_src[] = { > + F(420000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), > + F(600000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), > + F(670000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), > + F(848000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), > + F(920000000, P_VIDEO_CC_PLL0_OUT_MAIN, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 video_cc_mvs0_bse_clk_src = { > + .cmd_rcgr = 0x8154, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = video_cc_parent_map_1, > + .freq_tbl = ftbl_video_cc_mvs0_bse_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs0_bse_clk_src", > + .parent_data = video_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(video_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_video_cc_mvs0_clk_src[] = { > + F(210000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), > + F(300000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), > + F(335000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), > + F(424000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), > + F(460000000, P_VIDEO_CC_PLL0_OUT_MAIN, 2, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 video_cc_mvs0_clk_src = { > + .cmd_rcgr = 0x8000, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = video_cc_parent_map_1, > + .freq_tbl = ftbl_video_cc_mvs0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs0_clk_src", > + .parent_data = video_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(video_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_video_cc_mvs1_clk_src[] = { > + F(1050000000, P_VIDEO_CC_PLL1_OUT_MAIN, 1, 0, 0), > + F(1350000000, P_VIDEO_CC_PLL1_OUT_MAIN, 1, 0, 0), > + F(1650000000, P_VIDEO_CC_PLL1_OUT_MAIN, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 video_cc_mvs1_clk_src = { > + .cmd_rcgr = 0x8018, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = video_cc_parent_map_2, > + .freq_tbl = ftbl_video_cc_mvs1_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs1_clk_src", > + .parent_data = video_cc_parent_data_2, > + .num_parents = ARRAY_SIZE(video_cc_parent_data_2), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_video_cc_xo_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 video_cc_xo_clk_src = { > + .cmd_rcgr = 0x810c, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = video_cc_parent_map_0, > + .freq_tbl = ftbl_video_cc_xo_clk_src, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "video_cc_xo_clk_src", > + .parent_data = video_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(video_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_regmap_div video_cc_mvs0_bse_div4_div_clk_src = { > + .reg = 0x817c, > + .shift = 0, > + .width = 4, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs0_bse_div4_div_clk_src", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_mvs0_bse_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_regmap_div_ro_ops, > + }, > +}; > + > +static struct clk_regmap_div video_cc_mvs1_div_clk_src = { > + .reg = 0x80ec, > + .shift = 0, > + .width = 4, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs1_div_clk_src", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_mvs1_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_regmap_div_ro_ops, > + }, > +}; > + > +static struct clk_regmap_div video_cc_mvs1c_div2_div_clk_src = { > + .reg = 0x809c, > + .shift = 0, > + .width = 4, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs1c_div2_div_clk_src", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_mvs1_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_regmap_div_ro_ops, > + }, > +}; > + > +static struct clk_branch video_cc_mvs0_bse_clk = { > + .halt_reg = 0x8170, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x8170, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs0_bse_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_mvs0_bse_div4_div_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch video_cc_mvs0_clk = { > + .halt_reg = 0x80b8, > + .halt_check = BRANCH_HALT_VOTED, > + .hwcg_reg = 0x80b8, > + .hwcg_bit = 1, > + .clkr = { > + .enable_reg = 0x80b8, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs0_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_mvs0_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch video_cc_mvs0_shift_clk = { > + .halt_reg = 0x8128, > + .halt_check = BRANCH_HALT_VOTED, > + .clkr = { > + .enable_reg = 0x8128, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs0_shift_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_xo_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch video_cc_mvs0c_clk = { > + .halt_reg = 0x8064, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x8064, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs0c_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_mvs0_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch video_cc_mvs0c_shift_clk = { > + .halt_reg = 0x812c, > + .halt_check = BRANCH_HALT_VOTED, > + .clkr = { > + .enable_reg = 0x812c, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs0c_shift_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_xo_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch video_cc_mvs1_clk = { > + .halt_reg = 0x80e0, > + .halt_check = BRANCH_HALT_VOTED, > + .hwcg_reg = 0x80e0, > + .hwcg_bit = 1, > + .clkr = { > + .enable_reg = 0x80e0, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs1_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_mvs1_div_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch video_cc_mvs1_shift_clk = { > + .halt_reg = 0x8130, > + .halt_check = BRANCH_HALT_VOTED, > + .clkr = { > + .enable_reg = 0x8130, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs1_shift_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_xo_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch video_cc_mvs1c_clk = { > + .halt_reg = 0x8090, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x8090, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs1c_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_mvs1c_div2_div_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch video_cc_mvs1c_shift_clk = { > + .halt_reg = 0x8134, > + .halt_check = BRANCH_HALT_VOTED, > + .clkr = { > + .enable_reg = 0x8134, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "video_cc_mvs1c_shift_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &video_cc_xo_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct gdsc video_cc_mvs0c_gdsc = { > + .gdscr = 0x804c, > + .en_rest_wait_val = 0x2, > + .en_few_wait_val = 0x2, > + .clk_dis_wait_val = 0x6, > + .pd = { > + .name = "video_cc_mvs0c_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, > +}; > + > +static struct gdsc video_cc_mvs0_gdsc = { > + .gdscr = 0x80a4, > + .en_rest_wait_val = 0x2, > + .en_few_wait_val = 0x2, > + .clk_dis_wait_val = 0x6, > + .pd = { > + .name = "video_cc_mvs0_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > + .parent = &video_cc_mvs0c_gdsc.pd, > + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, > +}; > + > +static struct gdsc video_cc_mvs1c_gdsc = { > + .gdscr = 0x8078, > + .en_rest_wait_val = 0x2, > + .en_few_wait_val = 0x2, > + .clk_dis_wait_val = 0xf, > + .pd = { > + .name = "video_cc_mvs1c_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, > +}; > + > +static struct gdsc video_cc_mvs1_gdsc = { > + .gdscr = 0x80cc, > + .en_rest_wait_val = 0x2, > + .en_few_wait_val = 0x2, > + .clk_dis_wait_val = 0xf, > + .pd = { > + .name = "video_cc_mvs1_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > + .parent = &video_cc_mvs1c_gdsc.pd, > + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, > +}; > + > +static struct clk_regmap *video_cc_x1p42100_clocks[] = { > + [VIDEO_CC_MVS0_BSE_CLK] = &video_cc_mvs0_bse_clk.clkr, > + [VIDEO_CC_MVS0_BSE_CLK_SRC] = &video_cc_mvs0_bse_clk_src.clkr, > + [VIDEO_CC_MVS0_BSE_DIV4_DIV_CLK_SRC] = &video_cc_mvs0_bse_div4_div_clk_src.clkr, > + [VIDEO_CC_MVS0_CLK] = &video_cc_mvs0_clk.clkr, > + [VIDEO_CC_MVS0_CLK_SRC] = &video_cc_mvs0_clk_src.clkr, > + [VIDEO_CC_MVS0_SHIFT_CLK] = &video_cc_mvs0_shift_clk.clkr, > + [VIDEO_CC_MVS0C_CLK] = &video_cc_mvs0c_clk.clkr, > + [VIDEO_CC_MVS0C_SHIFT_CLK] = &video_cc_mvs0c_shift_clk.clkr, > + [VIDEO_CC_MVS1_CLK] = &video_cc_mvs1_clk.clkr, > + [VIDEO_CC_MVS1_CLK_SRC] = &video_cc_mvs1_clk_src.clkr, > + [VIDEO_CC_MVS1_DIV_CLK_SRC] = &video_cc_mvs1_div_clk_src.clkr, > + [VIDEO_CC_MVS1_SHIFT_CLK] = &video_cc_mvs1_shift_clk.clkr, > + [VIDEO_CC_MVS1C_CLK] = &video_cc_mvs1c_clk.clkr, > + [VIDEO_CC_MVS1C_DIV2_DIV_CLK_SRC] = &video_cc_mvs1c_div2_div_clk_src.clkr, > + [VIDEO_CC_MVS1C_SHIFT_CLK] = &video_cc_mvs1c_shift_clk.clkr, > + [VIDEO_CC_PLL0] = &video_cc_pll0.clkr, > + [VIDEO_CC_PLL1] = &video_cc_pll1.clkr, > + [VIDEO_CC_XO_CLK_SRC] = &video_cc_xo_clk_src.clkr, > +}; > + > +static struct gdsc *video_cc_x1p42100_gdscs[] = { > + [VIDEO_CC_MVS0_GDSC] = &video_cc_mvs0_gdsc, > + [VIDEO_CC_MVS0C_GDSC] = &video_cc_mvs0c_gdsc, > + [VIDEO_CC_MVS1_GDSC] = &video_cc_mvs1_gdsc, > + [VIDEO_CC_MVS1C_GDSC] = &video_cc_mvs1c_gdsc, > +}; > + > +static const struct qcom_reset_map video_cc_x1p42100_resets[] = { > + [CVP_VIDEO_CC_INTERFACE_BCR] = { 0x80f0 }, > + [CVP_VIDEO_CC_MVS0_BCR] = { 0x80a0 }, > + [CVP_VIDEO_CC_MVS0C_BCR] = { 0x8048 }, > + [CVP_VIDEO_CC_MVS1_BCR] = { 0x80c8 }, > + [CVP_VIDEO_CC_MVS1C_BCR] = { 0x8074 }, > + [VIDEO_CC_MVS0_BSE_BCR] = { 0x816c }, > + [VIDEO_CC_MVS0C_CLK_ARES] = { 0x8064, 2 }, > + [VIDEO_CC_MVS1C_CLK_ARES] = { 0x8090, 2 }, > + [VIDEO_CC_XO_CLK_ARES] = { 0x8124, 2 }, > +}; > + > +static struct clk_alpha_pll *video_cc_x1p42100_plls[] = { > + &video_cc_pll0, > + &video_cc_pll1, > +}; > + > +static u32 video_cc_x1p42100_critical_cbcrs[] = { > + 0x80f4, /* VIDEO_CC_AHB_CLK */ > + 0x8150, /* VIDEO_CC_SLEEP_CLK */ > + 0x8124, /* VIDEO_CC_XO_CLK */ > +}; > + > +static const struct regmap_config video_cc_x1p42100_regmap_config = { > + .reg_bits = 32, > + .reg_stride = 4, > + .val_bits = 32, > + .max_register = 0x9f54, > + .fast_io = true, > +}; > + > +static struct qcom_cc_driver_data video_cc_x1p42100_driver_data = { > + .alpha_plls = video_cc_x1p42100_plls, > + .num_alpha_plls = ARRAY_SIZE(video_cc_x1p42100_plls), > + .clk_cbcrs = video_cc_x1p42100_critical_cbcrs, > + .num_clk_cbcrs = ARRAY_SIZE(video_cc_x1p42100_critical_cbcrs), > +}; > + > +static const struct qcom_cc_desc video_cc_x1p42100_desc = { > + .config = &video_cc_x1p42100_regmap_config, > + .clks = video_cc_x1p42100_clocks, > + .num_clks = ARRAY_SIZE(video_cc_x1p42100_clocks), > + .resets = video_cc_x1p42100_resets, > + .num_resets = ARRAY_SIZE(video_cc_x1p42100_resets), > + .gdscs = video_cc_x1p42100_gdscs, > + .num_gdscs = ARRAY_SIZE(video_cc_x1p42100_gdscs), > + .use_rpm = true, > + .driver_data = &video_cc_x1p42100_driver_data, > +}; > + > +static const struct of_device_id video_cc_x1p42100_match_table[] = { > + { .compatible = "qcom,x1p42100-videocc" }, > + { } > +}; > +MODULE_DEVICE_TABLE(of, video_cc_x1p42100_match_table); > + > +static int video_cc_x1p42100_probe(struct platform_device *pdev) > +{ > + return qcom_cc_probe(pdev, &video_cc_x1p42100_desc); > +} > + > +static struct platform_driver video_cc_x1p42100_driver = { > + .probe = video_cc_x1p42100_probe, > + .driver = { > + .name = "videocc-x1p42100", > + .of_match_table = video_cc_x1p42100_match_table, > + }, > +}; > + > +module_platform_driver(video_cc_x1p42100_driver); > + > +MODULE_DESCRIPTION("QTI VIDEOCC X1P42100 Driver"); > +MODULE_LICENSE("GPL"); > Reviewed-by: Taniya Das <taniya.das@oss.qualcomm.com> -- Thanks, Taniya Das ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video clock controller 2026-01-28 7:21 ` Taniya Das @ 2026-01-28 8:18 ` Abel Vesa 0 siblings, 0 replies; 35+ messages in thread From: Abel Vesa @ 2026-01-28 8:18 UTC (permalink / raw) To: Taniya Das Cc: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, linux-arm-msm, linux-clk, devicetree, linux-kernel On 26-01-28 12:51:30, Taniya Das wrote: > > > On 1/28/2026 12:56 AM, Jagadeesh Kona wrote: > > Add support for the video clock controller for video clients to be > > able to request for videocc clocks on X1P42100 platform. > > > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > > --- > > drivers/clk/qcom/Kconfig | 10 + > > drivers/clk/qcom/Makefile | 1 + > > drivers/clk/qcom/videocc-x1p42100.c | 585 ++++++++++++++++++++++++++++++++++++ > > 3 files changed, 596 insertions(+) > > [...] > > + > > +module_platform_driver(video_cc_x1p42100_driver); > > + > > +MODULE_DESCRIPTION("QTI VIDEOCC X1P42100 Driver"); > > +MODULE_LICENSE("GPL"); > > > > Reviewed-by: Taniya Das <taniya.das@oss.qualcomm.com> Please trim your replies. There is no point in scrolling all the way to the bottom just to see a R-b tag. Thanks, Abel ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video clock controller 2026-01-27 19:26 ` [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video " Jagadeesh Kona 2026-01-28 7:21 ` Taniya Das @ 2026-01-29 0:37 ` Dmitry Baryshkov 2026-02-04 17:46 ` Jagadeesh Kona 1 sibling, 1 reply; 35+ messages in thread From: Dmitry Baryshkov @ 2026-01-29 0:37 UTC (permalink / raw) To: Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, Jan 28, 2026 at 12:56:34AM +0530, Jagadeesh Kona wrote: > Add support for the video clock controller for video clients to be > able to request for videocc clocks on X1P42100 platform. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- > drivers/clk/qcom/Kconfig | 10 + > drivers/clk/qcom/Makefile | 1 + > drivers/clk/qcom/videocc-x1p42100.c | 585 ++++++++++++++++++++++++++++++++++++ > 3 files changed, 596 insertions(+) The videocc driver looks almost like videocc-sm8550.c. Would it be easier to merge them into a single file? -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video clock controller 2026-01-29 0:37 ` Dmitry Baryshkov @ 2026-02-04 17:46 ` Jagadeesh Kona 2026-02-04 19:42 ` Dmitry Baryshkov 0 siblings, 1 reply; 35+ messages in thread From: Jagadeesh Kona @ 2026-02-04 17:46 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/29/2026 6:07 AM, Dmitry Baryshkov wrote: > On Wed, Jan 28, 2026 at 12:56:34AM +0530, Jagadeesh Kona wrote: >> Add support for the video clock controller for video clients to be >> able to request for videocc clocks on X1P42100 platform. >> >> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> >> --- >> drivers/clk/qcom/Kconfig | 10 + >> drivers/clk/qcom/Makefile | 1 + >> drivers/clk/qcom/videocc-x1p42100.c | 585 ++++++++++++++++++++++++++++++++++++ >> 3 files changed, 596 insertions(+) > > The videocc driver looks almost like videocc-sm8550.c. Would it be > easier to merge them into a single file? > There is significant delta, the BSE clocks are newly added and few cdiv clocks are removed. Along with that the frequency tables of most RCG's are also changed, accordingly initial PLL configurations also need to be updated, hence added this as a separate driver. Thanks, Jagadeesh ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video clock controller 2026-02-04 17:46 ` Jagadeesh Kona @ 2026-02-04 19:42 ` Dmitry Baryshkov 0 siblings, 0 replies; 35+ messages in thread From: Dmitry Baryshkov @ 2026-02-04 19:42 UTC (permalink / raw) To: Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, Feb 04, 2026 at 11:16:34PM +0530, Jagadeesh Kona wrote: > > > On 1/29/2026 6:07 AM, Dmitry Baryshkov wrote: > > On Wed, Jan 28, 2026 at 12:56:34AM +0530, Jagadeesh Kona wrote: > >> Add support for the video clock controller for video clients to be > >> able to request for videocc clocks on X1P42100 platform. > >> > >> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > >> --- > >> drivers/clk/qcom/Kconfig | 10 + > >> drivers/clk/qcom/Makefile | 1 + > >> drivers/clk/qcom/videocc-x1p42100.c | 585 ++++++++++++++++++++++++++++++++++++ > >> 3 files changed, 596 insertions(+) > > > > The videocc driver looks almost like videocc-sm8550.c. Would it be > > easier to merge them into a single file? > > > > There is significant delta, the BSE clocks are newly added and few cdiv clocks > are removed. Along with that the frequency tables of most RCG's are also changed, > accordingly initial PLL configurations also need to be updated, hence added this > as a separate driver. Please mention it in the commit message. -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks 2026-01-27 19:26 [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform Jagadeesh Kona ` (2 preceding siblings ...) 2026-01-27 19:26 ` [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video " Jagadeesh Kona @ 2026-01-27 19:26 ` Jagadeesh Kona 2026-01-27 22:26 ` Bryan O'Donoghue ` (2 more replies) 2026-01-27 19:26 ` [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller Jagadeesh Kona ` (3 subsequent siblings) 7 siblings, 3 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-01-27 19:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel, Jagadeesh Kona Add support for camera QDSS debug clocks on X1E80100 platform. Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> --- drivers/clk/qcom/camcc-x1e80100.c | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/drivers/clk/qcom/camcc-x1e80100.c b/drivers/clk/qcom/camcc-x1e80100.c index cbcc1c9fcb341e51272f5595f574f9cb7ef2b52e..7e3fc7aee854eee841176a1330f97dc91af91670 100644 --- a/drivers/clk/qcom/camcc-x1e80100.c +++ b/drivers/clk/qcom/camcc-x1e80100.c @@ -1052,6 +1052,31 @@ static struct clk_rcg2 cam_cc_mclk7_clk_src = { }, }; +static const struct freq_tbl ftbl_cam_cc_qdss_debug_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(60000000, P_CAM_CC_PLL8_OUT_EVEN, 8, 0, 0), + F(75000000, P_CAM_CC_PLL0_OUT_EVEN, 8, 0, 0), + F(150000000, P_CAM_CC_PLL0_OUT_EVEN, 4, 0, 0), + F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_qdss_debug_clk_src = { + .cmd_rcgr = 0x13938, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_qdss_debug_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_qdss_debug_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + static const struct freq_tbl ftbl_cam_cc_sfe_0_clk_src[] = { F(345600000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), F(432000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), @@ -2182,6 +2207,42 @@ static struct clk_branch cam_cc_mclk7_clk = { }, }; +static struct clk_branch cam_cc_qdss_debug_clk = { + .halt_reg = 0x13a64, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13a64, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_qdss_debug_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_qdss_debug_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_qdss_debug_xo_clk = { + .halt_reg = 0x13a68, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13a68, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_qdss_debug_xo_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_xo_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + static struct clk_branch cam_cc_sfe_0_clk = { .halt_reg = 0x133c0, .halt_check = BRANCH_HALT, @@ -2398,6 +2459,9 @@ static struct clk_regmap *cam_cc_x1e80100_clocks[] = { [CAM_CC_PLL6_OUT_EVEN] = &cam_cc_pll6_out_even.clkr, [CAM_CC_PLL8] = &cam_cc_pll8.clkr, [CAM_CC_PLL8_OUT_EVEN] = &cam_cc_pll8_out_even.clkr, + [CAM_CC_QDSS_DEBUG_CLK] = &cam_cc_qdss_debug_clk.clkr, + [CAM_CC_QDSS_DEBUG_CLK_SRC] = &cam_cc_qdss_debug_clk_src.clkr, + [CAM_CC_QDSS_DEBUG_XO_CLK] = &cam_cc_qdss_debug_xo_clk.clkr, [CAM_CC_SFE_0_CLK] = &cam_cc_sfe_0_clk.clkr, [CAM_CC_SFE_0_CLK_SRC] = &cam_cc_sfe_0_clk_src.clkr, [CAM_CC_SFE_0_FAST_AHB_CLK] = &cam_cc_sfe_0_fast_ahb_clk.clkr, -- 2.34.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks 2026-01-27 19:26 ` [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks Jagadeesh Kona @ 2026-01-27 22:26 ` Bryan O'Donoghue 2026-01-28 10:14 ` Konrad Dybcio 2026-01-29 0:38 ` Dmitry Baryshkov 2 siblings, 0 replies; 35+ messages in thread From: Bryan O'Donoghue @ 2026-01-27 22:26 UTC (permalink / raw) To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 27/01/2026 19:26, Jagadeesh Kona wrote: > Add support for camera QDSS debug clocks on X1E80100 platform. > A little more detail here please :) > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- > drivers/clk/qcom/camcc-x1e80100.c | 64 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 64 insertions(+) > > diff --git a/drivers/clk/qcom/camcc-x1e80100.c b/drivers/clk/qcom/camcc-x1e80100.c > index cbcc1c9fcb341e51272f5595f574f9cb7ef2b52e..7e3fc7aee854eee841176a1330f97dc91af91670 100644 > --- a/drivers/clk/qcom/camcc-x1e80100.c > +++ b/drivers/clk/qcom/camcc-x1e80100.c > @@ -1052,6 +1052,31 @@ static struct clk_rcg2 cam_cc_mclk7_clk_src = { > }, > }; > > +static const struct freq_tbl ftbl_cam_cc_qdss_debug_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(60000000, P_CAM_CC_PLL8_OUT_EVEN, 8, 0, 0), > + F(75000000, P_CAM_CC_PLL0_OUT_EVEN, 8, 0, 0), > + F(150000000, P_CAM_CC_PLL0_OUT_EVEN, 4, 0, 0), > + F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_qdss_debug_clk_src = { > + .cmd_rcgr = 0x13938, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_qdss_debug_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_qdss_debug_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > static const struct freq_tbl ftbl_cam_cc_sfe_0_clk_src[] = { > F(345600000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), > F(432000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), > @@ -2182,6 +2207,42 @@ static struct clk_branch cam_cc_mclk7_clk = { > }, > }; > > +static struct clk_branch cam_cc_qdss_debug_clk = { > + .halt_reg = 0x13a64, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13a64, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_qdss_debug_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_qdss_debug_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_qdss_debug_xo_clk = { > + .halt_reg = 0x13a68, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13a68, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_qdss_debug_xo_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_xo_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > static struct clk_branch cam_cc_sfe_0_clk = { > .halt_reg = 0x133c0, > .halt_check = BRANCH_HALT, > @@ -2398,6 +2459,9 @@ static struct clk_regmap *cam_cc_x1e80100_clocks[] = { > [CAM_CC_PLL6_OUT_EVEN] = &cam_cc_pll6_out_even.clkr, > [CAM_CC_PLL8] = &cam_cc_pll8.clkr, > [CAM_CC_PLL8_OUT_EVEN] = &cam_cc_pll8_out_even.clkr, > + [CAM_CC_QDSS_DEBUG_CLK] = &cam_cc_qdss_debug_clk.clkr, > + [CAM_CC_QDSS_DEBUG_CLK_SRC] = &cam_cc_qdss_debug_clk_src.clkr, > + [CAM_CC_QDSS_DEBUG_XO_CLK] = &cam_cc_qdss_debug_xo_clk.clkr, > [CAM_CC_SFE_0_CLK] = &cam_cc_sfe_0_clk.clkr, > [CAM_CC_SFE_0_CLK_SRC] = &cam_cc_sfe_0_clk_src.clkr, > [CAM_CC_SFE_0_FAST_AHB_CLK] = &cam_cc_sfe_0_fast_ahb_clk.clkr, > Once the commit log is fixed. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- bod ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks 2026-01-27 19:26 ` [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks Jagadeesh Kona 2026-01-27 22:26 ` Bryan O'Donoghue @ 2026-01-28 10:14 ` Konrad Dybcio 2026-01-29 0:38 ` Dmitry Baryshkov 2 siblings, 0 replies; 35+ messages in thread From: Konrad Dybcio @ 2026-01-28 10:14 UTC (permalink / raw) To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/27/26 8:26 PM, Jagadeesh Kona wrote: > Add support for camera QDSS debug clocks on X1E80100 platform. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- Fixes: 76126a5129b5 ("clk: qcom: Add camcc clock driver for x1e80100") Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks 2026-01-27 19:26 ` [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks Jagadeesh Kona 2026-01-27 22:26 ` Bryan O'Donoghue 2026-01-28 10:14 ` Konrad Dybcio @ 2026-01-29 0:38 ` Dmitry Baryshkov 2026-02-04 17:47 ` Jagadeesh Kona 2 siblings, 1 reply; 35+ messages in thread From: Dmitry Baryshkov @ 2026-01-29 0:38 UTC (permalink / raw) To: Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, Jan 28, 2026 at 12:56:35AM +0530, Jagadeesh Kona wrote: > Add support for camera QDSS debug clocks on X1E80100 platform. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- > drivers/clk/qcom/camcc-x1e80100.c | 64 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 64 insertions(+) My memory might be wrong, but wasn't there an issue with those clocks being not available by default? -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks 2026-01-29 0:38 ` Dmitry Baryshkov @ 2026-02-04 17:47 ` Jagadeesh Kona 0 siblings, 0 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-02-04 17:47 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/29/2026 6:08 AM, Dmitry Baryshkov wrote: > On Wed, Jan 28, 2026 at 12:56:35AM +0530, Jagadeesh Kona wrote: >> Add support for camera QDSS debug clocks on X1E80100 platform. >> >> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> >> --- >> drivers/clk/qcom/camcc-x1e80100.c | 64 +++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 64 insertions(+) > > My memory might be wrong, but wasn't there an issue with those clocks > being not available by default? > The camera qdss debug clocks are being modelled in all recent chipsets and I think only some specific camera usecases require these clocks. Hence added support for these clocks on Hamoa also. Thanks, Jagadeesh ^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller 2026-01-27 19:26 [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform Jagadeesh Kona ` (3 preceding siblings ...) 2026-01-27 19:26 ` [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks Jagadeesh Kona @ 2026-01-27 19:26 ` Jagadeesh Kona 2026-01-28 4:45 ` Taniya Das ` (2 more replies) 2026-01-27 19:26 ` [PATCH 6/8] arm64: dts: qcom: x1e80100: Add CAMCC block definition Jagadeesh Kona ` (2 subsequent siblings) 7 siblings, 3 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-01-27 19:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel, Jagadeesh Kona Add support for the camera clock controller for camera clients to be able to request for camcc clocks on X1P42100 platform. Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> --- drivers/clk/qcom/Kconfig | 10 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/camcc-x1p42100.c | 2223 +++++++++++++++++++++++++++++++++++++ 3 files changed, 2234 insertions(+) diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index b1b1ed70871c1b348985d6f5149152e57637d904..0fe2e690a104095adc3f218d67852aaaedd852a7 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -146,6 +146,16 @@ config CLK_X1E80100_TCSRCC Support for the TCSR clock controller on X1E80100 devices. Say Y if you want to use peripheral devices such as SD/UFS. +config CLK_X1P42100_CAMCC + tristate "X1P42100 Camera Clock Controller" + depends on ARM64 || COMPILE_TEST + select CLK_X1E80100_GCC + help + Support for the camera clock controller on Qualcomm Technologies, Inc. + X1P42100 devices. + Say Y if you want to support camera devices and camera functionality + such as capturing pictures. + config CLK_X1P42100_GPUCC tristate "X1P42100 Graphics Clock Controller" depends on ARM64 || COMPILE_TEST diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile index b746e5046774259cebe3da8dad1f226561268a8b..2735036df906cd8192fe20bb2a026fca3a457bf9 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -35,6 +35,7 @@ obj-$(CONFIG_CLK_X1E80100_DISPCC) += dispcc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_GCC) += gcc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_GPUCC) += gpucc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_TCSRCC) += tcsrcc-x1e80100.o +obj-$(CONFIG_CLK_X1P42100_CAMCC) += camcc-x1p42100.o obj-$(CONFIG_CLK_X1P42100_GPUCC) += gpucc-x1p42100.o obj-$(CONFIG_CLK_X1P42100_VIDEOCC) += videocc-x1p42100.o obj-$(CONFIG_CLK_QCM2290_GPUCC) += gpucc-qcm2290.o diff --git a/drivers/clk/qcom/camcc-x1p42100.c b/drivers/clk/qcom/camcc-x1p42100.c new file mode 100644 index 0000000000000000000000000000000000000000..c1a61c267919976d2d869fef4cd3659433ad2993 --- /dev/null +++ b/drivers/clk/qcom/camcc-x1p42100.c @@ -0,0 +1,2223 @@ +// 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,x1e80100-camcc.h> + +#include "clk-alpha-pll.h" +#include "clk-branch.h" +#include "clk-rcg.h" +#include "clk-regmap.h" +#include "common.h" +#include "gdsc.h" +#include "reset.h" + +enum { + DT_IFACE, + DT_BI_TCXO, + DT_BI_TCXO_AO, + DT_SLEEP_CLK, +}; + +enum { + P_BI_TCXO, + P_BI_TCXO_AO, + P_CAM_CC_PLL0_OUT_EVEN, + P_CAM_CC_PLL0_OUT_MAIN, + P_CAM_CC_PLL0_OUT_ODD, + P_CAM_CC_PLL1_OUT_EVEN, + P_CAM_CC_PLL2_OUT_EVEN, + P_CAM_CC_PLL2_OUT_MAIN, + P_CAM_CC_PLL3_OUT_EVEN, + P_CAM_CC_PLL6_OUT_EVEN, + P_SLEEP_CLK, +}; + +static const struct pll_vco lucid_ole_vco[] = { + { 249600000, 2300000000, 0 }, +}; + +static const struct pll_vco rivian_ole_vco[] = { + { 777000000, 1285000000, 0 }, +}; + +/* 1200.0 MHz Configuration */ +static const struct alpha_pll_config cam_cc_pll0_config = { + .l = 0x3e, + .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 = 0x00008400, + .user_ctl_hi_val = 0x00000005, +}; + +static struct clk_alpha_pll cam_cc_pll0 = { + .offset = 0x0, + .config = &cam_cc_pll0_config, + .vco_table = lucid_ole_vco, + .num_vco = ARRAY_SIZE(lucid_ole_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll0", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_lucid_evo_ops, + }, + }, +}; + +static const struct clk_div_table post_div_table_cam_cc_pll0_out_even[] = { + { 0x1, 2 }, + { } +}; + +static struct clk_alpha_pll_postdiv cam_cc_pll0_out_even = { + .offset = 0x0, + .post_div_shift = 10, + .post_div_table = post_div_table_cam_cc_pll0_out_even, + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_even), + .width = 4, + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll0_out_even", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_pll0.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, + }, +}; + +static const struct clk_div_table post_div_table_cam_cc_pll0_out_odd[] = { + { 0x2, 3 }, + { } +}; + +static struct clk_alpha_pll_postdiv cam_cc_pll0_out_odd = { + .offset = 0x0, + .post_div_shift = 14, + .post_div_table = post_div_table_cam_cc_pll0_out_odd, + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_odd), + .width = 4, + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll0_out_odd", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_pll0.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, + }, +}; + +/* 728.0 MHz Configuration */ +static const struct alpha_pll_config cam_cc_pll1_config = { + .l = 0x25, + .alpha = 0xeaaa, + .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 = 0x00000400, + .user_ctl_hi_val = 0x00000005, +}; + +static struct clk_alpha_pll cam_cc_pll1 = { + .offset = 0x1000, + .config = &cam_cc_pll1_config, + .vco_table = lucid_ole_vco, + .num_vco = ARRAY_SIZE(lucid_ole_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll1", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_lucid_evo_ops, + }, + }, +}; + +static const struct clk_div_table post_div_table_cam_cc_pll1_out_even[] = { + { 0x1, 2 }, + { } +}; + +static struct clk_alpha_pll_postdiv cam_cc_pll1_out_even = { + .offset = 0x1000, + .post_div_shift = 10, + .post_div_table = post_div_table_cam_cc_pll1_out_even, + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll1_out_even), + .width = 4, + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll1_out_even", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_pll1.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, + }, +}; + +/* 960.0 MHz Configuration */ +static const struct alpha_pll_config cam_cc_pll2_config = { + .l = 0x32, + .alpha = 0x0, + .config_ctl_val = 0x10000030, + .config_ctl_hi_val = 0x80890263, + .config_ctl_hi1_val = 0x00000217, + .user_ctl_val = 0x00000000, + .user_ctl_hi_val = 0x00100000, +}; + +static struct clk_alpha_pll cam_cc_pll2 = { + .offset = 0x2000, + .config = &cam_cc_pll2_config, + .vco_table = rivian_ole_vco, + .num_vco = ARRAY_SIZE(rivian_ole_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll2", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_rivian_evo_ops, + }, + }, +}; + +/* 864.0 MHz Configuration */ +static const struct alpha_pll_config cam_cc_pll3_config = { + .l = 0x2d, + .alpha = 0x0, + .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 = 0x00000400, + .user_ctl_hi_val = 0x00000005, +}; + +static struct clk_alpha_pll cam_cc_pll3 = { + .offset = 0x3000, + .config = &cam_cc_pll3_config, + .vco_table = lucid_ole_vco, + .num_vco = ARRAY_SIZE(lucid_ole_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll3", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_lucid_evo_ops, + }, + }, +}; + +static const struct clk_div_table post_div_table_cam_cc_pll3_out_even[] = { + { 0x1, 2 }, + { } +}; + +static struct clk_alpha_pll_postdiv cam_cc_pll3_out_even = { + .offset = 0x3000, + .post_div_shift = 10, + .post_div_table = post_div_table_cam_cc_pll3_out_even, + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll3_out_even), + .width = 4, + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll3_out_even", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_pll3.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, + }, +}; + +/* 960.0 MHz Configuration */ +static const struct alpha_pll_config cam_cc_pll6_config = { + .l = 0x32, + .alpha = 0x0, + .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 = 0x00000400, + .user_ctl_hi_val = 0x00000005, +}; + +static struct clk_alpha_pll cam_cc_pll6 = { + .offset = 0x6000, + .config = &cam_cc_pll6_config, + .vco_table = lucid_ole_vco, + .num_vco = ARRAY_SIZE(lucid_ole_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll6", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_lucid_evo_ops, + }, + }, +}; + +static const struct clk_div_table post_div_table_cam_cc_pll6_out_even[] = { + { 0x1, 2 }, + { } +}; + +static struct clk_alpha_pll_postdiv cam_cc_pll6_out_even = { + .offset = 0x6000, + .post_div_shift = 10, + .post_div_table = post_div_table_cam_cc_pll6_out_even, + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll6_out_even), + .width = 4, + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_pll6_out_even", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_pll6.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, + }, +}; + +static const struct parent_map cam_cc_parent_map_0[] = { + { P_BI_TCXO, 0 }, + { P_CAM_CC_PLL0_OUT_MAIN, 1 }, + { P_CAM_CC_PLL0_OUT_EVEN, 2 }, + { P_CAM_CC_PLL0_OUT_ODD, 3 }, + { P_CAM_CC_PLL6_OUT_EVEN, 5 }, +}; + +static const struct clk_parent_data cam_cc_parent_data_0[] = { + { .index = DT_BI_TCXO }, + { .hw = &cam_cc_pll0.clkr.hw }, + { .hw = &cam_cc_pll0_out_even.clkr.hw }, + { .hw = &cam_cc_pll0_out_odd.clkr.hw }, + { .hw = &cam_cc_pll6_out_even.clkr.hw }, +}; + +static const struct parent_map cam_cc_parent_map_1[] = { + { P_BI_TCXO, 0 }, + { P_CAM_CC_PLL2_OUT_EVEN, 3 }, + { P_CAM_CC_PLL2_OUT_MAIN, 5 }, +}; + +static const struct clk_parent_data cam_cc_parent_data_1[] = { + { .index = DT_BI_TCXO }, + { .hw = &cam_cc_pll2.clkr.hw }, + { .hw = &cam_cc_pll2.clkr.hw }, +}; + +static const struct parent_map cam_cc_parent_map_2[] = { + { P_BI_TCXO, 0 }, + { P_CAM_CC_PLL3_OUT_EVEN, 6 }, +}; + +static const struct clk_parent_data cam_cc_parent_data_2[] = { + { .index = DT_BI_TCXO }, + { .hw = &cam_cc_pll3_out_even.clkr.hw }, +}; + +static const struct parent_map cam_cc_parent_map_3[] = { + { P_BI_TCXO, 0 }, + { P_CAM_CC_PLL1_OUT_EVEN, 4 }, +}; + +static const struct clk_parent_data cam_cc_parent_data_3[] = { + { .index = DT_BI_TCXO }, + { .hw = &cam_cc_pll1_out_even.clkr.hw }, +}; + +static const struct parent_map cam_cc_parent_map_4[] = { + { P_SLEEP_CLK, 0 }, +}; + +static const struct clk_parent_data cam_cc_parent_data_4[] = { + { .index = DT_SLEEP_CLK }, +}; + +static const struct parent_map cam_cc_parent_map_5[] = { + { P_BI_TCXO, 0 }, +}; + +static const struct clk_parent_data cam_cc_parent_data_5[] = { + { .index = DT_BI_TCXO }, +}; + +static const struct freq_tbl ftbl_cam_cc_bps_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0), + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), + F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_bps_clk_src = { + .cmd_rcgr = 0x10278, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_bps_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_bps_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_camnoc_axi_rt_clk_src[] = { + F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0), + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_camnoc_axi_rt_clk_src = { + .cmd_rcgr = 0x138f8, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_camnoc_axi_rt_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_camnoc_axi_rt_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_cci_0_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(37500000, P_CAM_CC_PLL0_OUT_EVEN, 16, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_cci_0_clk_src = { + .cmd_rcgr = 0x1365c, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_cci_0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cci_0_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_cci_1_clk_src = { + .cmd_rcgr = 0x1378c, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_cci_0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cci_1_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_cphy_rx_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), + F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_cphy_rx_clk_src = { + .cmd_rcgr = 0x11164, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_cphy_rx_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cphy_rx_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_csi0phytimer_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = { + .cmd_rcgr = 0x150e0, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi0phytimer_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = { + .cmd_rcgr = 0x15104, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi1phytimer_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_csi2phytimer_clk_src = { + .cmd_rcgr = 0x15124, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi2phytimer_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = { + .cmd_rcgr = 0x15258, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi3phytimer_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = { + .cmd_rcgr = 0x1538c, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi4phytimer_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_csi5phytimer_clk_src = { + .cmd_rcgr = 0x154c0, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi5phytimer_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_csid_clk_src[] = { + F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), + F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_csid_clk_src = { + .cmd_rcgr = 0x138d4, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_csid_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csid_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_fast_ahb_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(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0), + F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_fast_ahb_clk_src = { + .cmd_rcgr = 0x10018, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_fast_ahb_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_fast_ahb_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_icp_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), + F(480000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), + F(600000000, P_CAM_CC_PLL0_OUT_MAIN, 2, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_icp_clk_src = { + .cmd_rcgr = 0x13520, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_icp_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_icp_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_ife_0_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(432000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), + F(594000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), + F(675000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), + F(727000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_ife_0_clk_src = { + .cmd_rcgr = 0x11018, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_2, + .freq_tbl = ftbl_cam_cc_ife_0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_0_clk_src", + .parent_data = cam_cc_parent_data_2, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_2), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_ife_lite_clk_src[] = { + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), + F(480000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_ife_lite_clk_src = { + .cmd_rcgr = 0x13000, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_ife_lite_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_lite_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = { + .cmd_rcgr = 0x1313c, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_ife_lite_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_lite_csid_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_ipe_nps_clk_src[] = { + F(364000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), + F(500000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), + F(600000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), + F(700000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_ipe_nps_clk_src = { + .cmd_rcgr = 0x103cc, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_3, + .freq_tbl = ftbl_cam_cc_ipe_nps_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ipe_nps_clk_src", + .parent_data = cam_cc_parent_data_3, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_3), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_jpeg_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0), + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), + F(480000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), + F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_jpeg_clk_src = { + .cmd_rcgr = 0x133dc, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_jpeg_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_jpeg_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_mclk0_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(24000000, P_CAM_CC_PLL2_OUT_MAIN, 10, 1, 4), + F(68571429, P_CAM_CC_PLL2_OUT_MAIN, 14, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_mclk0_clk_src = { + .cmd_rcgr = 0x15000, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_1, + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk0_clk_src", + .parent_data = cam_cc_parent_data_1, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_mclk1_clk_src = { + .cmd_rcgr = 0x1501c, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_1, + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk1_clk_src", + .parent_data = cam_cc_parent_data_1, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_mclk2_clk_src = { + .cmd_rcgr = 0x15038, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_1, + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk2_clk_src", + .parent_data = cam_cc_parent_data_1, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_mclk3_clk_src = { + .cmd_rcgr = 0x15054, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_1, + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk3_clk_src", + .parent_data = cam_cc_parent_data_1, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_mclk4_clk_src = { + .cmd_rcgr = 0x15070, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_1, + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk4_clk_src", + .parent_data = cam_cc_parent_data_1, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_mclk5_clk_src = { + .cmd_rcgr = 0x1508c, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_1, + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk5_clk_src", + .parent_data = cam_cc_parent_data_1, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_mclk6_clk_src = { + .cmd_rcgr = 0x150a8, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_1, + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk6_clk_src", + .parent_data = cam_cc_parent_data_1, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 cam_cc_mclk7_clk_src = { + .cmd_rcgr = 0x150c4, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_1, + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk7_clk_src", + .parent_data = cam_cc_parent_data_1, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_qdss_debug_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(75000000, P_CAM_CC_PLL0_OUT_EVEN, 8, 0, 0), + F(150000000, P_CAM_CC_PLL0_OUT_EVEN, 4, 0, 0), + F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_qdss_debug_clk_src = { + .cmd_rcgr = 0x13938, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_qdss_debug_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_qdss_debug_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_sleep_clk_src[] = { + F(32000, P_SLEEP_CLK, 1, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_sleep_clk_src = { + .cmd_rcgr = 0x13aa0, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_4, + .freq_tbl = ftbl_cam_cc_sleep_clk_src, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_sleep_clk_src", + .parent_data = cam_cc_parent_data_4, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_4), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_slow_ahb_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(80000000, P_CAM_CC_PLL0_OUT_EVEN, 7.5, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_slow_ahb_clk_src = { + .cmd_rcgr = 0x10148, + .mnd_width = 8, + .hid_width = 5, + .parent_map = cam_cc_parent_map_0, + .freq_tbl = ftbl_cam_cc_slow_ahb_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_slow_ahb_clk_src", + .parent_data = cam_cc_parent_data_0, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_cam_cc_xo_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + { } +}; + +static struct clk_rcg2 cam_cc_xo_clk_src = { + .cmd_rcgr = 0x13a84, + .mnd_width = 0, + .hid_width = 5, + .parent_map = cam_cc_parent_map_5, + .freq_tbl = ftbl_cam_cc_xo_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "cam_cc_xo_clk_src", + .parent_data = cam_cc_parent_data_5, + .num_parents = ARRAY_SIZE(cam_cc_parent_data_5), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_branch cam_cc_bps_ahb_clk = { + .halt_reg = 0x10274, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x10274, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_bps_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_slow_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_bps_clk = { + .halt_reg = 0x103a4, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x103a4, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_bps_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_bps_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_bps_fast_ahb_clk = { + .halt_reg = 0x10144, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x10144, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_bps_fast_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_fast_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_camnoc_axi_nrt_clk = { + .halt_reg = 0x13920, + .halt_check = BRANCH_HALT_VOTED, + .hwcg_reg = 0x13920, + .hwcg_bit = 1, + .clkr = { + .enable_reg = 0x13920, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_camnoc_axi_nrt_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_camnoc_axi_rt_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_camnoc_axi_rt_clk = { + .halt_reg = 0x13910, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13910, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_camnoc_axi_rt_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_camnoc_axi_rt_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_camnoc_dcd_xo_clk = { + .halt_reg = 0x1392c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1392c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_camnoc_dcd_xo_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_xo_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_camnoc_xo_clk = { + .halt_reg = 0x13930, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13930, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_camnoc_xo_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_xo_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_cci_0_clk = { + .halt_reg = 0x13788, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13788, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cci_0_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cci_0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_cci_1_clk = { + .halt_reg = 0x138b8, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x138b8, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cci_1_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cci_1_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_core_ahb_clk = { + .halt_reg = 0x13a80, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x13a80, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_core_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_slow_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_cpas_ahb_clk = { + .halt_reg = 0x138bc, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x138bc, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cpas_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_slow_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_cpas_bps_clk = { + .halt_reg = 0x103b0, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x103b0, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cpas_bps_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_bps_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_cpas_fast_ahb_clk = { + .halt_reg = 0x138c8, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x138c8, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cpas_fast_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_fast_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_cpas_ife_0_clk = { + .halt_reg = 0x11150, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x11150, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cpas_ife_0_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_ife_0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_cpas_ife_lite_clk = { + .halt_reg = 0x13138, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13138, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cpas_ife_lite_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_ife_lite_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_cpas_ipe_nps_clk = { + .halt_reg = 0x10504, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x10504, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_cpas_ipe_nps_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_ipe_nps_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csi0phytimer_clk = { + .halt_reg = 0x150f8, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x150f8, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi0phytimer_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_csi0phytimer_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csi1phytimer_clk = { + .halt_reg = 0x1511c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1511c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi1phytimer_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_csi1phytimer_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csi2phytimer_clk = { + .halt_reg = 0x15250, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15250, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi2phytimer_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_csi2phytimer_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csi3phytimer_clk = { + .halt_reg = 0x15384, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15384, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi3phytimer_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_csi3phytimer_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csi4phytimer_clk = { + .halt_reg = 0x154b8, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x154b8, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi4phytimer_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_csi4phytimer_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csi5phytimer_clk = { + .halt_reg = 0x155ec, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x155ec, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csi5phytimer_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_csi5phytimer_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csid_clk = { + .halt_reg = 0x138ec, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x138ec, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csid_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_csid_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csid_csiphy_rx_clk = { + .halt_reg = 0x15100, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15100, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csid_csiphy_rx_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cphy_rx_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csiphy0_clk = { + .halt_reg = 0x150fc, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x150fc, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csiphy0_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cphy_rx_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csiphy1_clk = { + .halt_reg = 0x15120, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15120, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csiphy1_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cphy_rx_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csiphy2_clk = { + .halt_reg = 0x15254, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15254, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csiphy2_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cphy_rx_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csiphy3_clk = { + .halt_reg = 0x15388, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15388, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csiphy3_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cphy_rx_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csiphy4_clk = { + .halt_reg = 0x154bc, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x154bc, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csiphy4_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cphy_rx_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_csiphy5_clk = { + .halt_reg = 0x155f0, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x155f0, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_csiphy5_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cphy_rx_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_icp_ahb_clk = { + .halt_reg = 0x13658, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13658, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_icp_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_slow_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_icp_clk = { + .halt_reg = 0x1364c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1364c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_icp_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_icp_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ife_0_clk = { + .halt_reg = 0x11144, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x11144, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_0_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_ife_0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ife_0_dsp_clk = { + .halt_reg = 0x11154, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x11154, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_0_dsp_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_ife_0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ife_0_fast_ahb_clk = { + .halt_reg = 0x11160, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x11160, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_0_fast_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_fast_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ife_lite_ahb_clk = { + .halt_reg = 0x13278, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13278, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_lite_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_slow_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ife_lite_clk = { + .halt_reg = 0x1312c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1312c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_lite_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_ife_lite_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ife_lite_cphy_rx_clk = { + .halt_reg = 0x13274, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13274, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_lite_cphy_rx_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_cphy_rx_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ife_lite_csid_clk = { + .halt_reg = 0x13268, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13268, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ife_lite_csid_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_ife_lite_csid_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ipe_nps_ahb_clk = { + .halt_reg = 0x1051c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1051c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ipe_nps_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_slow_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ipe_nps_clk = { + .halt_reg = 0x104f8, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x104f8, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ipe_nps_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_ipe_nps_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ipe_nps_fast_ahb_clk = { + .halt_reg = 0x10520, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x10520, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ipe_nps_fast_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_fast_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ipe_pps_clk = { + .halt_reg = 0x10508, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x10508, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ipe_pps_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_ipe_nps_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_ipe_pps_fast_ahb_clk = { + .halt_reg = 0x10524, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x10524, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_ipe_pps_fast_ahb_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_fast_ahb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_jpeg_clk = { + .halt_reg = 0x13508, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13508, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_jpeg_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_jpeg_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_mclk0_clk = { + .halt_reg = 0x15018, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15018, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk0_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_mclk0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_mclk1_clk = { + .halt_reg = 0x15034, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15034, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk1_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_mclk1_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_mclk2_clk = { + .halt_reg = 0x15050, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15050, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk2_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_mclk2_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_mclk3_clk = { + .halt_reg = 0x1506c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1506c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk3_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_mclk3_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_mclk4_clk = { + .halt_reg = 0x15088, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x15088, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk4_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_mclk4_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_mclk5_clk = { + .halt_reg = 0x150a4, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x150a4, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk5_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_mclk5_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_mclk6_clk = { + .halt_reg = 0x150c0, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x150c0, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk6_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_mclk6_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_mclk7_clk = { + .halt_reg = 0x150dc, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x150dc, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_mclk7_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_mclk7_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_qdss_debug_clk = { + .halt_reg = 0x13a64, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13a64, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_qdss_debug_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_qdss_debug_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch cam_cc_qdss_debug_xo_clk = { + .halt_reg = 0x13a68, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x13a68, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "cam_cc_qdss_debug_xo_clk", + .parent_hws = (const struct clk_hw*[]) { + &cam_cc_xo_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct gdsc cam_cc_titan_top_gdsc = { + .gdscr = 0x13a6c, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, + .pd = { + .name = "cam_cc_titan_top_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, +}; + +static struct gdsc cam_cc_bps_gdsc = { + .gdscr = 0x10004, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, + .pd = { + .name = "cam_cc_bps_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, +}; + +static struct gdsc cam_cc_ife_0_gdsc = { + .gdscr = 0x11004, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, + .pd = { + .name = "cam_cc_ife_0_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, +}; + +static struct gdsc cam_cc_ipe_0_gdsc = { + .gdscr = 0x103b8, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, + .pd = { + .name = "cam_cc_ipe_0_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, +}; + +static struct clk_regmap *cam_cc_x1p42100_clocks[] = { + [CAM_CC_BPS_AHB_CLK] = &cam_cc_bps_ahb_clk.clkr, + [CAM_CC_BPS_CLK] = &cam_cc_bps_clk.clkr, + [CAM_CC_BPS_CLK_SRC] = &cam_cc_bps_clk_src.clkr, + [CAM_CC_BPS_FAST_AHB_CLK] = &cam_cc_bps_fast_ahb_clk.clkr, + [CAM_CC_CAMNOC_AXI_NRT_CLK] = &cam_cc_camnoc_axi_nrt_clk.clkr, + [CAM_CC_CAMNOC_AXI_RT_CLK] = &cam_cc_camnoc_axi_rt_clk.clkr, + [CAM_CC_CAMNOC_AXI_RT_CLK_SRC] = &cam_cc_camnoc_axi_rt_clk_src.clkr, + [CAM_CC_CAMNOC_DCD_XO_CLK] = &cam_cc_camnoc_dcd_xo_clk.clkr, + [CAM_CC_CAMNOC_XO_CLK] = &cam_cc_camnoc_xo_clk.clkr, + [CAM_CC_CCI_0_CLK] = &cam_cc_cci_0_clk.clkr, + [CAM_CC_CCI_0_CLK_SRC] = &cam_cc_cci_0_clk_src.clkr, + [CAM_CC_CCI_1_CLK] = &cam_cc_cci_1_clk.clkr, + [CAM_CC_CCI_1_CLK_SRC] = &cam_cc_cci_1_clk_src.clkr, + [CAM_CC_CORE_AHB_CLK] = &cam_cc_core_ahb_clk.clkr, + [CAM_CC_CPAS_AHB_CLK] = &cam_cc_cpas_ahb_clk.clkr, + [CAM_CC_CPAS_BPS_CLK] = &cam_cc_cpas_bps_clk.clkr, + [CAM_CC_CPAS_FAST_AHB_CLK] = &cam_cc_cpas_fast_ahb_clk.clkr, + [CAM_CC_CPAS_IFE_0_CLK] = &cam_cc_cpas_ife_0_clk.clkr, + [CAM_CC_CPAS_IFE_LITE_CLK] = &cam_cc_cpas_ife_lite_clk.clkr, + [CAM_CC_CPAS_IPE_NPS_CLK] = &cam_cc_cpas_ipe_nps_clk.clkr, + [CAM_CC_CPHY_RX_CLK_SRC] = &cam_cc_cphy_rx_clk_src.clkr, + [CAM_CC_CSI0PHYTIMER_CLK] = &cam_cc_csi0phytimer_clk.clkr, + [CAM_CC_CSI0PHYTIMER_CLK_SRC] = &cam_cc_csi0phytimer_clk_src.clkr, + [CAM_CC_CSI1PHYTIMER_CLK] = &cam_cc_csi1phytimer_clk.clkr, + [CAM_CC_CSI1PHYTIMER_CLK_SRC] = &cam_cc_csi1phytimer_clk_src.clkr, + [CAM_CC_CSI2PHYTIMER_CLK] = &cam_cc_csi2phytimer_clk.clkr, + [CAM_CC_CSI2PHYTIMER_CLK_SRC] = &cam_cc_csi2phytimer_clk_src.clkr, + [CAM_CC_CSI3PHYTIMER_CLK] = &cam_cc_csi3phytimer_clk.clkr, + [CAM_CC_CSI3PHYTIMER_CLK_SRC] = &cam_cc_csi3phytimer_clk_src.clkr, + [CAM_CC_CSI4PHYTIMER_CLK] = &cam_cc_csi4phytimer_clk.clkr, + [CAM_CC_CSI4PHYTIMER_CLK_SRC] = &cam_cc_csi4phytimer_clk_src.clkr, + [CAM_CC_CSI5PHYTIMER_CLK] = &cam_cc_csi5phytimer_clk.clkr, + [CAM_CC_CSI5PHYTIMER_CLK_SRC] = &cam_cc_csi5phytimer_clk_src.clkr, + [CAM_CC_CSID_CLK] = &cam_cc_csid_clk.clkr, + [CAM_CC_CSID_CLK_SRC] = &cam_cc_csid_clk_src.clkr, + [CAM_CC_CSID_CSIPHY_RX_CLK] = &cam_cc_csid_csiphy_rx_clk.clkr, + [CAM_CC_CSIPHY0_CLK] = &cam_cc_csiphy0_clk.clkr, + [CAM_CC_CSIPHY1_CLK] = &cam_cc_csiphy1_clk.clkr, + [CAM_CC_CSIPHY2_CLK] = &cam_cc_csiphy2_clk.clkr, + [CAM_CC_CSIPHY3_CLK] = &cam_cc_csiphy3_clk.clkr, + [CAM_CC_CSIPHY4_CLK] = &cam_cc_csiphy4_clk.clkr, + [CAM_CC_CSIPHY5_CLK] = &cam_cc_csiphy5_clk.clkr, + [CAM_CC_FAST_AHB_CLK_SRC] = &cam_cc_fast_ahb_clk_src.clkr, + [CAM_CC_ICP_AHB_CLK] = &cam_cc_icp_ahb_clk.clkr, + [CAM_CC_ICP_CLK] = &cam_cc_icp_clk.clkr, + [CAM_CC_ICP_CLK_SRC] = &cam_cc_icp_clk_src.clkr, + [CAM_CC_IFE_0_CLK] = &cam_cc_ife_0_clk.clkr, + [CAM_CC_IFE_0_CLK_SRC] = &cam_cc_ife_0_clk_src.clkr, + [CAM_CC_IFE_0_DSP_CLK] = &cam_cc_ife_0_dsp_clk.clkr, + [CAM_CC_IFE_0_FAST_AHB_CLK] = &cam_cc_ife_0_fast_ahb_clk.clkr, + [CAM_CC_IFE_LITE_AHB_CLK] = &cam_cc_ife_lite_ahb_clk.clkr, + [CAM_CC_IFE_LITE_CLK] = &cam_cc_ife_lite_clk.clkr, + [CAM_CC_IFE_LITE_CLK_SRC] = &cam_cc_ife_lite_clk_src.clkr, + [CAM_CC_IFE_LITE_CPHY_RX_CLK] = &cam_cc_ife_lite_cphy_rx_clk.clkr, + [CAM_CC_IFE_LITE_CSID_CLK] = &cam_cc_ife_lite_csid_clk.clkr, + [CAM_CC_IFE_LITE_CSID_CLK_SRC] = &cam_cc_ife_lite_csid_clk_src.clkr, + [CAM_CC_IPE_NPS_AHB_CLK] = &cam_cc_ipe_nps_ahb_clk.clkr, + [CAM_CC_IPE_NPS_CLK] = &cam_cc_ipe_nps_clk.clkr, + [CAM_CC_IPE_NPS_CLK_SRC] = &cam_cc_ipe_nps_clk_src.clkr, + [CAM_CC_IPE_NPS_FAST_AHB_CLK] = &cam_cc_ipe_nps_fast_ahb_clk.clkr, + [CAM_CC_IPE_PPS_CLK] = &cam_cc_ipe_pps_clk.clkr, + [CAM_CC_IPE_PPS_FAST_AHB_CLK] = &cam_cc_ipe_pps_fast_ahb_clk.clkr, + [CAM_CC_JPEG_CLK] = &cam_cc_jpeg_clk.clkr, + [CAM_CC_JPEG_CLK_SRC] = &cam_cc_jpeg_clk_src.clkr, + [CAM_CC_MCLK0_CLK] = &cam_cc_mclk0_clk.clkr, + [CAM_CC_MCLK0_CLK_SRC] = &cam_cc_mclk0_clk_src.clkr, + [CAM_CC_MCLK1_CLK] = &cam_cc_mclk1_clk.clkr, + [CAM_CC_MCLK1_CLK_SRC] = &cam_cc_mclk1_clk_src.clkr, + [CAM_CC_MCLK2_CLK] = &cam_cc_mclk2_clk.clkr, + [CAM_CC_MCLK2_CLK_SRC] = &cam_cc_mclk2_clk_src.clkr, + [CAM_CC_MCLK3_CLK] = &cam_cc_mclk3_clk.clkr, + [CAM_CC_MCLK3_CLK_SRC] = &cam_cc_mclk3_clk_src.clkr, + [CAM_CC_MCLK4_CLK] = &cam_cc_mclk4_clk.clkr, + [CAM_CC_MCLK4_CLK_SRC] = &cam_cc_mclk4_clk_src.clkr, + [CAM_CC_MCLK5_CLK] = &cam_cc_mclk5_clk.clkr, + [CAM_CC_MCLK5_CLK_SRC] = &cam_cc_mclk5_clk_src.clkr, + [CAM_CC_MCLK6_CLK] = &cam_cc_mclk6_clk.clkr, + [CAM_CC_MCLK6_CLK_SRC] = &cam_cc_mclk6_clk_src.clkr, + [CAM_CC_MCLK7_CLK] = &cam_cc_mclk7_clk.clkr, + [CAM_CC_MCLK7_CLK_SRC] = &cam_cc_mclk7_clk_src.clkr, + [CAM_CC_PLL0] = &cam_cc_pll0.clkr, + [CAM_CC_PLL0_OUT_EVEN] = &cam_cc_pll0_out_even.clkr, + [CAM_CC_PLL0_OUT_ODD] = &cam_cc_pll0_out_odd.clkr, + [CAM_CC_PLL1] = &cam_cc_pll1.clkr, + [CAM_CC_PLL1_OUT_EVEN] = &cam_cc_pll1_out_even.clkr, + [CAM_CC_PLL2] = &cam_cc_pll2.clkr, + [CAM_CC_PLL3] = &cam_cc_pll3.clkr, + [CAM_CC_PLL3_OUT_EVEN] = &cam_cc_pll3_out_even.clkr, + [CAM_CC_PLL6] = &cam_cc_pll6.clkr, + [CAM_CC_PLL6_OUT_EVEN] = &cam_cc_pll6_out_even.clkr, + [CAM_CC_QDSS_DEBUG_CLK] = &cam_cc_qdss_debug_clk.clkr, + [CAM_CC_QDSS_DEBUG_CLK_SRC] = &cam_cc_qdss_debug_clk_src.clkr, + [CAM_CC_QDSS_DEBUG_XO_CLK] = &cam_cc_qdss_debug_xo_clk.clkr, + [CAM_CC_SLEEP_CLK_SRC] = &cam_cc_sleep_clk_src.clkr, + [CAM_CC_SLOW_AHB_CLK_SRC] = &cam_cc_slow_ahb_clk_src.clkr, + [CAM_CC_XO_CLK_SRC] = &cam_cc_xo_clk_src.clkr, +}; + +static struct gdsc *cam_cc_x1p42100_gdscs[] = { + [CAM_CC_BPS_GDSC] = &cam_cc_bps_gdsc, + [CAM_CC_IFE_0_GDSC] = &cam_cc_ife_0_gdsc, + [CAM_CC_IPE_0_GDSC] = &cam_cc_ipe_0_gdsc, + [CAM_CC_TITAN_TOP_GDSC] = &cam_cc_titan_top_gdsc, +}; + +static const struct qcom_reset_map cam_cc_x1p42100_resets[] = { + [CAM_CC_BPS_BCR] = { 0x10000 }, + [CAM_CC_ICP_BCR] = { 0x1351c }, + [CAM_CC_IFE_0_BCR] = { 0x11000 }, + [CAM_CC_IPE_0_BCR] = { 0x103b4 }, +}; + +static struct clk_alpha_pll *cam_cc_x1p42100_plls[] = { + &cam_cc_pll0, + &cam_cc_pll1, + &cam_cc_pll2, + &cam_cc_pll3, + &cam_cc_pll6, +}; + +static u32 cam_cc_x1p42100_critical_cbcrs[] = { + 0x13a9c, /* CAM_CC_GDSC_CLK */ + 0x13ab8, /* CAM_CC_SLEEP_CLK */ +}; + +static const struct regmap_config cam_cc_x1p42100_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = 0x1603c, + .fast_io = true, +}; + +static struct qcom_cc_driver_data cam_cc_x1p42100_driver_data = { + .alpha_plls = cam_cc_x1p42100_plls, + .num_alpha_plls = ARRAY_SIZE(cam_cc_x1p42100_plls), + .clk_cbcrs = cam_cc_x1p42100_critical_cbcrs, + .num_clk_cbcrs = ARRAY_SIZE(cam_cc_x1p42100_critical_cbcrs), +}; + +static struct qcom_cc_desc cam_cc_x1p42100_desc = { + .config = &cam_cc_x1p42100_regmap_config, + .clks = cam_cc_x1p42100_clocks, + .num_clks = ARRAY_SIZE(cam_cc_x1p42100_clocks), + .resets = cam_cc_x1p42100_resets, + .num_resets = ARRAY_SIZE(cam_cc_x1p42100_resets), + .gdscs = cam_cc_x1p42100_gdscs, + .num_gdscs = ARRAY_SIZE(cam_cc_x1p42100_gdscs), + .use_rpm = true, + .driver_data = &cam_cc_x1p42100_driver_data, +}; + +static const struct of_device_id cam_cc_x1p42100_match_table[] = { + { .compatible = "qcom,x1p42100-camcc" }, + { } +}; +MODULE_DEVICE_TABLE(of, cam_cc_x1p42100_match_table); + +static int cam_cc_x1p42100_probe(struct platform_device *pdev) +{ + return qcom_cc_probe(pdev, &cam_cc_x1p42100_desc); +} + +static struct platform_driver cam_cc_x1p42100_driver = { + .probe = cam_cc_x1p42100_probe, + .driver = { + .name = "camcc-x1p42100", + .of_match_table = cam_cc_x1p42100_match_table, + }, +}; + +module_platform_driver(cam_cc_x1p42100_driver); + +MODULE_DESCRIPTION("QTI CAMCC X1P42100 Driver"); +MODULE_LICENSE("GPL"); -- 2.34.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller 2026-01-27 19:26 ` [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller Jagadeesh Kona @ 2026-01-28 4:45 ` Taniya Das 2026-01-28 10:17 ` Konrad Dybcio 2026-01-29 0:39 ` Dmitry Baryshkov 2 siblings, 0 replies; 35+ messages in thread From: Taniya Das @ 2026-01-28 4:45 UTC (permalink / raw) To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/28/2026 12:56 AM, Jagadeesh Kona wrote: > Add support for the camera clock controller for camera clients to > be able to request for camcc clocks on X1P42100 platform. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- > drivers/clk/qcom/Kconfig | 10 + > drivers/clk/qcom/Makefile | 1 + > drivers/clk/qcom/camcc-x1p42100.c | 2223 +++++++++++++++++++++++++++++++++++++ > 3 files changed, 2234 insertions(+) > > diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig > index b1b1ed70871c1b348985d6f5149152e57637d904..0fe2e690a104095adc3f218d67852aaaedd852a7 100644 > --- a/drivers/clk/qcom/Kconfig > +++ b/drivers/clk/qcom/Kconfig > @@ -146,6 +146,16 @@ config CLK_X1E80100_TCSRCC > Support for the TCSR clock controller on X1E80100 devices. > Say Y if you want to use peripheral devices such as SD/UFS. > > +config CLK_X1P42100_CAMCC > + tristate "X1P42100 Camera Clock Controller" > + depends on ARM64 || COMPILE_TEST > + select CLK_X1E80100_GCC > + help > + Support for the camera clock controller on Qualcomm Technologies, Inc. > + X1P42100 devices. > + Say Y if you want to support camera devices and camera functionality > + such as capturing pictures. > + > config CLK_X1P42100_GPUCC > tristate "X1P42100 Graphics Clock Controller" > depends on ARM64 || COMPILE_TEST > diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile > index b746e5046774259cebe3da8dad1f226561268a8b..2735036df906cd8192fe20bb2a026fca3a457bf9 100644 > --- a/drivers/clk/qcom/Makefile > +++ b/drivers/clk/qcom/Makefile > @@ -35,6 +35,7 @@ obj-$(CONFIG_CLK_X1E80100_DISPCC) += dispcc-x1e80100.o > obj-$(CONFIG_CLK_X1E80100_GCC) += gcc-x1e80100.o > obj-$(CONFIG_CLK_X1E80100_GPUCC) += gpucc-x1e80100.o > obj-$(CONFIG_CLK_X1E80100_TCSRCC) += tcsrcc-x1e80100.o > +obj-$(CONFIG_CLK_X1P42100_CAMCC) += camcc-x1p42100.o > obj-$(CONFIG_CLK_X1P42100_GPUCC) += gpucc-x1p42100.o > obj-$(CONFIG_CLK_X1P42100_VIDEOCC) += videocc-x1p42100.o > obj-$(CONFIG_CLK_QCM2290_GPUCC) += gpucc-qcm2290.o > diff --git a/drivers/clk/qcom/camcc-x1p42100.c b/drivers/clk/qcom/camcc-x1p42100.c > new file mode 100644 > index 0000000000000000000000000000000000000000..c1a61c267919976d2d869fef4cd3659433ad2993 > --- /dev/null > +++ b/drivers/clk/qcom/camcc-x1p42100.c > @@ -0,0 +1,2223 @@ > +// 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,x1e80100-camcc.h> > + > +#include "clk-alpha-pll.h" > +#include "clk-branch.h" > +#include "clk-rcg.h" > +#include "clk-regmap.h" > +#include "common.h" > +#include "gdsc.h" > +#include "reset.h" > + > +enum { > + DT_IFACE, > + DT_BI_TCXO, > + DT_BI_TCXO_AO, > + DT_SLEEP_CLK, > +}; > + > +enum { > + P_BI_TCXO, > + P_BI_TCXO_AO, > + P_CAM_CC_PLL0_OUT_EVEN, > + P_CAM_CC_PLL0_OUT_MAIN, > + P_CAM_CC_PLL0_OUT_ODD, > + P_CAM_CC_PLL1_OUT_EVEN, > + P_CAM_CC_PLL2_OUT_EVEN, > + P_CAM_CC_PLL2_OUT_MAIN, > + P_CAM_CC_PLL3_OUT_EVEN, > + P_CAM_CC_PLL6_OUT_EVEN, > + P_SLEEP_CLK, > +}; > + > +static const struct pll_vco lucid_ole_vco[] = { > + { 249600000, 2300000000, 0 }, > +}; > + > +static const struct pll_vco rivian_ole_vco[] = { > + { 777000000, 1285000000, 0 }, > +}; > + > +/* 1200.0 MHz Configuration */ > +static const struct alpha_pll_config cam_cc_pll0_config = { > + .l = 0x3e, > + .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 = 0x00008400, > + .user_ctl_hi_val = 0x00000005, > +}; > + > +static struct clk_alpha_pll cam_cc_pll0 = { > + .offset = 0x0, > + .config = &cam_cc_pll0_config, > + .vco_table = lucid_ole_vco, > + .num_vco = ARRAY_SIZE(lucid_ole_vco), > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr = { > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll0", > + .parent_data = &(const struct clk_parent_data) { > + .index = DT_BI_TCXO, > + }, > + .num_parents = 1, > + .ops = &clk_alpha_pll_lucid_evo_ops, > + }, > + }, > +}; > + > +static const struct clk_div_table post_div_table_cam_cc_pll0_out_even[] = { > + { 0x1, 2 }, > + { } > +}; > + > +static struct clk_alpha_pll_postdiv cam_cc_pll0_out_even = { > + .offset = 0x0, > + .post_div_shift = 10, > + .post_div_table = post_div_table_cam_cc_pll0_out_even, > + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_even), > + .width = 4, > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll0_out_even", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_pll0.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, > + }, > +}; > + > +static const struct clk_div_table post_div_table_cam_cc_pll0_out_odd[] = { > + { 0x2, 3 }, > + { } > +}; > + > +static struct clk_alpha_pll_postdiv cam_cc_pll0_out_odd = { > + .offset = 0x0, > + .post_div_shift = 14, > + .post_div_table = post_div_table_cam_cc_pll0_out_odd, > + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_odd), > + .width = 4, > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll0_out_odd", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_pll0.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, > + }, > +}; > + > +/* 728.0 MHz Configuration */ > +static const struct alpha_pll_config cam_cc_pll1_config = { > + .l = 0x25, > + .alpha = 0xeaaa, > + .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 = 0x00000400, > + .user_ctl_hi_val = 0x00000005, > +}; > + > +static struct clk_alpha_pll cam_cc_pll1 = { > + .offset = 0x1000, > + .config = &cam_cc_pll1_config, > + .vco_table = lucid_ole_vco, > + .num_vco = ARRAY_SIZE(lucid_ole_vco), > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr = { > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll1", > + .parent_data = &(const struct clk_parent_data) { > + .index = DT_BI_TCXO, > + }, > + .num_parents = 1, > + .ops = &clk_alpha_pll_lucid_evo_ops, > + }, > + }, > +}; > + > +static const struct clk_div_table post_div_table_cam_cc_pll1_out_even[] = { > + { 0x1, 2 }, > + { } > +}; > + > +static struct clk_alpha_pll_postdiv cam_cc_pll1_out_even = { > + .offset = 0x1000, > + .post_div_shift = 10, > + .post_div_table = post_div_table_cam_cc_pll1_out_even, > + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll1_out_even), > + .width = 4, > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll1_out_even", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_pll1.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, > + }, > +}; > + > +/* 960.0 MHz Configuration */ > +static const struct alpha_pll_config cam_cc_pll2_config = { > + .l = 0x32, > + .alpha = 0x0, > + .config_ctl_val = 0x10000030, > + .config_ctl_hi_val = 0x80890263, > + .config_ctl_hi1_val = 0x00000217, > + .user_ctl_val = 0x00000000, > + .user_ctl_hi_val = 0x00100000, > +}; > + > +static struct clk_alpha_pll cam_cc_pll2 = { > + .offset = 0x2000, > + .config = &cam_cc_pll2_config, > + .vco_table = rivian_ole_vco, > + .num_vco = ARRAY_SIZE(rivian_ole_vco), > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO], > + .clkr = { > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll2", > + .parent_data = &(const struct clk_parent_data) { > + .index = DT_BI_TCXO, > + }, > + .num_parents = 1, > + .ops = &clk_alpha_pll_rivian_evo_ops, > + }, > + }, > +}; > + > +/* 864.0 MHz Configuration */ > +static const struct alpha_pll_config cam_cc_pll3_config = { > + .l = 0x2d, > + .alpha = 0x0, > + .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 = 0x00000400, > + .user_ctl_hi_val = 0x00000005, > +}; > + > +static struct clk_alpha_pll cam_cc_pll3 = { > + .offset = 0x3000, > + .config = &cam_cc_pll3_config, > + .vco_table = lucid_ole_vco, > + .num_vco = ARRAY_SIZE(lucid_ole_vco), > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr = { > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll3", > + .parent_data = &(const struct clk_parent_data) { > + .index = DT_BI_TCXO, > + }, > + .num_parents = 1, > + .ops = &clk_alpha_pll_lucid_evo_ops, > + }, > + }, > +}; > + > +static const struct clk_div_table post_div_table_cam_cc_pll3_out_even[] = { > + { 0x1, 2 }, > + { } > +}; > + > +static struct clk_alpha_pll_postdiv cam_cc_pll3_out_even = { > + .offset = 0x3000, > + .post_div_shift = 10, > + .post_div_table = post_div_table_cam_cc_pll3_out_even, > + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll3_out_even), > + .width = 4, > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll3_out_even", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_pll3.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, > + }, > +}; > + > +/* 960.0 MHz Configuration */ > +static const struct alpha_pll_config cam_cc_pll6_config = { > + .l = 0x32, > + .alpha = 0x0, > + .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 = 0x00000400, > + .user_ctl_hi_val = 0x00000005, > +}; > + > +static struct clk_alpha_pll cam_cc_pll6 = { > + .offset = 0x6000, > + .config = &cam_cc_pll6_config, > + .vco_table = lucid_ole_vco, > + .num_vco = ARRAY_SIZE(lucid_ole_vco), > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr = { > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll6", > + .parent_data = &(const struct clk_parent_data) { > + .index = DT_BI_TCXO, > + }, > + .num_parents = 1, > + .ops = &clk_alpha_pll_lucid_evo_ops, > + }, > + }, > +}; > + > +static const struct clk_div_table post_div_table_cam_cc_pll6_out_even[] = { > + { 0x1, 2 }, > + { } > +}; > + > +static struct clk_alpha_pll_postdiv cam_cc_pll6_out_even = { > + .offset = 0x6000, > + .post_div_shift = 10, > + .post_div_table = post_div_table_cam_cc_pll6_out_even, > + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll6_out_even), > + .width = 4, > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_pll6_out_even", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_pll6.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, > + }, > +}; > + > +static const struct parent_map cam_cc_parent_map_0[] = { > + { P_BI_TCXO, 0 }, > + { P_CAM_CC_PLL0_OUT_MAIN, 1 }, > + { P_CAM_CC_PLL0_OUT_EVEN, 2 }, > + { P_CAM_CC_PLL0_OUT_ODD, 3 }, > + { P_CAM_CC_PLL6_OUT_EVEN, 5 }, > +}; > + > +static const struct clk_parent_data cam_cc_parent_data_0[] = { > + { .index = DT_BI_TCXO }, > + { .hw = &cam_cc_pll0.clkr.hw }, > + { .hw = &cam_cc_pll0_out_even.clkr.hw }, > + { .hw = &cam_cc_pll0_out_odd.clkr.hw }, > + { .hw = &cam_cc_pll6_out_even.clkr.hw }, > +}; > + > +static const struct parent_map cam_cc_parent_map_1[] = { > + { P_BI_TCXO, 0 }, > + { P_CAM_CC_PLL2_OUT_EVEN, 3 }, > + { P_CAM_CC_PLL2_OUT_MAIN, 5 }, > +}; > + > +static const struct clk_parent_data cam_cc_parent_data_1[] = { > + { .index = DT_BI_TCXO }, > + { .hw = &cam_cc_pll2.clkr.hw }, > + { .hw = &cam_cc_pll2.clkr.hw }, > +}; > + > +static const struct parent_map cam_cc_parent_map_2[] = { > + { P_BI_TCXO, 0 }, > + { P_CAM_CC_PLL3_OUT_EVEN, 6 }, > +}; > + > +static const struct clk_parent_data cam_cc_parent_data_2[] = { > + { .index = DT_BI_TCXO }, > + { .hw = &cam_cc_pll3_out_even.clkr.hw }, > +}; > + > +static const struct parent_map cam_cc_parent_map_3[] = { > + { P_BI_TCXO, 0 }, > + { P_CAM_CC_PLL1_OUT_EVEN, 4 }, > +}; > + > +static const struct clk_parent_data cam_cc_parent_data_3[] = { > + { .index = DT_BI_TCXO }, > + { .hw = &cam_cc_pll1_out_even.clkr.hw }, > +}; > + > +static const struct parent_map cam_cc_parent_map_4[] = { > + { P_SLEEP_CLK, 0 }, > +}; > + > +static const struct clk_parent_data cam_cc_parent_data_4[] = { > + { .index = DT_SLEEP_CLK }, > +}; > + > +static const struct parent_map cam_cc_parent_map_5[] = { > + { P_BI_TCXO, 0 }, > +}; > + > +static const struct clk_parent_data cam_cc_parent_data_5[] = { > + { .index = DT_BI_TCXO }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_bps_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0), > + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), > + F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_bps_clk_src = { > + .cmd_rcgr = 0x10278, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_bps_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_bps_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_camnoc_axi_rt_clk_src[] = { > + F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0), > + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_camnoc_axi_rt_clk_src = { > + .cmd_rcgr = 0x138f8, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_camnoc_axi_rt_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_camnoc_axi_rt_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_cci_0_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(37500000, P_CAM_CC_PLL0_OUT_EVEN, 16, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_cci_0_clk_src = { > + .cmd_rcgr = 0x1365c, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_cci_0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cci_0_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_cci_1_clk_src = { > + .cmd_rcgr = 0x1378c, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_cci_0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cci_1_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_cphy_rx_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), > + F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_cphy_rx_clk_src = { > + .cmd_rcgr = 0x11164, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_cphy_rx_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cphy_rx_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_csi0phytimer_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = { > + .cmd_rcgr = 0x150e0, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi0phytimer_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = { > + .cmd_rcgr = 0x15104, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi1phytimer_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_csi2phytimer_clk_src = { > + .cmd_rcgr = 0x15124, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi2phytimer_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = { > + .cmd_rcgr = 0x15258, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi3phytimer_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = { > + .cmd_rcgr = 0x1538c, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi4phytimer_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_csi5phytimer_clk_src = { > + .cmd_rcgr = 0x154c0, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi5phytimer_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_csid_clk_src[] = { > + F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), > + F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_csid_clk_src = { > + .cmd_rcgr = 0x138d4, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_csid_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csid_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_fast_ahb_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(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0), > + F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_fast_ahb_clk_src = { > + .cmd_rcgr = 0x10018, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_fast_ahb_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_fast_ahb_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_icp_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), > + F(480000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), > + F(600000000, P_CAM_CC_PLL0_OUT_MAIN, 2, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_icp_clk_src = { > + .cmd_rcgr = 0x13520, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_icp_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_icp_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_ife_0_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(432000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), > + F(594000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), > + F(675000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), > + F(727000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_ife_0_clk_src = { > + .cmd_rcgr = 0x11018, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_2, > + .freq_tbl = ftbl_cam_cc_ife_0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_0_clk_src", > + .parent_data = cam_cc_parent_data_2, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_2), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_ife_lite_clk_src[] = { > + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), > + F(480000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_ife_lite_clk_src = { > + .cmd_rcgr = 0x13000, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_ife_lite_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_lite_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = { > + .cmd_rcgr = 0x1313c, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_ife_lite_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_lite_csid_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_ipe_nps_clk_src[] = { > + F(364000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), > + F(500000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), > + F(600000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), > + F(700000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_ipe_nps_clk_src = { > + .cmd_rcgr = 0x103cc, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_3, > + .freq_tbl = ftbl_cam_cc_ipe_nps_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ipe_nps_clk_src", > + .parent_data = cam_cc_parent_data_3, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_3), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_jpeg_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0), > + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), > + F(480000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), > + F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_jpeg_clk_src = { > + .cmd_rcgr = 0x133dc, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_jpeg_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_jpeg_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_mclk0_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(24000000, P_CAM_CC_PLL2_OUT_MAIN, 10, 1, 4), > + F(68571429, P_CAM_CC_PLL2_OUT_MAIN, 14, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_mclk0_clk_src = { > + .cmd_rcgr = 0x15000, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_1, > + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk0_clk_src", > + .parent_data = cam_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_mclk1_clk_src = { > + .cmd_rcgr = 0x1501c, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_1, > + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk1_clk_src", > + .parent_data = cam_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_mclk2_clk_src = { > + .cmd_rcgr = 0x15038, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_1, > + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk2_clk_src", > + .parent_data = cam_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_mclk3_clk_src = { > + .cmd_rcgr = 0x15054, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_1, > + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk3_clk_src", > + .parent_data = cam_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_mclk4_clk_src = { > + .cmd_rcgr = 0x15070, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_1, > + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk4_clk_src", > + .parent_data = cam_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_mclk5_clk_src = { > + .cmd_rcgr = 0x1508c, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_1, > + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk5_clk_src", > + .parent_data = cam_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_mclk6_clk_src = { > + .cmd_rcgr = 0x150a8, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_1, > + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk6_clk_src", > + .parent_data = cam_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_rcg2 cam_cc_mclk7_clk_src = { > + .cmd_rcgr = 0x150c4, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_1, > + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk7_clk_src", > + .parent_data = cam_cc_parent_data_1, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_qdss_debug_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(75000000, P_CAM_CC_PLL0_OUT_EVEN, 8, 0, 0), > + F(150000000, P_CAM_CC_PLL0_OUT_EVEN, 4, 0, 0), > + F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_qdss_debug_clk_src = { > + .cmd_rcgr = 0x13938, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_qdss_debug_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_qdss_debug_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_sleep_clk_src[] = { > + F(32000, P_SLEEP_CLK, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_sleep_clk_src = { > + .cmd_rcgr = 0x13aa0, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_4, > + .freq_tbl = ftbl_cam_cc_sleep_clk_src, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_sleep_clk_src", > + .parent_data = cam_cc_parent_data_4, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_4), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_slow_ahb_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + F(80000000, P_CAM_CC_PLL0_OUT_EVEN, 7.5, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_slow_ahb_clk_src = { > + .cmd_rcgr = 0x10148, > + .mnd_width = 8, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_0, > + .freq_tbl = ftbl_cam_cc_slow_ahb_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_slow_ahb_clk_src", > + .parent_data = cam_cc_parent_data_0, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static const struct freq_tbl ftbl_cam_cc_xo_clk_src[] = { > + F(19200000, P_BI_TCXO, 1, 0, 0), > + { } > +}; > + > +static struct clk_rcg2 cam_cc_xo_clk_src = { > + .cmd_rcgr = 0x13a84, > + .mnd_width = 0, > + .hid_width = 5, > + .parent_map = cam_cc_parent_map_5, > + .freq_tbl = ftbl_cam_cc_xo_clk_src, > + .hw_clk_ctrl = true, > + .clkr.hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_xo_clk_src", > + .parent_data = cam_cc_parent_data_5, > + .num_parents = ARRAY_SIZE(cam_cc_parent_data_5), > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_rcg2_shared_ops, > + }, > +}; > + > +static struct clk_branch cam_cc_bps_ahb_clk = { > + .halt_reg = 0x10274, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x10274, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_bps_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_slow_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_bps_clk = { > + .halt_reg = 0x103a4, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x103a4, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_bps_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_bps_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_bps_fast_ahb_clk = { > + .halt_reg = 0x10144, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x10144, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_bps_fast_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_fast_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_camnoc_axi_nrt_clk = { > + .halt_reg = 0x13920, > + .halt_check = BRANCH_HALT_VOTED, > + .hwcg_reg = 0x13920, > + .hwcg_bit = 1, > + .clkr = { > + .enable_reg = 0x13920, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_camnoc_axi_nrt_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_camnoc_axi_rt_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_camnoc_axi_rt_clk = { > + .halt_reg = 0x13910, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13910, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_camnoc_axi_rt_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_camnoc_axi_rt_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_camnoc_dcd_xo_clk = { > + .halt_reg = 0x1392c, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x1392c, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_camnoc_dcd_xo_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_xo_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_camnoc_xo_clk = { > + .halt_reg = 0x13930, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13930, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_camnoc_xo_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_xo_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_cci_0_clk = { > + .halt_reg = 0x13788, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13788, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cci_0_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cci_0_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_cci_1_clk = { > + .halt_reg = 0x138b8, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x138b8, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cci_1_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cci_1_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_core_ahb_clk = { > + .halt_reg = 0x13a80, > + .halt_check = BRANCH_HALT_VOTED, > + .clkr = { > + .enable_reg = 0x13a80, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_core_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_slow_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_cpas_ahb_clk = { > + .halt_reg = 0x138bc, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x138bc, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cpas_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_slow_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_cpas_bps_clk = { > + .halt_reg = 0x103b0, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x103b0, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cpas_bps_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_bps_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_cpas_fast_ahb_clk = { > + .halt_reg = 0x138c8, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x138c8, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cpas_fast_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_fast_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_cpas_ife_0_clk = { > + .halt_reg = 0x11150, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x11150, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cpas_ife_0_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_ife_0_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_cpas_ife_lite_clk = { > + .halt_reg = 0x13138, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13138, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cpas_ife_lite_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_ife_lite_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_cpas_ipe_nps_clk = { > + .halt_reg = 0x10504, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x10504, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_cpas_ipe_nps_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_ipe_nps_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csi0phytimer_clk = { > + .halt_reg = 0x150f8, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x150f8, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi0phytimer_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_csi0phytimer_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csi1phytimer_clk = { > + .halt_reg = 0x1511c, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x1511c, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi1phytimer_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_csi1phytimer_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csi2phytimer_clk = { > + .halt_reg = 0x15250, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15250, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi2phytimer_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_csi2phytimer_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csi3phytimer_clk = { > + .halt_reg = 0x15384, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15384, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi3phytimer_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_csi3phytimer_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csi4phytimer_clk = { > + .halt_reg = 0x154b8, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x154b8, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi4phytimer_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_csi4phytimer_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csi5phytimer_clk = { > + .halt_reg = 0x155ec, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x155ec, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csi5phytimer_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_csi5phytimer_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csid_clk = { > + .halt_reg = 0x138ec, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x138ec, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csid_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_csid_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csid_csiphy_rx_clk = { > + .halt_reg = 0x15100, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15100, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csid_csiphy_rx_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cphy_rx_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csiphy0_clk = { > + .halt_reg = 0x150fc, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x150fc, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csiphy0_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cphy_rx_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csiphy1_clk = { > + .halt_reg = 0x15120, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15120, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csiphy1_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cphy_rx_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csiphy2_clk = { > + .halt_reg = 0x15254, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15254, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csiphy2_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cphy_rx_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csiphy3_clk = { > + .halt_reg = 0x15388, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15388, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csiphy3_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cphy_rx_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csiphy4_clk = { > + .halt_reg = 0x154bc, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x154bc, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csiphy4_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cphy_rx_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_csiphy5_clk = { > + .halt_reg = 0x155f0, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x155f0, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_csiphy5_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cphy_rx_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_icp_ahb_clk = { > + .halt_reg = 0x13658, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13658, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_icp_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_slow_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_icp_clk = { > + .halt_reg = 0x1364c, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x1364c, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_icp_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_icp_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ife_0_clk = { > + .halt_reg = 0x11144, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x11144, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_0_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_ife_0_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ife_0_dsp_clk = { > + .halt_reg = 0x11154, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x11154, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_0_dsp_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_ife_0_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ife_0_fast_ahb_clk = { > + .halt_reg = 0x11160, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x11160, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_0_fast_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_fast_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ife_lite_ahb_clk = { > + .halt_reg = 0x13278, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13278, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_lite_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_slow_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ife_lite_clk = { > + .halt_reg = 0x1312c, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x1312c, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_lite_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_ife_lite_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ife_lite_cphy_rx_clk = { > + .halt_reg = 0x13274, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13274, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_lite_cphy_rx_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_cphy_rx_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ife_lite_csid_clk = { > + .halt_reg = 0x13268, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13268, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ife_lite_csid_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_ife_lite_csid_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ipe_nps_ahb_clk = { > + .halt_reg = 0x1051c, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x1051c, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ipe_nps_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_slow_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ipe_nps_clk = { > + .halt_reg = 0x104f8, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x104f8, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ipe_nps_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_ipe_nps_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ipe_nps_fast_ahb_clk = { > + .halt_reg = 0x10520, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x10520, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ipe_nps_fast_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_fast_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ipe_pps_clk = { > + .halt_reg = 0x10508, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x10508, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ipe_pps_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_ipe_nps_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_ipe_pps_fast_ahb_clk = { > + .halt_reg = 0x10524, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x10524, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_ipe_pps_fast_ahb_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_fast_ahb_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_jpeg_clk = { > + .halt_reg = 0x13508, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13508, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_jpeg_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_jpeg_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_mclk0_clk = { > + .halt_reg = 0x15018, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15018, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk0_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_mclk0_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_mclk1_clk = { > + .halt_reg = 0x15034, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15034, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk1_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_mclk1_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_mclk2_clk = { > + .halt_reg = 0x15050, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15050, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk2_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_mclk2_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_mclk3_clk = { > + .halt_reg = 0x1506c, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x1506c, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk3_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_mclk3_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_mclk4_clk = { > + .halt_reg = 0x15088, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x15088, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk4_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_mclk4_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_mclk5_clk = { > + .halt_reg = 0x150a4, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x150a4, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk5_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_mclk5_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_mclk6_clk = { > + .halt_reg = 0x150c0, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x150c0, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk6_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_mclk6_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_mclk7_clk = { > + .halt_reg = 0x150dc, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x150dc, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_mclk7_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_mclk7_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_qdss_debug_clk = { > + .halt_reg = 0x13a64, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13a64, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_qdss_debug_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_qdss_debug_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct clk_branch cam_cc_qdss_debug_xo_clk = { > + .halt_reg = 0x13a68, > + .halt_check = BRANCH_HALT, > + .clkr = { > + .enable_reg = 0x13a68, > + .enable_mask = BIT(0), > + .hw.init = &(const struct clk_init_data) { > + .name = "cam_cc_qdss_debug_xo_clk", > + .parent_hws = (const struct clk_hw*[]) { > + &cam_cc_xo_clk_src.clkr.hw, > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + .ops = &clk_branch2_ops, > + }, > + }, > +}; > + > +static struct gdsc cam_cc_titan_top_gdsc = { > + .gdscr = 0x13a6c, > + .en_rest_wait_val = 0x2, > + .en_few_wait_val = 0x2, > + .clk_dis_wait_val = 0xf, > + .pd = { > + .name = "cam_cc_titan_top_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, > +}; > + > +static struct gdsc cam_cc_bps_gdsc = { > + .gdscr = 0x10004, > + .en_rest_wait_val = 0x2, > + .en_few_wait_val = 0x2, > + .clk_dis_wait_val = 0xf, > + .pd = { > + .name = "cam_cc_bps_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > + .parent = &cam_cc_titan_top_gdsc.pd, > + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, > +}; > + > +static struct gdsc cam_cc_ife_0_gdsc = { > + .gdscr = 0x11004, > + .en_rest_wait_val = 0x2, > + .en_few_wait_val = 0x2, > + .clk_dis_wait_val = 0xf, > + .pd = { > + .name = "cam_cc_ife_0_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > + .parent = &cam_cc_titan_top_gdsc.pd, > + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, > +}; > + > +static struct gdsc cam_cc_ipe_0_gdsc = { > + .gdscr = 0x103b8, > + .en_rest_wait_val = 0x2, > + .en_few_wait_val = 0x2, > + .clk_dis_wait_val = 0xf, > + .pd = { > + .name = "cam_cc_ipe_0_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > + .parent = &cam_cc_titan_top_gdsc.pd, > + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, > +}; > + > +static struct clk_regmap *cam_cc_x1p42100_clocks[] = { > + [CAM_CC_BPS_AHB_CLK] = &cam_cc_bps_ahb_clk.clkr, > + [CAM_CC_BPS_CLK] = &cam_cc_bps_clk.clkr, > + [CAM_CC_BPS_CLK_SRC] = &cam_cc_bps_clk_src.clkr, > + [CAM_CC_BPS_FAST_AHB_CLK] = &cam_cc_bps_fast_ahb_clk.clkr, > + [CAM_CC_CAMNOC_AXI_NRT_CLK] = &cam_cc_camnoc_axi_nrt_clk.clkr, > + [CAM_CC_CAMNOC_AXI_RT_CLK] = &cam_cc_camnoc_axi_rt_clk.clkr, > + [CAM_CC_CAMNOC_AXI_RT_CLK_SRC] = &cam_cc_camnoc_axi_rt_clk_src.clkr, > + [CAM_CC_CAMNOC_DCD_XO_CLK] = &cam_cc_camnoc_dcd_xo_clk.clkr, > + [CAM_CC_CAMNOC_XO_CLK] = &cam_cc_camnoc_xo_clk.clkr, > + [CAM_CC_CCI_0_CLK] = &cam_cc_cci_0_clk.clkr, > + [CAM_CC_CCI_0_CLK_SRC] = &cam_cc_cci_0_clk_src.clkr, > + [CAM_CC_CCI_1_CLK] = &cam_cc_cci_1_clk.clkr, > + [CAM_CC_CCI_1_CLK_SRC] = &cam_cc_cci_1_clk_src.clkr, > + [CAM_CC_CORE_AHB_CLK] = &cam_cc_core_ahb_clk.clkr, > + [CAM_CC_CPAS_AHB_CLK] = &cam_cc_cpas_ahb_clk.clkr, > + [CAM_CC_CPAS_BPS_CLK] = &cam_cc_cpas_bps_clk.clkr, > + [CAM_CC_CPAS_FAST_AHB_CLK] = &cam_cc_cpas_fast_ahb_clk.clkr, > + [CAM_CC_CPAS_IFE_0_CLK] = &cam_cc_cpas_ife_0_clk.clkr, > + [CAM_CC_CPAS_IFE_LITE_CLK] = &cam_cc_cpas_ife_lite_clk.clkr, > + [CAM_CC_CPAS_IPE_NPS_CLK] = &cam_cc_cpas_ipe_nps_clk.clkr, > + [CAM_CC_CPHY_RX_CLK_SRC] = &cam_cc_cphy_rx_clk_src.clkr, > + [CAM_CC_CSI0PHYTIMER_CLK] = &cam_cc_csi0phytimer_clk.clkr, > + [CAM_CC_CSI0PHYTIMER_CLK_SRC] = &cam_cc_csi0phytimer_clk_src.clkr, > + [CAM_CC_CSI1PHYTIMER_CLK] = &cam_cc_csi1phytimer_clk.clkr, > + [CAM_CC_CSI1PHYTIMER_CLK_SRC] = &cam_cc_csi1phytimer_clk_src.clkr, > + [CAM_CC_CSI2PHYTIMER_CLK] = &cam_cc_csi2phytimer_clk.clkr, > + [CAM_CC_CSI2PHYTIMER_CLK_SRC] = &cam_cc_csi2phytimer_clk_src.clkr, > + [CAM_CC_CSI3PHYTIMER_CLK] = &cam_cc_csi3phytimer_clk.clkr, > + [CAM_CC_CSI3PHYTIMER_CLK_SRC] = &cam_cc_csi3phytimer_clk_src.clkr, > + [CAM_CC_CSI4PHYTIMER_CLK] = &cam_cc_csi4phytimer_clk.clkr, > + [CAM_CC_CSI4PHYTIMER_CLK_SRC] = &cam_cc_csi4phytimer_clk_src.clkr, > + [CAM_CC_CSI5PHYTIMER_CLK] = &cam_cc_csi5phytimer_clk.clkr, > + [CAM_CC_CSI5PHYTIMER_CLK_SRC] = &cam_cc_csi5phytimer_clk_src.clkr, > + [CAM_CC_CSID_CLK] = &cam_cc_csid_clk.clkr, > + [CAM_CC_CSID_CLK_SRC] = &cam_cc_csid_clk_src.clkr, > + [CAM_CC_CSID_CSIPHY_RX_CLK] = &cam_cc_csid_csiphy_rx_clk.clkr, > + [CAM_CC_CSIPHY0_CLK] = &cam_cc_csiphy0_clk.clkr, > + [CAM_CC_CSIPHY1_CLK] = &cam_cc_csiphy1_clk.clkr, > + [CAM_CC_CSIPHY2_CLK] = &cam_cc_csiphy2_clk.clkr, > + [CAM_CC_CSIPHY3_CLK] = &cam_cc_csiphy3_clk.clkr, > + [CAM_CC_CSIPHY4_CLK] = &cam_cc_csiphy4_clk.clkr, > + [CAM_CC_CSIPHY5_CLK] = &cam_cc_csiphy5_clk.clkr, > + [CAM_CC_FAST_AHB_CLK_SRC] = &cam_cc_fast_ahb_clk_src.clkr, > + [CAM_CC_ICP_AHB_CLK] = &cam_cc_icp_ahb_clk.clkr, > + [CAM_CC_ICP_CLK] = &cam_cc_icp_clk.clkr, > + [CAM_CC_ICP_CLK_SRC] = &cam_cc_icp_clk_src.clkr, > + [CAM_CC_IFE_0_CLK] = &cam_cc_ife_0_clk.clkr, > + [CAM_CC_IFE_0_CLK_SRC] = &cam_cc_ife_0_clk_src.clkr, > + [CAM_CC_IFE_0_DSP_CLK] = &cam_cc_ife_0_dsp_clk.clkr, > + [CAM_CC_IFE_0_FAST_AHB_CLK] = &cam_cc_ife_0_fast_ahb_clk.clkr, > + [CAM_CC_IFE_LITE_AHB_CLK] = &cam_cc_ife_lite_ahb_clk.clkr, > + [CAM_CC_IFE_LITE_CLK] = &cam_cc_ife_lite_clk.clkr, > + [CAM_CC_IFE_LITE_CLK_SRC] = &cam_cc_ife_lite_clk_src.clkr, > + [CAM_CC_IFE_LITE_CPHY_RX_CLK] = &cam_cc_ife_lite_cphy_rx_clk.clkr, > + [CAM_CC_IFE_LITE_CSID_CLK] = &cam_cc_ife_lite_csid_clk.clkr, > + [CAM_CC_IFE_LITE_CSID_CLK_SRC] = &cam_cc_ife_lite_csid_clk_src.clkr, > + [CAM_CC_IPE_NPS_AHB_CLK] = &cam_cc_ipe_nps_ahb_clk.clkr, > + [CAM_CC_IPE_NPS_CLK] = &cam_cc_ipe_nps_clk.clkr, > + [CAM_CC_IPE_NPS_CLK_SRC] = &cam_cc_ipe_nps_clk_src.clkr, > + [CAM_CC_IPE_NPS_FAST_AHB_CLK] = &cam_cc_ipe_nps_fast_ahb_clk.clkr, > + [CAM_CC_IPE_PPS_CLK] = &cam_cc_ipe_pps_clk.clkr, > + [CAM_CC_IPE_PPS_FAST_AHB_CLK] = &cam_cc_ipe_pps_fast_ahb_clk.clkr, > + [CAM_CC_JPEG_CLK] = &cam_cc_jpeg_clk.clkr, > + [CAM_CC_JPEG_CLK_SRC] = &cam_cc_jpeg_clk_src.clkr, > + [CAM_CC_MCLK0_CLK] = &cam_cc_mclk0_clk.clkr, > + [CAM_CC_MCLK0_CLK_SRC] = &cam_cc_mclk0_clk_src.clkr, > + [CAM_CC_MCLK1_CLK] = &cam_cc_mclk1_clk.clkr, > + [CAM_CC_MCLK1_CLK_SRC] = &cam_cc_mclk1_clk_src.clkr, > + [CAM_CC_MCLK2_CLK] = &cam_cc_mclk2_clk.clkr, > + [CAM_CC_MCLK2_CLK_SRC] = &cam_cc_mclk2_clk_src.clkr, > + [CAM_CC_MCLK3_CLK] = &cam_cc_mclk3_clk.clkr, > + [CAM_CC_MCLK3_CLK_SRC] = &cam_cc_mclk3_clk_src.clkr, > + [CAM_CC_MCLK4_CLK] = &cam_cc_mclk4_clk.clkr, > + [CAM_CC_MCLK4_CLK_SRC] = &cam_cc_mclk4_clk_src.clkr, > + [CAM_CC_MCLK5_CLK] = &cam_cc_mclk5_clk.clkr, > + [CAM_CC_MCLK5_CLK_SRC] = &cam_cc_mclk5_clk_src.clkr, > + [CAM_CC_MCLK6_CLK] = &cam_cc_mclk6_clk.clkr, > + [CAM_CC_MCLK6_CLK_SRC] = &cam_cc_mclk6_clk_src.clkr, > + [CAM_CC_MCLK7_CLK] = &cam_cc_mclk7_clk.clkr, > + [CAM_CC_MCLK7_CLK_SRC] = &cam_cc_mclk7_clk_src.clkr, > + [CAM_CC_PLL0] = &cam_cc_pll0.clkr, > + [CAM_CC_PLL0_OUT_EVEN] = &cam_cc_pll0_out_even.clkr, > + [CAM_CC_PLL0_OUT_ODD] = &cam_cc_pll0_out_odd.clkr, > + [CAM_CC_PLL1] = &cam_cc_pll1.clkr, > + [CAM_CC_PLL1_OUT_EVEN] = &cam_cc_pll1_out_even.clkr, > + [CAM_CC_PLL2] = &cam_cc_pll2.clkr, > + [CAM_CC_PLL3] = &cam_cc_pll3.clkr, > + [CAM_CC_PLL3_OUT_EVEN] = &cam_cc_pll3_out_even.clkr, > + [CAM_CC_PLL6] = &cam_cc_pll6.clkr, > + [CAM_CC_PLL6_OUT_EVEN] = &cam_cc_pll6_out_even.clkr, > + [CAM_CC_QDSS_DEBUG_CLK] = &cam_cc_qdss_debug_clk.clkr, > + [CAM_CC_QDSS_DEBUG_CLK_SRC] = &cam_cc_qdss_debug_clk_src.clkr, > + [CAM_CC_QDSS_DEBUG_XO_CLK] = &cam_cc_qdss_debug_xo_clk.clkr, > + [CAM_CC_SLEEP_CLK_SRC] = &cam_cc_sleep_clk_src.clkr, > + [CAM_CC_SLOW_AHB_CLK_SRC] = &cam_cc_slow_ahb_clk_src.clkr, > + [CAM_CC_XO_CLK_SRC] = &cam_cc_xo_clk_src.clkr, > +}; > + > +static struct gdsc *cam_cc_x1p42100_gdscs[] = { > + [CAM_CC_BPS_GDSC] = &cam_cc_bps_gdsc, > + [CAM_CC_IFE_0_GDSC] = &cam_cc_ife_0_gdsc, > + [CAM_CC_IPE_0_GDSC] = &cam_cc_ipe_0_gdsc, > + [CAM_CC_TITAN_TOP_GDSC] = &cam_cc_titan_top_gdsc, > +}; > + > +static const struct qcom_reset_map cam_cc_x1p42100_resets[] = { > + [CAM_CC_BPS_BCR] = { 0x10000 }, > + [CAM_CC_ICP_BCR] = { 0x1351c }, > + [CAM_CC_IFE_0_BCR] = { 0x11000 }, > + [CAM_CC_IPE_0_BCR] = { 0x103b4 }, > +}; > + > +static struct clk_alpha_pll *cam_cc_x1p42100_plls[] = { > + &cam_cc_pll0, > + &cam_cc_pll1, > + &cam_cc_pll2, > + &cam_cc_pll3, > + &cam_cc_pll6, > +}; > + > +static u32 cam_cc_x1p42100_critical_cbcrs[] = { > + 0x13a9c, /* CAM_CC_GDSC_CLK */ > + 0x13ab8, /* CAM_CC_SLEEP_CLK */ > +}; > + > +static const struct regmap_config cam_cc_x1p42100_regmap_config = { > + .reg_bits = 32, > + .reg_stride = 4, > + .val_bits = 32, > + .max_register = 0x1603c, > + .fast_io = true, > +}; > + > +static struct qcom_cc_driver_data cam_cc_x1p42100_driver_data = { > + .alpha_plls = cam_cc_x1p42100_plls, > + .num_alpha_plls = ARRAY_SIZE(cam_cc_x1p42100_plls), > + .clk_cbcrs = cam_cc_x1p42100_critical_cbcrs, > + .num_clk_cbcrs = ARRAY_SIZE(cam_cc_x1p42100_critical_cbcrs), > +}; > + > +static struct qcom_cc_desc cam_cc_x1p42100_desc = { > + .config = &cam_cc_x1p42100_regmap_config, > + .clks = cam_cc_x1p42100_clocks, > + .num_clks = ARRAY_SIZE(cam_cc_x1p42100_clocks), > + .resets = cam_cc_x1p42100_resets, > + .num_resets = ARRAY_SIZE(cam_cc_x1p42100_resets), > + .gdscs = cam_cc_x1p42100_gdscs, > + .num_gdscs = ARRAY_SIZE(cam_cc_x1p42100_gdscs), > + .use_rpm = true, > + .driver_data = &cam_cc_x1p42100_driver_data, > +}; > + > +static const struct of_device_id cam_cc_x1p42100_match_table[] = { > + { .compatible = "qcom,x1p42100-camcc" }, > + { } > +}; > +MODULE_DEVICE_TABLE(of, cam_cc_x1p42100_match_table); > + > +static int cam_cc_x1p42100_probe(struct platform_device *pdev) > +{ > + return qcom_cc_probe(pdev, &cam_cc_x1p42100_desc); > +} > + > +static struct platform_driver cam_cc_x1p42100_driver = { > + .probe = cam_cc_x1p42100_probe, > + .driver = { > + .name = "camcc-x1p42100", > + .of_match_table = cam_cc_x1p42100_match_table, > + }, > +}; > + > +module_platform_driver(cam_cc_x1p42100_driver); > + > +MODULE_DESCRIPTION("QTI CAMCC X1P42100 Driver"); > +MODULE_LICENSE("GPL"); > Reviewed-by: Taniya Das <taniya.das@oss.qualcomm.com> -- Thanks, Taniya Das ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller 2026-01-27 19:26 ` [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller Jagadeesh Kona 2026-01-28 4:45 ` Taniya Das @ 2026-01-28 10:17 ` Konrad Dybcio 2026-01-29 0:39 ` Dmitry Baryshkov 2 siblings, 0 replies; 35+ messages in thread From: Konrad Dybcio @ 2026-01-28 10:17 UTC (permalink / raw) To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/27/26 8:26 PM, Jagadeesh Kona wrote: > Add support for the camera clock controller for camera clients to > be able to request for camcc clocks on X1P42100 platform. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- [...] > +#include <dt-bindings/clock/qcom,x1e80100-camcc.h> I have mixed feelings. Purwa lacks sfe_0, pll7, pll8, ife_1 clocks and all their supporting infrastructure. All other clocks seem to indeed be common. Perhaps it's not that bad given it's a strict subset and they have a shared DT The driver itself looks OK So Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller 2026-01-27 19:26 ` [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller Jagadeesh Kona 2026-01-28 4:45 ` Taniya Das 2026-01-28 10:17 ` Konrad Dybcio @ 2026-01-29 0:39 ` Dmitry Baryshkov 2026-02-04 17:47 ` Jagadeesh Kona 2 siblings, 1 reply; 35+ messages in thread From: Dmitry Baryshkov @ 2026-01-29 0:39 UTC (permalink / raw) To: Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On Wed, Jan 28, 2026 at 12:56:36AM +0530, Jagadeesh Kona wrote: > Add support for the camera clock controller for camera clients to > be able to request for camcc clocks on X1P42100 platform. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- > drivers/clk/qcom/Kconfig | 10 + > drivers/clk/qcom/Makefile | 1 + > drivers/clk/qcom/camcc-x1p42100.c | 2223 +++++++++++++++++++++++++++++++++++++ > 3 files changed, 2234 insertions(+) Again, this one is pretty similar to the one working for X1E80100. Can they be merged? -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller 2026-01-29 0:39 ` Dmitry Baryshkov @ 2026-02-04 17:47 ` Jagadeesh Kona 0 siblings, 0 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-02-04 17:47 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/29/2026 6:09 AM, Dmitry Baryshkov wrote: > On Wed, Jan 28, 2026 at 12:56:36AM +0530, Jagadeesh Kona wrote: >> Add support for the camera clock controller for camera clients to >> be able to request for camcc clocks on X1P42100 platform. >> >> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> >> --- >> drivers/clk/qcom/Kconfig | 10 + >> drivers/clk/qcom/Makefile | 1 + >> drivers/clk/qcom/camcc-x1p42100.c | 2223 +++++++++++++++++++++++++++++++++++++ >> 3 files changed, 2234 insertions(+) > > Again, this one is pretty similar to the one working for X1E80100. Can > they be merged? > > Here also there is significant delta. Few PLLs, clocks and GDSC's are removed. There is delta in frequency table for most RCG's and parent data structures also changed for few RCG's. Hence added a separate driver for Purwa. Thanks, Jagadeesh ^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 6/8] arm64: dts: qcom: x1e80100: Add CAMCC block definition 2026-01-27 19:26 [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform Jagadeesh Kona ` (4 preceding siblings ...) 2026-01-27 19:26 ` [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller Jagadeesh Kona @ 2026-01-27 19:26 ` Jagadeesh Kona 2026-01-28 8:19 ` Abel Vesa 2026-01-27 19:26 ` [PATCH 7/8] arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa Jagadeesh Kona 2026-01-27 19:26 ` [PATCH 8/8] arm64: defconfig: Enable VIDEOCC and CAMCC drivers on Qualcomm X1P42100 Jagadeesh Kona 7 siblings, 1 reply; 35+ messages in thread From: Jagadeesh Kona @ 2026-01-27 19:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel, Jagadeesh Kona, Vladimir Zapolskiy, Konrad Dybcio From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Add the CAMCC block for x1e80100. The x1e80100 CAMCC block is an iteration of previous CAMCC blocks with the exception of having two required power-domains not just one. Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> --- arch/arm64/boot/dts/qcom/hamoa.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi b/arch/arm64/boot/dts/qcom/hamoa.dtsi index db65c392e6189920a137169b14b607c6acac6ce9..029ec012d0a94b05f8d4356ba4a95badeda65c39 100644 --- a/arch/arm64/boot/dts/qcom/hamoa.dtsi +++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi @@ -6,6 +6,7 @@ #include <dt-bindings/clock/qcom,rpmh.h> #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h> #include <dt-bindings/clock/qcom,sm8450-videocc.h> +#include <dt-bindings/clock/qcom,x1e80100-camcc.h> #include <dt-bindings/clock/qcom,x1e80100-dispcc.h> #include <dt-bindings/clock/qcom,x1e80100-gcc.h> #include <dt-bindings/clock/qcom,x1e80100-gpucc.h> @@ -5464,6 +5465,22 @@ videocc: clock-controller@aaf0000 { #power-domain-cells = <1>; }; + camcc: clock-controller@ade0000 { + compatible = "qcom,x1e80100-camcc"; + reg = <0 0x0ade0000 0 0x20000>; + clocks = <&gcc GCC_CAMERA_AHB_CLK>, + <&bi_tcxo_div2>, + <&bi_tcxo_ao_div2>, + <&sleep_clk>; + power-domains = <&rpmhpd RPMHPD_MXC>, + <&rpmhpd RPMHPD_MMCX>; + required-opps = <&rpmhpd_opp_low_svs>, + <&rpmhpd_opp_low_svs>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + mdss: display-subsystem@ae00000 { compatible = "qcom,x1e80100-mdss"; reg = <0 0x0ae00000 0 0x1000>; -- 2.34.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 6/8] arm64: dts: qcom: x1e80100: Add CAMCC block definition 2026-01-27 19:26 ` [PATCH 6/8] arm64: dts: qcom: x1e80100: Add CAMCC block definition Jagadeesh Kona @ 2026-01-28 8:19 ` Abel Vesa 0 siblings, 0 replies; 35+ messages in thread From: Abel Vesa @ 2026-01-28 8:19 UTC (permalink / raw) To: Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel, Vladimir Zapolskiy, Konrad Dybcio On 26-01-28 00:56:37, Jagadeesh Kona wrote: > From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > > Add the CAMCC block for x1e80100. The x1e80100 CAMCC block is an iteration > of previous CAMCC blocks with the exception of having two required > power-domains not just one. > > Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> > Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> ^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 7/8] arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa 2026-01-27 19:26 [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform Jagadeesh Kona ` (5 preceding siblings ...) 2026-01-27 19:26 ` [PATCH 6/8] arm64: dts: qcom: x1e80100: Add CAMCC block definition Jagadeesh Kona @ 2026-01-27 19:26 ` Jagadeesh Kona 2026-01-28 8:24 ` Abel Vesa 2026-01-28 10:19 ` Konrad Dybcio 2026-01-27 19:26 ` [PATCH 8/8] arm64: defconfig: Enable VIDEOCC and CAMCC drivers on Qualcomm X1P42100 Jagadeesh Kona 7 siblings, 2 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-01-27 19:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel, Jagadeesh Kona Update the compatible for videocc and camcc nodes to match with their respective purwa(X1P42100) specific drivers. Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> --- arch/arm64/boot/dts/qcom/purwa.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/purwa.dtsi b/arch/arm64/boot/dts/qcom/purwa.dtsi index 2cecd2dd0de8c39f0702d6983bead2bc2adccf9b..63599ba0a4f488d8f40f3e4d849645a8fa9ebf59 100644 --- a/arch/arm64/boot/dts/qcom/purwa.dtsi +++ b/arch/arm64/boot/dts/qcom/purwa.dtsi @@ -6,6 +6,8 @@ /* X1P42100 is heavily based on hamoa, with some meaningful differences */ #include "hamoa.dtsi" +#include <dt-bindings/clock/qcom,x1p42100-videocc.h> + /delete-node/ &bwmon_cluster0; /delete-node/ &cluster_pd2; /delete-node/ &cpu_map_cluster2; @@ -22,10 +24,18 @@ /delete-node/ &pcie3_phy; /delete-node/ &thermal_zones; +&camcc { + compatible = "qcom,x1p42100-camcc"; +}; + &gcc { compatible = "qcom,x1p42100-gcc", "qcom,x1e80100-gcc"; }; +&videocc { + compatible = "qcom,x1p42100-videocc"; +}; + &gmu { compatible = "qcom,adreno-gmu-x145.0", "qcom,adreno-gmu"; }; -- 2.34.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 7/8] arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa 2026-01-27 19:26 ` [PATCH 7/8] arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa Jagadeesh Kona @ 2026-01-28 8:24 ` Abel Vesa 2026-01-28 10:19 ` Konrad Dybcio 1 sibling, 0 replies; 35+ messages in thread From: Abel Vesa @ 2026-01-28 8:24 UTC (permalink / raw) To: Jagadeesh Kona Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio, Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 26-01-28 00:56:38, Jagadeesh Kona wrote: > Update the compatible for videocc and camcc nodes to match with their > respective purwa(X1P42100) specific drivers. Nit: if you respin, Purwa and then a space, please. In subject line as well. In any case: Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 7/8] arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa 2026-01-27 19:26 ` [PATCH 7/8] arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa Jagadeesh Kona 2026-01-28 8:24 ` Abel Vesa @ 2026-01-28 10:19 ` Konrad Dybcio 2026-02-04 17:48 ` Jagadeesh Kona 1 sibling, 1 reply; 35+ messages in thread From: Konrad Dybcio @ 2026-01-28 10:19 UTC (permalink / raw) To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/27/26 8:26 PM, Jagadeesh Kona wrote: > Update the compatible for videocc and camcc nodes to match with their > respective purwa(X1P42100) specific drivers. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- > arch/arm64/boot/dts/qcom/purwa.dtsi | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/purwa.dtsi b/arch/arm64/boot/dts/qcom/purwa.dtsi > index 2cecd2dd0de8c39f0702d6983bead2bc2adccf9b..63599ba0a4f488d8f40f3e4d849645a8fa9ebf59 100644 > --- a/arch/arm64/boot/dts/qcom/purwa.dtsi > +++ b/arch/arm64/boot/dts/qcom/purwa.dtsi > @@ -6,6 +6,8 @@ > /* X1P42100 is heavily based on hamoa, with some meaningful differences */ > #include "hamoa.dtsi" > > +#include <dt-bindings/clock/qcom,x1p42100-videocc.h> > + > /delete-node/ &bwmon_cluster0; > /delete-node/ &cluster_pd2; > /delete-node/ &cpu_map_cluster2; > @@ -22,10 +24,18 @@ > /delete-node/ &pcie3_phy; > /delete-node/ &thermal_zones; > > +&camcc { > + compatible = "qcom,x1p42100-camcc"; > +}; Squash with patch(n-1) please > + > &gcc { > compatible = "qcom,x1p42100-gcc", "qcom,x1e80100-gcc"; > }; > > +&videocc { > + compatible = "qcom,x1p42100-videocc"; > +}; This should be a 'fixes' commit, as since Commit a8a5ea012471 ("arm64: dts: qcom: x1e80100: Add videocc") Purwa has been ""happily"" running the wrong driver Konrad ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 7/8] arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa 2026-01-28 10:19 ` Konrad Dybcio @ 2026-02-04 17:48 ` Jagadeesh Kona 0 siblings, 0 replies; 35+ messages in thread From: Jagadeesh Kona @ 2026-02-04 17:48 UTC (permalink / raw) To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 1/28/2026 3:49 PM, Konrad Dybcio wrote: > On 1/27/26 8:26 PM, Jagadeesh Kona wrote: >> Update the compatible for videocc and camcc nodes to match with their >> respective purwa(X1P42100) specific drivers. >> >> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> >> --- >> arch/arm64/boot/dts/qcom/purwa.dtsi | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/purwa.dtsi b/arch/arm64/boot/dts/qcom/purwa.dtsi >> index 2cecd2dd0de8c39f0702d6983bead2bc2adccf9b..63599ba0a4f488d8f40f3e4d849645a8fa9ebf59 100644 >> --- a/arch/arm64/boot/dts/qcom/purwa.dtsi >> +++ b/arch/arm64/boot/dts/qcom/purwa.dtsi >> @@ -6,6 +6,8 @@ >> /* X1P42100 is heavily based on hamoa, with some meaningful differences */ >> #include "hamoa.dtsi" >> >> +#include <dt-bindings/clock/qcom,x1p42100-videocc.h> >> + >> /delete-node/ &bwmon_cluster0; >> /delete-node/ &cluster_pd2; >> /delete-node/ &cpu_map_cluster2; >> @@ -22,10 +24,18 @@ >> /delete-node/ &pcie3_phy; >> /delete-node/ &thermal_zones; >> >> +&camcc { >> + compatible = "qcom,x1p42100-camcc"; >> +}; > > Squash with patch(n-1) please > Sure, will squash it in previous patch in next series. >> + >> &gcc { >> compatible = "qcom,x1p42100-gcc", "qcom,x1e80100-gcc"; >> }; >> >> +&videocc { >> + compatible = "qcom,x1p42100-videocc"; >> +}; > > This should be a 'fixes' commit, as since Commit a8a5ea012471 > ("arm64: dts: qcom: x1e80100: Add videocc") Purwa has been ""happily"" > running the wrong driver > Will add fixes tag in next series. Thanks, Jagadeesh > Konrad ^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 8/8] arm64: defconfig: Enable VIDEOCC and CAMCC drivers on Qualcomm X1P42100 2026-01-27 19:26 [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform Jagadeesh Kona ` (6 preceding siblings ...) 2026-01-27 19:26 ` [PATCH 7/8] arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa Jagadeesh Kona @ 2026-01-27 19:26 ` Jagadeesh Kona 2026-02-08 11:26 ` Krzysztof Kozlowski 7 siblings, 1 reply; 35+ messages in thread From: Jagadeesh Kona @ 2026-01-27 19:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel, Jagadeesh Kona Enable video and camera clock controller drivers for their respective functionalities on Qualcomm X1P42100-CRD and similar other platforms with Snapdragon X1P42100 SoC. Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 7a6d7e70d38352a3eda4a39c39a9549508b3b944..50cecf05027e6de754771b9ab5195216f908f859 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -1461,7 +1461,9 @@ CONFIG_CLK_X1E80100_DISPCC=m CONFIG_CLK_X1E80100_GCC=y CONFIG_CLK_X1E80100_GPUCC=m CONFIG_CLK_X1E80100_TCSRCC=y +CONFIG_CLK_X1P42100_CAMCC=m CONFIG_CLK_X1P42100_GPUCC=m +CONFIG_CLK_X1P42100_VIDEOCC=m CONFIG_CLK_QCM2290_GPUCC=m CONFIG_QCOM_A53PLL=y CONFIG_QCOM_CLK_APCS_MSM8916=y -- 2.34.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 8/8] arm64: defconfig: Enable VIDEOCC and CAMCC drivers on Qualcomm X1P42100 2026-01-27 19:26 ` [PATCH 8/8] arm64: defconfig: Enable VIDEOCC and CAMCC drivers on Qualcomm X1P42100 Jagadeesh Kona @ 2026-02-08 11:26 ` Krzysztof Kozlowski 0 siblings, 0 replies; 35+ messages in thread From: Krzysztof Kozlowski @ 2026-02-08 11:26 UTC (permalink / raw) To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jagadeesh Kona, Bryan O'Donoghue, Konrad Dybcio Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk, devicetree, linux-kernel On 27/01/2026 20:26, Jagadeesh Kona wrote: > Enable video and camera clock controller drivers for their respective > functionalities on Qualcomm X1P42100-CRD and similar other platforms > with Snapdragon X1P42100 SoC. > > Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2026-02-08 11:26 UTC | newest] Thread overview: 35+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-27 19:26 [PATCH 0/8] Add support for videocc and camcc on X1P42100 platform Jagadeesh Kona 2026-01-27 19:26 ` [PATCH 1/8] dt-bindings: clock: qcom: Add X1P42100 video clock controller Jagadeesh Kona 2026-01-27 20:34 ` Dmitry Baryshkov 2026-01-28 10:26 ` Konrad Dybcio 2026-02-04 17:44 ` Jagadeesh Kona 2026-01-28 10:08 ` Konrad Dybcio 2026-02-04 17:48 ` Jagadeesh Kona 2026-01-28 11:43 ` Krzysztof Kozlowski 2026-02-04 17:46 ` Jagadeesh Kona 2026-01-27 19:26 ` [PATCH 2/8] dt-bindings: clock: qcom: Add X1P42100 camera " Jagadeesh Kona 2026-01-28 11:45 ` Krzysztof Kozlowski 2026-01-27 19:26 ` [PATCH 3/8] clk: qcom: videocc-x1p42100: Add support for video " Jagadeesh Kona 2026-01-28 7:21 ` Taniya Das 2026-01-28 8:18 ` Abel Vesa 2026-01-29 0:37 ` Dmitry Baryshkov 2026-02-04 17:46 ` Jagadeesh Kona 2026-02-04 19:42 ` Dmitry Baryshkov 2026-01-27 19:26 ` [PATCH 4/8] clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks Jagadeesh Kona 2026-01-27 22:26 ` Bryan O'Donoghue 2026-01-28 10:14 ` Konrad Dybcio 2026-01-29 0:38 ` Dmitry Baryshkov 2026-02-04 17:47 ` Jagadeesh Kona 2026-01-27 19:26 ` [PATCH 5/8] clk: qcom: camcc-x1p42100: Add support for camera clock controller Jagadeesh Kona 2026-01-28 4:45 ` Taniya Das 2026-01-28 10:17 ` Konrad Dybcio 2026-01-29 0:39 ` Dmitry Baryshkov 2026-02-04 17:47 ` Jagadeesh Kona 2026-01-27 19:26 ` [PATCH 6/8] arm64: dts: qcom: x1e80100: Add CAMCC block definition Jagadeesh Kona 2026-01-28 8:19 ` Abel Vesa 2026-01-27 19:26 ` [PATCH 7/8] arm64: dts: qcom: Update compatible for videocc and camcc nodes on purwa Jagadeesh Kona 2026-01-28 8:24 ` Abel Vesa 2026-01-28 10:19 ` Konrad Dybcio 2026-02-04 17:48 ` Jagadeesh Kona 2026-01-27 19:26 ` [PATCH 8/8] arm64: defconfig: Enable VIDEOCC and CAMCC drivers on Qualcomm X1P42100 Jagadeesh Kona 2026-02-08 11:26 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox