* [PATCH v3 1/3] dt-bindings: clock: qcom,camcc-sm8250: add interconnect provider
2026-10-16 17:06 [PATCH v3 0/3] Use icc-clk for the SM8250 camera NoC AXI clock Atanas Filipov
@ 2026-10-16 17:06 ` Atanas Filipov
2026-10-16 17:07 ` [PATCH v3 2/3] clk: qcom: camcc-sm8250: use icc-clk for camera NoC AXI clock Atanas Filipov
2026-10-16 17:07 ` [PATCH v3 3/3] arm64: dts: qcom: sm8250: add camcc interconnect cells Atanas Filipov
2 siblings, 0 replies; 5+ messages in thread
From: Atanas Filipov @ 2026-10-16 17:06 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd
Cc: Konrad Dybcio, Georgi Djakov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Abel Vesa, Jonathan Marek, Bryan O'Donoghue,
Dmitry Baryshkov, Konrad Dybcio, Gjorgji Rosikopulos,
linux-arm-msm, linux-clk, linux-pm, devicetree, linux-kernel,
atanas.filipov
CAM_CC_CAMNOC_AXI_CLK is shared by several camera blocks. Setting its
rate directly from each consumer means the last writer wins.
Add #interconnect-cells so the camera clock controller can act as an
icc-clk provider, and add the camera NoC AXI master/slave IDs.
Consumers request bandwidth on this path and the interconnect core
aggregates the requests.
Signed-off-by: Atanas Filipov <atanas.filipov@oss.qualcomm.com>
---
.../devicetree/bindings/clock/qcom,camcc-sm8250.yaml | 4 ++++
include/dt-bindings/interconnect/qcom,sm8250.h | 3 +++
2 files changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,camcc-sm8250.yaml b/Documentation/devicetree/bindings/clock/qcom,camcc-sm8250.yaml
index 5c3ff37ec0d75..9cc7e77ec89ae 100644
--- a/Documentation/devicetree/bindings/clock/qcom,camcc-sm8250.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,camcc-sm8250.yaml
@@ -36,6 +36,9 @@ properties:
- const: bi_tcxo_ao
- const: sleep_clk
+ '#interconnect-cells':
+ const: 1
+
power-domains:
items:
- description: MMCX power domain
@@ -70,5 +73,6 @@ examples:
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
+ #interconnect-cells = <1>;
};
...
diff --git a/include/dt-bindings/interconnect/qcom,sm8250.h b/include/dt-bindings/interconnect/qcom,sm8250.h
index 2a656c02df4b1..96dc43e063cf0 100644
--- a/include/dt-bindings/interconnect/qcom,sm8250.h
+++ b/include/dt-bindings/interconnect/qcom,sm8250.h
@@ -173,4 +173,7 @@
#define SLAVE_QUP_CORE_1 4
#define SLAVE_QUP_CORE_2 5
+#define MASTER_CAMCC_CAMNOC_AXI 0
+#define SLAVE_CAMCC_CAMNOC_AXI 1
+
#endif
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v3 2/3] clk: qcom: camcc-sm8250: use icc-clk for camera NoC AXI clock
2026-10-16 17:06 [PATCH v3 0/3] Use icc-clk for the SM8250 camera NoC AXI clock Atanas Filipov
2026-10-16 17:06 ` [PATCH v3 1/3] dt-bindings: clock: qcom,camcc-sm8250: add interconnect provider Atanas Filipov
@ 2026-10-16 17:07 ` Atanas Filipov
2026-10-16 17:22 ` sashiko-bot
2026-10-16 17:07 ` [PATCH v3 3/3] arm64: dts: qcom: sm8250: add camcc interconnect cells Atanas Filipov
2 siblings, 1 reply; 5+ messages in thread
From: Atanas Filipov @ 2026-10-16 17:07 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd
Cc: Konrad Dybcio, Georgi Djakov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Abel Vesa, Jonathan Marek, Bryan O'Donoghue,
Dmitry Baryshkov, Konrad Dybcio, Gjorgji Rosikopulos,
linux-arm-msm, linux-clk, linux-pm, devicetree, linux-kernel,
atanas.filipov
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@oss.qualcomm.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v3 2/3] clk: qcom: camcc-sm8250: use icc-clk for camera NoC AXI clock
2026-10-16 17:07 ` [PATCH v3 2/3] clk: qcom: camcc-sm8250: use icc-clk for camera NoC AXI clock Atanas Filipov
@ 2026-10-16 17:22 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-10-16 17:22 UTC (permalink / raw)
To: Atanas Filipov; +Cc: linux-clk, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] clk: camcc-sm8250: premature icc_sync_state on old DT causes system hang
--
commit efec91c2d7f6b65bf67f582b282617ccb26d996e
Author: Atanas Filipov <atanas.filipov@oss.qualcomm.com>
clk: qcom: camcc-sm8250: use icc-clk for camera NoC AXI clock
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@oss.qualcomm.com>
> 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
[ ... ]
> @@ -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,
[Severity: High]
Could this cause premature state synchronization when booting with an older
Device Tree?
On older DTs where the camcc node lacks the #interconnect-cells property,
the interconnect core skips counting it during initialization:
drivers/interconnect/core.c:of_count_icc_providers() {
...
if (of_property_present(child, "#interconnect-cells") &&
likely(!of_match_node(ignore_list, child)))
count++;
...
}
Because of this, providers_count only reflects the other interconnect
providers. However, since the driver unconditionally registers
icc_sync_state, the driver core will still execute it once the device
probes.
When this executes, the extra call increments the static count in
icc_sync_state without a corresponding +1 in providers_count:
drivers/interconnect/core.c:icc_sync_state() {
...
count++;
if (count < providers_count)
return;
...
}
Will this cause the interconnect core to reach providers_count prematurely,
forcing synced_state to true and dropping bandwidth requests on all other
system interconnects before their consumers have probed?
> },
> };
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016170701.1504338-1-atanas.filipov@oss.qualcomm.com?part=2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 3/3] arm64: dts: qcom: sm8250: add camcc interconnect cells
2026-10-16 17:06 [PATCH v3 0/3] Use icc-clk for the SM8250 camera NoC AXI clock Atanas Filipov
2026-10-16 17:06 ` [PATCH v3 1/3] dt-bindings: clock: qcom,camcc-sm8250: add interconnect provider Atanas Filipov
2026-10-16 17:07 ` [PATCH v3 2/3] clk: qcom: camcc-sm8250: use icc-clk for camera NoC AXI clock Atanas Filipov
@ 2026-10-16 17:07 ` Atanas Filipov
2 siblings, 0 replies; 5+ messages in thread
From: Atanas Filipov @ 2026-10-16 17:07 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd
Cc: Konrad Dybcio, Georgi Djakov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Abel Vesa, Jonathan Marek, Bryan O'Donoghue,
Dmitry Baryshkov, Konrad Dybcio, Gjorgji Rosikopulos,
linux-arm-msm, linux-clk, linux-pm, devicetree, linux-kernel,
atanas.filipov
Add #interconnect-cells to the camera clock controller so camera
consumers can request camera NoC AXI bandwidth through the
interconnect framework.
Signed-off-by: Atanas Filipov <atanas.filipov@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index f975c2183269a..e923c74dc1435 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4675,6 +4675,7 @@ camcc: clock-controller@ad00000 {
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
+ #interconnect-cells = <1>;
};
mdss: display-subsystem@ae00000 {
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread