[PATCH 2/3] clk: qcom: ipq5210: Use icc-clk for enabling NoC related clocks

From: Varadarajan Narayanan

Date: Thu May 14 2026 - 00:06:58 EST


Use the icc-clk framework to enable few clocks to be able to
create paths and use the peripherals connected on those NoCs.

Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@xxxxxxxxxxxxxxxx>
---
drivers/clk/qcom/gcc-ipq5210.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/drivers/clk/qcom/gcc-ipq5210.c b/drivers/clk/qcom/gcc-ipq5210.c
index 3a786a21bdff..1111da24b512 100644
--- a/drivers/clk/qcom/gcc-ipq5210.c
+++ b/drivers/clk/qcom/gcc-ipq5210.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,ipq5210-gcc.h>
+#include <dt-bindings/interconnect/qcom,ipq5210.h>
#include <dt-bindings/reset/qcom,ipq5210-gcc.h>

#include "clk-alpha-pll.h"
@@ -2602,6 +2604,16 @@ static const struct qcom_reset_map gcc_ipq5210_resets[] = {
[GCC_QDSS_BCR] = { 0x2d000 },
};

+#define IPQ_APPS_ID 5210 /* some unique value */
+
+static const struct qcom_icc_hws_data icc_ipq5210_hws[] = {
+ { MASTER_CNOC_PCIE0, SLAVE_CNOC_PCIE0, GCC_CNOC_PCIE0_1LANE_S_CLK },
+ { MASTER_CNOC_PCIE1, SLAVE_CNOC_PCIE1, GCC_CNOC_PCIE1_2LANE_S_CLK },
+ { MASTER_SNOC_PCIE0, SLAVE_SNOC_PCIE0, GCC_SNOC_PCIE0_AXI_M_CLK },
+ { MASTER_SNOC_PCIE1, SLAVE_SNOC_PCIE1, GCC_SNOC_PCIE1_AXI_M_CLK },
+ { MASTER_USB, SLAVE_USB, GCC_CNOC_USB_CLK },
+};
+
static const struct of_device_id gcc_ipq5210_match_table[] = {
{ .compatible = "qcom,ipq5210-gcc" },
{ }
@@ -2630,6 +2642,9 @@ static const struct qcom_cc_desc gcc_ipq5210_desc = {
.num_resets = ARRAY_SIZE(gcc_ipq5210_resets),
.clk_hws = gcc_ipq5210_hws,
.num_clk_hws = ARRAY_SIZE(gcc_ipq5210_hws),
+ .icc_hws = icc_ipq5210_hws,
+ .num_icc_hws = ARRAY_SIZE(icc_ipq5210_hws),
+ .icc_first_node_id = IPQ_APPS_ID,
};

static int gcc_ipq5210_probe(struct platform_device *pdev)
@@ -2642,6 +2657,7 @@ static struct platform_driver gcc_ipq5210_driver = {
.driver = {
.name = "qcom,gcc-ipq5210",
.of_match_table = gcc_ipq5210_match_table,
+ .sync_state = icc_sync_state,
},
};


--
2.34.1