Re: [PATCH DNM RFC 14/16] clk: qcom: Enable clk-dvfs on SM8650
From: Dmitry Baryshkov
Date: Wed Oct 14 2026 - 12:39:56 EST
On Wed, Oct 14, 2026 at 05:22:40PM +0200, Konrad Dybcio wrote:
> 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.
Then soon we will get MMRM submitted upstream, which (currently)
randomly imports a set of the clock ids and asks consumers to talk to it
using the same clock IDS from DT bindings. Doesn't sounds like a good
idea.
>
> [...]
>
> >> +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.
My question was "on the same level? Or on different levels? In the OPP
tables we (should) have 1:1 between scaling PDs and PD votes.
>
> [...]
>
> >> +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
--
With best wishes
Dmitry