Skip to content

Commit 913581b

Browse files
committed
Merge tag 'icc-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus
Georgi writes: interconnect fixes for v5.15 This contains a few fixes for the sdm660 driver: - sdm660: Fix id of slv_cnoc_mnoc_cfg - sdm660: Correct NOC_QOS_PRIORITY shift and mask - sdm660: Add missing a2noc qos clocks Signed-off-by: Georgi Djakov <[email protected]> * tag 'icc-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: sdm660: Add missing a2noc qos clocks dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks interconnect: qcom: sdm660: Correct NOC_QOS_PRIORITY shift and mask interconnect: qcom: sdm660: Fix id of slv_cnoc_mnoc_cfg
2 parents 5816b3e + 13404ac commit 913581b

File tree

2 files changed

+61
-10
lines changed

2 files changed

+61
-10
lines changed

Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ properties:
3131

3232
clocks:
3333
minItems: 1
34-
maxItems: 3
34+
maxItems: 7
3535

3636
clock-names:
3737
minItems: 1
38-
maxItems: 3
38+
maxItems: 7
3939

4040
required:
4141
- compatible
@@ -72,6 +72,32 @@ allOf:
7272
contains:
7373
enum:
7474
- qcom,sdm660-a2noc
75+
then:
76+
properties:
77+
clocks:
78+
items:
79+
- description: Bus Clock.
80+
- description: Bus A Clock.
81+
- description: IPA Clock.
82+
- description: UFS AXI Clock.
83+
- description: Aggregate2 UFS AXI Clock.
84+
- description: Aggregate2 USB3 AXI Clock.
85+
- description: Config NoC USB2 AXI Clock.
86+
clock-names:
87+
items:
88+
- const: bus
89+
- const: bus_a
90+
- const: ipa
91+
- const: ufs_axi
92+
- const: aggre2_ufs_axi
93+
- const: aggre2_usb3_axi
94+
- const: cfg_noc_usb2_axi
95+
96+
- if:
97+
properties:
98+
compatible:
99+
contains:
100+
enum:
75101
- qcom,sdm660-bimc
76102
- qcom,sdm660-cnoc
77103
- qcom,sdm660-gnoc
@@ -91,6 +117,7 @@ examples:
91117
- |
92118
#include <dt-bindings/clock/qcom,rpmcc.h>
93119
#include <dt-bindings/clock/qcom,mmcc-sdm660.h>
120+
#include <dt-bindings/clock/qcom,gcc-sdm660.h>
94121
95122
bimc: interconnect@1008000 {
96123
compatible = "qcom,sdm660-bimc";
@@ -123,9 +150,20 @@ examples:
123150
compatible = "qcom,sdm660-a2noc";
124151
reg = <0x01704000 0xc100>;
125152
#interconnect-cells = <1>;
126-
clock-names = "bus", "bus_a";
153+
clock-names = "bus",
154+
"bus_a",
155+
"ipa",
156+
"ufs_axi",
157+
"aggre2_ufs_axi",
158+
"aggre2_usb3_axi",
159+
"cfg_noc_usb2_axi";
127160
clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
128-
<&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>;
161+
<&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
162+
<&rpmcc RPM_SMD_IPA_CLK>,
163+
<&gcc GCC_UFS_AXI_CLK>,
164+
<&gcc GCC_AGGRE2_UFS_AXI_CLK>,
165+
<&gcc GCC_AGGRE2_USB3_AXI_CLK>,
166+
<&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
129167
};
130168
131169
mnoc: interconnect@1745000 {

drivers/interconnect/qcom/sdm660.c

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
#define NOC_PERM_MODE_BYPASS (1 << NOC_QOS_MODE_BYPASS)
4545

4646
#define NOC_QOS_PRIORITYn_ADDR(n) (0x8 + (n * 0x1000))
47-
#define NOC_QOS_PRIORITY_MASK 0xf
47+
#define NOC_QOS_PRIORITY_P1_MASK 0xc
48+
#define NOC_QOS_PRIORITY_P0_MASK 0x3
4849
#define NOC_QOS_PRIORITY_P1_SHIFT 0x2
49-
#define NOC_QOS_PRIORITY_P0_SHIFT 0x3
5050

5151
#define NOC_QOS_MODEn_ADDR(n) (0xc + (n * 0x1000))
5252
#define NOC_QOS_MODEn_MASK 0x3
@@ -173,6 +173,16 @@ static const struct clk_bulk_data bus_mm_clocks[] = {
173173
{ .id = "iface" },
174174
};
175175

176+
static const struct clk_bulk_data bus_a2noc_clocks[] = {
177+
{ .id = "bus" },
178+
{ .id = "bus_a" },
179+
{ .id = "ipa" },
180+
{ .id = "ufs_axi" },
181+
{ .id = "aggre2_ufs_axi" },
182+
{ .id = "aggre2_usb3_axi" },
183+
{ .id = "cfg_noc_usb2_axi" },
184+
};
185+
176186
/**
177187
* struct qcom_icc_provider - Qualcomm specific interconnect provider
178188
* @provider: generic interconnect provider
@@ -307,7 +317,7 @@ DEFINE_QNODE(slv_bimc_cfg, SDM660_SLAVE_BIMC_CFG, 4, -1, 56, true, -1, 0, -1, 0)
307317
DEFINE_QNODE(slv_prng, SDM660_SLAVE_PRNG, 4, -1, 44, true, -1, 0, -1, 0);
308318
DEFINE_QNODE(slv_spdm, SDM660_SLAVE_SPDM, 4, -1, 60, true, -1, 0, -1, 0);
309319
DEFINE_QNODE(slv_qdss_cfg, SDM660_SLAVE_QDSS_CFG, 4, -1, 63, true, -1, 0, -1, 0);
310-
DEFINE_QNODE(slv_cnoc_mnoc_cfg, SDM660_SLAVE_BLSP_1, 4, -1, 66, true, -1, 0, -1, SDM660_MASTER_CNOC_MNOC_CFG);
320+
DEFINE_QNODE(slv_cnoc_mnoc_cfg, SDM660_SLAVE_CNOC_MNOC_CFG, 4, -1, 66, true, -1, 0, -1, SDM660_MASTER_CNOC_MNOC_CFG);
311321
DEFINE_QNODE(slv_snoc_cfg, SDM660_SLAVE_SNOC_CFG, 4, -1, 70, true, -1, 0, -1, 0);
312322
DEFINE_QNODE(slv_qm_cfg, SDM660_SLAVE_QM_CFG, 4, -1, 212, true, -1, 0, -1, 0);
313323
DEFINE_QNODE(slv_clk_ctl, SDM660_SLAVE_CLK_CTL, 4, -1, 47, true, -1, 0, -1, 0);
@@ -624,13 +634,12 @@ static int qcom_icc_noc_set_qos_priority(struct regmap *rmap,
624634
/* Must be updated one at a time, P1 first, P0 last */
625635
val = qos->areq_prio << NOC_QOS_PRIORITY_P1_SHIFT;
626636
rc = regmap_update_bits(rmap, NOC_QOS_PRIORITYn_ADDR(qos->qos_port),
627-
NOC_QOS_PRIORITY_MASK, val);
637+
NOC_QOS_PRIORITY_P1_MASK, val);
628638
if (rc)
629639
return rc;
630640

