* [PATCH v3 0/3] Use icc-clk for the SM8250 camera NoC AXI clock
@ 2026-10-16 17:06 Atanas Filipov
2026-10-16 17:06 ` [PATCH v3 1/3] dt-bindings: clock: qcom,camcc-sm8250: add interconnect provider Atanas Filipov
` (2 more replies)
0 siblings, 3 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 on SM8250 is shared by several independent
camera blocks, such as CAMSS and the JPEG encoder. Each of them needs a
minimum camera NoC AXI rate, and setting the rate of the shared clock
directly from each consumer driver means the last writer wins.
Following the review of v2, this version drops the custom CAMNOC
interconnect provider. The camera clock controller instead exports the
camera NoC AXI clock through the common icc-clk support
(qcom_cc_desc.icc_hws), as gcc-ipq9574 and gcc-ipq5210 do. Consumers
request bandwidth on one master/slave path, the interconnect core
aggregates the requests, and the clock runs at the highest requested
rate. A consumer can do this through opp-peak-kBps in its OPP table,
so the vote follows its own core clock OPP.
The icc-clk path is backed by the RCG CAM_CC_CAMNOC_AXI_CLK_SRC rather
than the branch CAM_CC_CAMNOC_AXI_CLK. icc-clk enables its clock while
the provider registers, when TITAN_TOP_GDSC is still off, and enabling
the branch at that point fails with "cam_cc_camnoc_axi_clk status stuck
at 'off'". The RCG can be enabled at probe; the branch has
CLK_SET_RATE_PARENT, so the rate ends up on the RCG either way, and each
consumer keeps enabling the branch itself after powering the GDSC.
The JPEG encoder and CAMSS will use this path; their changes will be
posted separately.
Tested on RB5 (QRB5165): the camera NoC AXI clock follows the
aggregated vote, votes drop to zero when the consumer is idle, and no
clock warnings are seen at boot.
Changes since v2:
- Drop the CAMNOC interconnect provider driver, its binding and DT
node; export the camera NoC AXI clock through icc-clk in
camcc-sm8250 instead (Krzysztof Kozlowski, Konrad Dybcio)
- Drop the per-master CAMNOC port IDs; icc-clk provides one
master/slave pair per clock
Atanas Filipov (3):
dt-bindings: clock: qcom,camcc-sm8250: add interconnect provider
clk: qcom: camcc-sm8250: use icc-clk for camera NoC AXI clock
arm64: dts: qcom: sm8250: add camcc interconnect cells
.../devicetree/bindings/clock/qcom,camcc-sm8250.yaml | 4 ++++
arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 +
drivers/clk/qcom/camcc-sm8250.c | 12 ++++++++++++
include/dt-bindings/interconnect/qcom,sm8250.h | 3 +++
4 files changed, 20 insertions(+)
base-commit: b810335a0699d1810683796b0e3ffe8827ddfe6c
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [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
* [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
* 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
end of thread, other threads:[~2026-10-16 17:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:22 ` sashiko-bot
2026-10-16 17:07 ` [PATCH v3 3/3] arm64: dts: qcom: sm8250: add camcc interconnect cells Atanas Filipov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.