Re: [PATCH DNM RFC 14/16] clk: qcom: Enable clk-dvfs on SM8650
From: Konrad Dybcio
Date: Wed Oct 14 2026 - 11:24:38 EST
On 10/14/26 4:40 PM, Dmitry Baryshkov wrote:
> On Wed, Oct 14, 2026 at 02:19:14PM +0200, Konrad Dybcio wrote:
>> From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
>>
>> Make use of the clock-dvfs infrastructure and fill in the power
>> requirements for SM8650's clocks to ensure the hardware can operate in
>> accordance with the specification.
[...]
>> #include <dt-bindings/clock/qcom,sm8650-camcc.h>
>> +#include <dt-bindings/power/qcom,rpmhpd.h>
>
> I've commented to the cover letter. For me it feels like the layering
> violation.
I understand. I still think it's okay given this is a driver only
for a specific SoC.
[...]
>> +static const struct qcom_clk_dvfs_data cam_cc_camnoc_axi_rt_clk_src_dvfs = {
>> + .pd_indices = (const unsigned int[]) { DT_PMDOMAIN_MMCX, DT_PMDOMAIN_MXC },
>> + .num_pd_indices = 2,
>> + .rates = (const struct qcom_clk_dvfs_rate[]) {
>> + { 300000000, RPMH_REGULATOR_LEVEL_LOW_SVS },
>> + { 400000000, RPMH_REGULATOR_LEVEL_SVS },
>
> And does it actually have the same vote on both MMCX and MXC? I'd need
> to check the clock tree.
In this case the RCG needs VDD_MM and its direct child branch
needs MXC for the flipflops.
[...]
>> +static const struct qcom_clk_dvfs_data cam_cc_cphy_rx_clk_src_dvfs = {
>> + .pd_indices = (const unsigned int[]) {
>> + DT_PMDOMAIN_MMCX, DT_PMDOMAIN_MX, DT_PMDOMAIN_MXC,
>
> Three domains... If we want to have three votes, we really need to have
> three votes in the .rates array. But then it starts to feel like an OPP
> table.
In this case, yes, three domains, same RPMH level for this clock alone.
Konrad