631-
val = qos->prio_level << NOC_QOS_PRIORITY_P0_SHIFT;
632641
return regmap_update_bits(rmap, NOC_QOS_PRIORITYn_ADDR(qos->qos_port),
633-
NOC_QOS_PRIORITY_MASK, val);
642+
NOC_QOS_PRIORITY_P0_MASK, qos->prio_level);
634643
}
635644

636645
static int qcom_icc_set_noc_qos(struct icc_node *src, u64 max_bw)
@@ -810,6 +819,10 @@ static int qnoc_probe(struct platform_device *pdev)
810819
qp->bus_clks = devm_kmemdup(dev, bus_mm_clocks,
811820
sizeof(bus_mm_clocks), GFP_KERNEL);
812821
qp->num_clks = ARRAY_SIZE(bus_mm_clocks);
822+
} else if (of_device_is_compatible(dev->of_node, "qcom,sdm660-a2noc")) {
823+
qp->bus_clks = devm_kmemdup(dev, bus_a2noc_clocks,
824+
sizeof(bus_a2noc_clocks), GFP_KERNEL);
825+
qp->num_clks = ARRAY_SIZE(bus_a2noc_clocks);
813826
} else {
814827
if (of_device_is_compatible(dev->of_node, "qcom,sdm660-bimc"))
815828
qp->is_bimc_node = true;

0 commit comments

Comments
 (0)