Skip to content

Commit 170f3d2

Browse files
quic-varadaandersson
authored andcommitted
clk: qcom: ipq5424: Use icc-clk for enabling NoC related clocks
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 <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20241213105808.674620-2-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 2e1c78b commit 170f3d2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

drivers/clk/qcom/gcc-ipq5424.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
*/
66

77
#include <linux/clk-provider.h>
8+
#include <linux/interconnect-provider.h>
89
#include <linux/kernel.h>
910
#include <linux/module.h>
1011
#include <linux/of.h>
1112
#include <linux/platform_device.h>
1213
#include <linux/regmap.h>
1314

1415
#include <dt-bindings/clock/qcom,ipq5424-gcc.h>
16+
#include <dt-bindings/interconnect/qcom,ipq5424.h>
1517
#include <dt-bindings/reset/qcom,ipq5424-gcc.h>
1618

1719
#include "clk-alpha-pll.h"
@@ -3230,6 +3232,20 @@ static const struct qcom_reset_map gcc_ipq5424_resets[] = {
32303232
[GCC_QUSB2_1_PHY_BCR] = { 0x3C030, 0 },
32313233
};
32323234

3235+
#define IPQ_APPS_ID 5424 /* some unique value */
3236+
3237+
static const struct qcom_icc_hws_data icc_ipq5424_hws[] = {
3238+
{ MASTER_ANOC_PCIE0, SLAVE_ANOC_PCIE0, GCC_ANOC_PCIE0_1LANE_M_CLK },
3239+
{ MASTER_CNOC_PCIE0, SLAVE_CNOC_PCIE0, GCC_CNOC_PCIE0_1LANE_S_CLK },
3240+
{ MASTER_ANOC_PCIE1, SLAVE_ANOC_PCIE1, GCC_ANOC_PCIE1_1LANE_M_CLK },
3241+
{ MASTER_CNOC_PCIE1, SLAVE_CNOC_PCIE1, GCC_CNOC_PCIE1_1LANE_S_CLK },
3242+
{ MASTER_ANOC_PCIE2, SLAVE_ANOC_PCIE2, GCC_ANOC_PCIE2_2LANE_M_CLK },
3243+
{ MASTER_CNOC_PCIE2, SLAVE_CNOC_PCIE2, GCC_CNOC_PCIE2_2LANE_S_CLK },
3244+
{ MASTER_ANOC_PCIE3, SLAVE_ANOC_PCIE3, GCC_ANOC_PCIE3_2LANE_M_CLK },
3245+
{ MASTER_CNOC_PCIE3, SLAVE_CNOC_PCIE3, GCC_CNOC_PCIE3_2LANE_S_CLK },
3246+
{ MASTER_CNOC_USB, SLAVE_CNOC_USB, GCC_CNOC_USB_CLK },
3247+
};
3248+
32333249
static const struct of_device_id gcc_ipq5424_match_table[] = {
32343250
{ .compatible = "qcom,ipq5424-gcc" },
32353251
{ }
@@ -3260,6 +3276,8 @@ static const struct qcom_cc_desc gcc_ipq5424_desc = {
32603276
.num_resets = ARRAY_SIZE(gcc_ipq5424_resets),
32613277
.clk_hws = gcc_ipq5424_hws,
32623278
.num_clk_hws = ARRAY_SIZE(gcc_ipq5424_hws),
3279+
.icc_hws = icc_ipq5424_hws,
3280+
.num_icc_hws = ARRAY_SIZE(icc_ipq5424_hws),
32633281
};
32643282

32653283
static int gcc_ipq5424_probe(struct platform_device *pdev)
@@ -3272,6 +3290,7 @@ static struct platform_driver gcc_ipq5424_driver = {
32723290
.driver = {
32733291
.name = "qcom,gcc-ipq5424",
32743292
.of_match_table = gcc_ipq5424_match_table,
3293+
.sync_state = icc_sync_state,
32753294
},
32763295
};
32773296

0 commit comments

Comments
 (0)