Re: [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC

From: Dzmitry Sankouski
Date: Mon Dec 02 2024 - 05:45:31 EST


сб, 26 окт. 2024 г. в 13:36, Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>:
>
> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> > Add support for max77705 MFD device. Supported sub-devices:
> > charger, fuelgauge, haptic, led
> >
> > Signed-off-by: Dzmitry Sankouski <dsankouski@xxxxxxxxx>
> > ---
>
> [...]
> > +
> > + vib_pwm: pwm {
> > + compatible = "clk-pwm";
> > + #pwm-cells = <2>;
> > + assigned-clock-parents = <&rpmhcc RPMH_CXO_CLK>;
>
> Don't you want to set assigned-clock-rates instead?

assigned-clock-rates would set GCC_GP1_CLK_SRC rate, and automatically
select the proper parent clock best suited for rate.

However, as per discussion in
https://patchwork.kernel.org/project/linux-samsung-soc/patch/20240618-starqltechn_integration_upstream-v3-2-e3f6662017ac@xxxxxxxxx
the old approach with additional freq_tbl entries was criticised. New
approach, introduced in
https://lore.kernel.org/all/20241007-starqltechn_integration_upstream-v6-0-dd75c06c708d@xxxxxxxxx/
automatically calculates m/n/d values for GP clock, but it cannot
select best suited parent - it's user responsibility.
>
> > + assigned-clocks = <&gcc GCC_GP1_CLK_SRC>;
> > + clocks = <&gcc GCC_GP1_CLK>;
> > + pinctrl-0 = <&motor_pwm_default_state>;
> > + pinctrl-1 = <&motor_pwm_suspend_state>;
> > + pinctrl-names = "default", "suspend";
> > + };
> > };
>
> Looks good otherwise
>
> Konrad

--
Best regards and thanks for review,
Dzmitry