Re: [PATCH v3 2/3] clk: qcom: camcc-sm8250: use icc-clk for camera NoC AXI clock
From: Atanas Filipov
Date: Tue Oct 20 2026 - 04:20:24 EST
On 10/19/2026 5:49 PM, Dmitry Baryshkov wrote:
On Fri, Oct 16, 2026 at 08:07:00PM +0300, Atanas Filipov wrote:
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@xxxxxxxxxxxxxxxx>
---
drivers/clk/qcom/camcc-sm8250.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
This is a nice approach. Several quesitons: if there are multiple
clients, should the clock track the max of the rates a sum of the rates?
Max. icc-clk sets the clock from the aggregated peak bandwidth, and
icc_std_aggregate() takes the maximum of the peak requests. Each client
asks for the bandwidth it needs, so the highest request covers all of
them. A sum would overestimate the clock.
Also, this clock needs a certain level on a rail. Are you going to addTo the devices. Each consumer describes its own needs in its OPP
the opp table to the clock controller or to the devices which use the
ICC?
table: every entry carries the core clock rate, the camera NoC
bandwidth and the required rail level, and dev_pm_opp_set_opp()
applies all of them at once. Dropping the OPP on idle removes the
votes. For example, the JPEG encoder (to be posted separately):
interconnects = <&camcc MASTER_CAMCC_CAMNOC_AXI
&camcc SLAVE_CAMCC_CAMNOC_AXI>;
interconnect-names = "camnoc";
operating-points-v2 = <&jpeg_opp_table>;
jpeg_opp_table: opp-table {
compatible = "operating-points-v2";
opp-100000000 {
opp-hz = /bits/ 64 <100000000>;
opp-peak-kBps = <25000>;
required-opps = <&rpmhpd_opp_min_svs>;
};
...
opp-600000000 {
opp-hz = /bits/ 64 <600000000>;
opp-peak-kBps = <400000>;
required-opps = <&rpmhpd_opp_turbo>;
};
};
The consumer asks for the bandwidth it needs, independent of how many
rate levels the camera NoC clock has on a given platform; icc-clk
rounds the request to a rate the clock supports.
Best regards,
Atanas