imx93 wrong clock frequency

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

imx93 wrong clock frequency

Jump to solution
954 Views
spawn
Contributor III

Hello,

on an imx93 processor, I configured a clock in the device tree with: 

 

&flexio2 {                                                                                                                                                                                                         
  assigned-clocks = <&clk IMX93_CLK_FLEXIO2>;                                                                                                                                                                      
  assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;                                                                                                                                                     
  assigned-clock-rates = <80000000>;                                                                                                                                                                              
  status = "okay";                                                                                                                                                                                                
                                                                                                                                                                                                                   
  xx {                                                                                                                                                                                                        
    compatible = "xx,xx";                                                                                                                                                                        
    pinctrl-0 = <&pinctrl_xx>;                                                                                                                                                               
    pinctrl-names = "default";                                                                                                                                                                                     
    clocks = <&clk IMX93_CLK_CCM_CKO1>;                                                                                                                                                                            
    assigned-clocks = <&clk IMX93_CLK_CCM_CKO1>;                                                                                                                                                                   
    assigned-clock-rates = <50000000>;                                                                                                                                                                
  };                                                                                                                                                                                                               
};    

 

Then I confirmed that the clock freq is configured to be 50 MHz from the driver with a call to clk_get_rate().

But the signal frequency I measure is in fact 10 MHz.

Do you know what could cause the issue ?

Best Regards

0 Kudos
Reply
1 Solution
931 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

The following resource shows how to change DRAM frequency.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-8M-Mini-Register-Programming-Aid-DRA...

 

It is for Mx8MM but it works on Mx93. clocks are described in sect. Clock Control Module (CCM) Chapter 30 i.mx93 reference manual

in uboot sources one can look at

imx-common\arm\arch - uboot-imx - i.MX U-Boot 

in linux one needs to follow clock framework rules:
https://www.kernel.org/doc/Documentation/clk.txt 
https://elinux.org/images/b/b8/Elc2013_Clement.pdf 

 

Regards

View solution in original post

0 Kudos
Reply
1 Reply
932 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

The following resource shows how to change DRAM frequency.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-8M-Mini-Register-Programming-Aid-DRA...

 

It is for Mx8MM but it works on Mx93. clocks are described in sect. Clock Control Module (CCM) Chapter 30 i.mx93 reference manual

in uboot sources one can look at

imx-common\arm\arch - uboot-imx - i.MX U-Boot 

in linux one needs to follow clock framework rules:
https://www.kernel.org/doc/Documentation/clk.txt 
https://elinux.org/images/b/b8/Elc2013_Clement.pdf 

 

Regards

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2026885%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eimx93%20wrong%20clock%20frequency%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2026885%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3Eon%20an%20imx93%20processor%2C%20I%20configured%20a%20clock%20in%20the%20device%20tree%20with%3A%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%26amp%3Bflexio2%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20assigned-clocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX93_CLK_FLEXIO2%26gt%3B%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20assigned-clock-parents%20%3D%20%26lt%3B%26amp%3Bclk%20IMX93_CLK_SYS_PLL_PFD1_DIV2%26gt%3B%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20assigned-clock-rates%20%3D%20%26lt%3B80000000%26gt%3B%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20status%20%3D%20%22okay%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20xx%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20compatible%20%3D%20%22xx%2Cxx%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_xx%26gt%3B%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20pinctrl-names%20%3D%20%22default%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20clocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX93_CLK_CCM_CKO1%26gt%3B%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20assigned-clocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX93_CLK_CCM_CKO1%26gt%3B%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20assigned-clock-rates%20%3D%20%26lt%3B50000000%26gt%3B%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%7D%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%7D%3B%20%20%20%20%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EThen%20I%20confirmed%20that%20the%20clock%20freq%20is%20configured%20to%20be%2050%20MHz%20from%20the%20driver%20with%20a%20call%20to%20clk_get_rate().%3C%2FP%3E%3CP%3EBut%20the%20signal%20frequency%20I%20measure%20is%20in%20fact%2010%20MHz.%3C%2FP%3E%3CP%3EDo%20you%20know%20what%20could%20cause%20the%20issue%20%3F%3C%2FP%3E%3CP%3EBest%20Regards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2027635%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20imx93%20wrong%20clock%20frequency%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2027635%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EThe%20following%20resource%20shows%20how%20to%20change%20DRAM%20frequency.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FiMX-8M-Mini-Register-Programming-Aid-DRAM-PLL-setting%2Fta-p%2F1112094%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FiMX-8M-Mini-Register-Programming-Aid-DRAM-PLL-setting%2Fta-p%2F1112094%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIt%20is%20for%20Mx8MM%20but%20it%20works%20on%20Mx93.%20clocks%20are%20described%20in%20sect.%20Clock%20Control%20Module%20(CCM)%20Chapter%2030%20i.mx93%20reference%20manual%3C%2FP%3E%0A%3CP%3Ein%20uboot%20sources%20one%20can%20look%20at%3C%2FP%3E%0A%3CP%3E%3CA%20class%3D%22link-titled%22%20title%3D%22https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fuboot-imx%2Ftree%2Farch%2Farm%2Fimx-common%3Fh%3Dimx_v2017.03_4.9.51_imx8m_ga%22%20href%3D%22https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fuboot-imx%2Ftree%2Farch%2Farm%2Fimx-common%3Fh%3Dimx_v2017.03_4.9.51_imx8m_ga%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eimx-common%5Carm%5Carch%20-%20uboot-imx%20-%20i.MX%20U-Boot%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ein%20linux%20one%20needs%20to%20follow%20clock%20framework%20rules%3A%3CBR%20%2F%3E%3CA%20class%3D%22link-titled%22%20title%3D%22https%3A%2F%2Fwww.kernel.org%2Fdoc%2FDocumentation%2Fclk.txt%22%20href%3D%22https%3A%2F%2Fwww.kernel.org%2Fdoc%2FDocumentation%2Fclk.txt%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.kernel.org%2Fdoc%2FDocumentation%2Fclk.txt%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CA%20class%3D%22link-titled%22%20title%3D%22https%3A%2F%2Felinux.org%2Fimages%2Fb%2Fb8%2FElc2013_Clement.pdf%22%20href%3D%22https%3A%2F%2Felinux.org%2Fimages%2Fb%2Fb8%2FElc2013_Clement.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Felinux.org%2Fimages%2Fb%2Fb8%2FElc2013_Clement.pdf%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E