How to enable CLKO1 in imx7d

hi experts
kernel is 5.4.161

i am trying to use CLKO1 on colibri-eval-v3 board with ixm7d-colibri 512MB SOM.

i searched community messages but not understand how to config CLKO1
so i tried to use assigned-clock

so in devicetree i added below code
MX7D_PAD_SD1_CD_B__CCM_CLKO1 0x14
&clks {
assigned-clocks = < &clks IMX7D_CLKO1_ROOT_SRC > ;
assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>;
}

when i probed PIN on the board , clkout does not appear.

are the clk name and settings incorrect?

I don’t know which clk to use. and tried some other clk name without success

thank you sincerely

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


To enable CLKO1 on the i.MX7D, you need to ensure that the device tree configuration is correct. Based on the context provided, here are a few things to check and consider:

  1. Pin Multiplexing: Ensure that the pin multiplexing is correctly set up for the CLKO1 function. The line MX7D_PAD_SD1_CD_B__CCM_CLKO1 0x14 seems to be setting the pinmux, but you should verify that this is the correct pin and configuration for your hardware setup.

  2. Clock Configuration: The assigned-clocks and assigned-clock-parents properties are used to set the clock source and parent. The line assigned-clocks = < &clks IMX7D_CLKO1_ROOT_SRC >; should be correct if IMX7D_CLKO1_ROOT_SRC is the correct clock source for CLKO1. Similarly, assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>; should set the parent clock to the 24MHz oscillator, which is a common source.

  3. Clock Names and Sources: Double-check the clock names and sources in the i.MX7D reference manual or the device tree bindings documentation to ensure they are correct. The clock names must match those defined in the clock driver for the i.MX7D.

  4. Device Tree Node: Ensure that the device tree node for the clock is correctly defined and that there are no syntax errors in the device tree file.

  5. Kernel Version: Since you are using kernel version 5.4.161, make sure that the device tree and clock driver support for the i.MX7D is consistent with this kernel version.

If after these checks the issue persists, it might be helpful to consult the NXP i.MX 7Dual Applications Processor Reference Manual for more detailed information on clock configuration and to verify the correct settings for CLKO1. Additionally, reviewing the kernel source code for the clock driver might provide insights into the correct clock names and configurations.

Please, also check if these links can help you solve your problem:

I.mx7d fec2 internal reference clocking.