Is there any way to control (modify/enable) clock on Linux?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there any way to control (modify/enable) clock on Linux?

Jump to solution
3,727 Views
Jeff-CF-Huang
Contributor III

Hi Sir,


Is there any way to control (modify/enable) clock on Linux?

0 Kudos
Reply
1 Solution
3,681 Views
chenyin_h
NXP Employee
NXP Employee

 Hello, @Jeff-CF-Huang

Thanks for the feedback

From the BSP perspective, seems no such functions in Linux, sorry for your inconvenience.

 

Best Regards

Chenyin

View solution in original post

0 Kudos
Reply
5 Replies
3,682 Views
chenyin_h
NXP Employee
NXP Employee

 Hello, @Jeff-CF-Huang

Thanks for the feedback

From the BSP perspective, seems no such functions in Linux, sorry for your inconvenience.

 

Best Regards

Chenyin

0 Kudos
Reply
3,695 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Jeff-CF-Huang

Thanks for the feedback

For what we are able to see, the clocks seem to be enabled under ATF(From BSP view). We are not seeing anything under Linux to modify/enable clocks.

 

Best Regards

Chenyin

0 Kudos
Reply
3,692 Views
Jeff-CF-Huang
Contributor III

We want to configure the clock dynamically in the Linux kernel, including enabling, disabling, and changing the rate.

0 Kudos
Reply
3,711 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Jeff-CF-Huang

Thanks for the questions。

Sorry that I am not quite catching you, would you please help to clarify the questions? Which clock you were referring to?

 

Best Regards

Chenyin

0 Kudos
Reply
3,707 Views
Jeff-CF-Huang
Contributor III

I can get the clk summary at /sys/kernel/debug/clk.

enable prepare protect duty hardware
clock count count count rate accuracy phase cycle enable
-------------------------------------------------------------------------------------------------------
pcf85063-clkout 0 0 0 0 0 0 50000 Y
llce_per 0 0 0 80000000 0 0 50000 Y
llce_sys 0 0 0 198309214 0 0 50000 Y

But, I can't find a file node to enable/disable the clock.
For example:
I want to enable the clk of qspi_flash1x & qspi_flash2x.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1866850%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIs%20there%20any%20way%20to%20control%20(modify%2Fenable)%20clock%20on%20Linux%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1866850%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Sir%2C%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EIs%20there%20any%20way%20to%20control%20(modify%2Fenable)%20clock%20on%20Linux%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1867990%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Is%20there%20any%20way%20to%20control%20(modify%2Fenable)%20clock%20on%20Linux%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1867990%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EHello%2C%20%40%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F218967%22%20target%3D%22_blank%22%3EJeff-CF-Huang%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThanks%20for%20the%20feedback%3C%2FP%3E%0A%3CP%3EFrom%20the%20BSP%20perspective%2C%20seems%20no%20such%20functions%20in%20Linux%2C%20sorry%20for%20your%20inconvenience.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1867857%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Is%20there%20any%20way%20to%20control%20(modify%2Fenable)%20clock%20on%20Linux%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1867857%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EWe%20want%20to%20configure%20the%20clock%20dynamically%20in%20the%20Linux%20kernel%2C%20including%20enabling%2C%20disabling%2C%20and%20changing%20the%20rate.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1867804%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Is%20there%20any%20way%20to%20control%20(modify%2Fenable)%20clock%20on%20Linux%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1867804%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHello%2C%20%40%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F218967%22%20target%3D%22_blank%22%3EJeff-CF-Huang%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThanks%20for%20the%20feedback%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFor%20what%20we%20are%20able%20to%20see%2C%20the%20clocks%20seem%20to%20be%20enabled%20under%20ATF(From%20BSP%20view).%20We%20are%20not%20seeing%20anything%20under%20Linux%20to%20modify%2Fenable%20clocks.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1867105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Is%20there%20any%20way%20to%20control%20(modify%2Fenable)%20clock%20on%20Linux%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1867105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20can%20get%20the%20clk%20%3CSPAN%3Esummary%26nbsp%3B%3C%2FSPAN%3Eat%20%2Fsys%2Fkernel%2Fdebug%2Fclk.%3CBR%20%2F%3E%3CBR%20%2F%3Eenable%20prepare%20protect%20duty%20hardware%3CBR%20%2F%3Eclock%20count%20count%20count%20rate%20accuracy%20phase%20cycle%20enable%3CBR%20%2F%3E-------------------------------------------------------------------------------------------------------%3CBR%20%2F%3Epcf85063-clkout%200%200%200%200%200%200%2050000%20Y%3CBR%20%2F%3Ellce_per%200%200%200%2080000000%200%200%2050000%20Y%3CBR%20%2F%3Ellce_sys%200%200%200%20198309214%200%200%2050000%20Y%3CBR%20%2F%3E%3CBR%20%2F%3EBut%2C%20I%20can't%20find%20a%20file%20node%20to%20enable%2Fdisable%20the%20clock.%3CBR%20%2F%3EFor%20example%3A%3CBR%20%2F%3EI%20want%20to%20enable%20the%20clk%20of%20qspi_flash1x%20%26amp%3B%26nbsp%3Bqspi_flash2x.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1867064%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Is%20there%20any%20way%20to%20control%20(modify%2Fenable)%20clock%20on%20Linux%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1867064%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%20%40%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F218967%22%20target%3D%22_blank%22%3EJeff-CF-Huang%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThanks%20for%20the%20questions%E3%80%82%3C%2FP%3E%0A%3CP%3ESorry%20that%20I%20am%20not%20quite%20catching%20you%2C%20would%20you%20please%20help%20to%20clarify%20the%20questions%3F%20Which%20clock%20you%20were%20referring%20to%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E