Skip to content

Commit 7f3ea8a

Browse files
KiciukGeorgi Djakov
authored andcommitted
interconnect: qcom: qcs404: Add regmaps and more bus descriptions
Currently we are lacking descriptions of regmaps, bus clocks and types of busses, provide them. Signed-off-by: Adam Skladowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent 16e5d50 commit 7f3ea8a

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

drivers/interconnect/qcom/qcs404.c

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/module.h>
1111
#include <linux/mod_devicetable.h>
1212
#include <linux/platform_device.h>
13+
#include <linux/regmap.h>
1314

1415

1516
#include "icc-rpm.h"
@@ -1067,10 +1068,22 @@ static struct qcom_icc_node * const qcs404_bimc_nodes[] = {
10671068
[SLAVE_BIMC_SNOC] = &slv_bimc_snoc,
10681069
};
10691070

1071+
static const struct regmap_config qcs404_bimc_regmap_config = {
1072+
.reg_bits = 32,
1073+
.reg_stride = 4,
1074+
.val_bits = 32,
1075+
.max_register = 0x80000,
1076+
.fast_io = true,
1077+
};
1078+
10701079
static const struct qcom_icc_desc qcs404_bimc = {
1071-
.bus_clk_desc = &bimc_clk,
1080+
.type = QCOM_ICC_BIMC,
10721081
.nodes = qcs404_bimc_nodes,
10731082
.num_nodes = ARRAY_SIZE(qcs404_bimc_nodes),
1083+
.bus_clk_desc = &bimc_clk,
1084+
.regmap_cfg = &qcs404_bimc_regmap_config,
1085+
.qos_offset = 0x8000,
1086+
.ab_coeff = 153,
10741087
};
10751088

10761089
static struct qcom_icc_node * const qcs404_pcnoc_nodes[] = {
@@ -1122,10 +1135,22 @@ static struct qcom_icc_node * const qcs404_pcnoc_nodes[] = {
11221135
[SLAVE_PCNOC_SNOC] = &slv_pcnoc_snoc,
11231136
};
11241137

1138+
static const struct regmap_config qcs404_pcnoc_regmap_config = {
1139+
.reg_bits = 32,
1140+
.reg_stride = 4,
1141+
.val_bits = 32,
1142+
.max_register = 0x15080,
1143+
.fast_io = true,
1144+
};
1145+
11251146
static const struct qcom_icc_desc qcs404_pcnoc = {
1126-
.bus_clk_desc = &bus_0_clk,
1147+
.type = QCOM_ICC_NOC,
11271148
.nodes = qcs404_pcnoc_nodes,
11281149
.num_nodes = ARRAY_SIZE(qcs404_pcnoc_nodes),
1150+
.bus_clk_desc = &bus_0_clk,
1151+
.qos_offset = 0x7000,
1152+
.keep_alive = true,
1153+
.regmap_cfg = &qcs404_pcnoc_regmap_config,
11291154
};
11301155

11311156
static struct qcom_icc_node * const qcs404_snoc_nodes[] = {
@@ -1151,10 +1176,21 @@ static struct qcom_icc_node * const qcs404_snoc_nodes[] = {
11511176
[SLAVE_LPASS] = &slv_lpass,
11521177
};
11531178

1179+
static const struct regmap_config qcs404_snoc_regmap_config = {
1180+
.reg_bits = 32,
1181+
.reg_stride = 4,
1182+
.val_bits = 32,
1183+
.max_register = 0x23080,
1184+
.fast_io = true,
1185+
};
1186+
11541187
static const struct qcom_icc_desc qcs404_snoc = {
1155-
.bus_clk_desc = &bus_1_clk,
1188+
.type = QCOM_ICC_NOC,
11561189
.nodes = qcs404_snoc_nodes,
11571190
.num_nodes = ARRAY_SIZE(qcs404_snoc_nodes),
1191+
.bus_clk_desc = &bus_1_clk,
1192+
.qos_offset = 0x11000,
1193+
.regmap_cfg = &qcs404_snoc_regmap_config,
11581194
};
11591195

11601196

0 commit comments

Comments
 (0)