Hi surya,
As you may know each pin on i.MX devices has up to 8 potential functions, and on the other side, one function can be available in different pins.
I assume you are aware that CCM_CLKO2 can be mapped to 2 output pins.

Well, you must configure one of these output pins to take CCM_CLKO2 functionality. E.g.

You need to do this through the Device Tree (dts file).
The Device Tree is a data structure for describing hardware that is passed to the operating system at boot time. The data structure can hold any kind of data as internally it is a tree of named nodes and properties. Nodes contain properties and child nodes, while properties are name–value pairs.
Example:
pinctrl_uart2: uart2grp {
fsl,pins = <
MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1
MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1
>;
};
So, how to configure what you need?
1) In the IO Pinmux chapter of Reference Manual you can find following registers:
IOMUXC_SW_MUX_CTL_PAD_<xxx> which indicates the mux function associated with the pin
IOMUXC_SW_PAD_CTL_PAD_<xxx> that is responsible for configuring the physical drive characteristic of the pin, which could be mapped to any of the pin functions.
Here <xxx> is the corresponding pin name.
In the example above the Hex number indicates the value of IOMUXC_SW_PAD_CTL_PAD_<xxx>.
2) Somewhere in you build directory you will find a file named imx6q-pinfuc.h here you will find macros with the following format:
<device>_PAD_<pin name>__<function> (please note double underscore between pin name and function)
In the example above the macro indicates the value of IOMUXC_SW_MUX_CTL_PAD_<xxx>
3) Finally just write/modify the appropriate node in the device tree with the appropriate macro and the desired pin characteristics
For more information about Device Tree and IO pins config you can see the following links:
Definitive GPIO guide - Studio Kousagi Wiki
Device Tree Tutorial (ARM) | Linux Kernel For Newbies
Device Tree Made Easy
https://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf
Best regards,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------