[PATCH v3 2/3] clk: qcom: camcc-sm8250: use icc-clk for camera NoC AXI clock

From: Atanas Filipov

Date: Fri Oct 16 2026 - 13:09:51 EST


CAM_CC_CAMNOC_AXI_CLK is shared by several camera blocks. Setting its
rate directly from each consumer means the last writer wins.

Register the clock as an icc-clk path through the common icc_hws
support, as gcc-ipq9574 does. The interconnect core aggregates all
requests and the clock runs at the highest requested rate.

Use the RCG rather than the branch: icc-clk enables the clock at
registration, when TITAN_TOP_GDSC is still off. Consumers enable the
branch themselves.

Signed-off-by: Atanas Filipov <atanas.filipov@xxxxxxxxxxxxxxxx>
---
drivers/clk/qcom/camcc-sm8250.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/drivers/clk/qcom/camcc-sm8250.c b/drivers/clk/qcom/camcc-sm8250.c
index 21e9423676216..84a91103e5bef 100644
--- a/drivers/clk/qcom/camcc-sm8250.c
+++ b/drivers/clk/qcom/camcc-sm8250.c
@@ -4,11 +4,13 @@
*/

#include <linux/clk-provider.h>
+#include <linux/interconnect-provider.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

#include <dt-bindings/clock/qcom,camcc-sm8250.h>
+#include <dt-bindings/interconnect/qcom,sm8250.h>

#include "clk-alpha-pll.h"
#include "clk-branch.h"
@@ -2405,6 +2407,12 @@ static const struct regmap_config cam_cc_sm8250_regmap_config = {
.fast_io = true,
};

+#define SM8250_CAMCC_ICC_ID 8250 /* some unique value */
+
+static const struct qcom_icc_hws_data cam_cc_sm8250_icc_hws[] = {
+ { MASTER_CAMCC_CAMNOC_AXI, SLAVE_CAMCC_CAMNOC_AXI, CAM_CC_CAMNOC_AXI_CLK_SRC },
+};
+
static const struct qcom_cc_desc cam_cc_sm8250_desc = {
.config = &cam_cc_sm8250_regmap_config,
.clks = cam_cc_sm8250_clocks,
@@ -2413,6 +2421,9 @@ static const struct qcom_cc_desc cam_cc_sm8250_desc = {
.num_resets = ARRAY_SIZE(cam_cc_sm8250_resets),
.gdscs = cam_cc_sm8250_gdscs,
.num_gdscs = ARRAY_SIZE(cam_cc_sm8250_gdscs),
+ .icc_hws = cam_cc_sm8250_icc_hws,
+ .num_icc_hws = ARRAY_SIZE(cam_cc_sm8250_icc_hws),
+ .icc_first_node_id = SM8250_CAMCC_ICC_ID,
};

static const struct of_device_id cam_cc_sm8250_match_table[] = {
@@ -2443,6 +2454,7 @@ static struct platform_driver cam_cc_sm8250_driver = {
.driver = {
.name = "cam_cc-sm8250",
.of_match_table = cam_cc_sm8250_match_table,
+ .sync_state = icc_sync_state,
},
};

--
2.34.1