[PATCH v2 2/3] clk: conf: Support assigned-clock-sscs
Peng Fan
peng.fan at oss.nxp.com
Sun Sep 7 06:12:09 PDT 2025
Hi Brian,
On Tue, Sep 02, 2025 at 07:56:07PM -0400, Brian Masney wrote:
>Hi Peng,
>
>On Mon, Sep 01, 2025 at 11:51:46AM +0800, Peng Fan wrote:
>> Parse the Spread Spectrum Configuration(SSC) from device tree and configure
>> them before using the clock.
>>
>> Each SSC is three u32 elements which means '<modfreq spreaddepth
>> modmethod>', so assigned-clock-sscs is an array of multiple three u32
>> elements.
>>
>> Signed-off-by: Peng Fan <peng.fan at nxp.com>
>
>Stephen has also been asking for kunit tests to be added for new
>functionality in the clk core. There's already one kunit test that
>calls of_clk_set_defaults(). I attached a very rough draft of a patch
>showing that it'd be possible to mock this up in a test with what's
>already there. I set a log statement with the configuration from
>device tree:
Appreciate your help on this. I was not aware of kunit tests is required.
I will add one in V3.
>
>test_assigned_rate0: Spread Sprectrum Configuration: modfreq_hz=10000 spread_bp=3 method=1
>
>You can run the kunit tests with:
>
>./tools/testing/kunit/kunit.py run \
> --kunitconfig drivers/clk/.kunitconfig \
> --raw_output=all
>
>Additionally, what do you think about making a dt-bindings include file
>for CLK_SSC_CENTER_SPREAD + friends? Right now, the test illustrates
>that we need to hardcode the number from the clk-provider.h file inside
>the DTS.
ok to add a generic dt-bindings file for the the SSC Spread method.
I will add one in V3.
>
>Here's the patch and feel free to make it your own as you see fit.
>
Thanks a lot for sharing this.
Thanks,
Peng
More information about the linux-arm-kernel
mailing list