i.MX6 UltraLite Dynamically controlling OSC32K_32K_OUT

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

i.MX6 UltraLite Dynamically controlling OSC32K_32K_OUT

420 Views
martintownsend
Contributor I

Hi,

I have a requirement to dynamically control the OSC32K_32K_OUT signal that is on GPIO1_IO03 from kernel space.  I can set the pad configuration in the device tree or use devmem2 to set the mux mode to ALT3 in IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO03 to generate the clock but I need to do this dynamically within the kernel when a device requests the 32KHz clock which will occur in an interrupt context.

I'm using the linux-imx 4.9.11 kernel.  I'm guessing I have to add a new clock to the clock framework and provide the ability to turn it on and off by either setting the mux_mode of IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO03 to ALT3 and ALT5 respectively. 

Is there something already available for this? if not is it possible to do what I'm suggesting? or is there a better way?

Many Thanks,

Martin.

Labels (3)
0 Kudos
1 Reply

360 Views
jimmychan
NXP TechSupport
NXP TechSupport

I think the idea is work. Unfortunately, we don't have similar example for your reference.

For your information, you may read the i.MX_Linux_Reference_Manual.pdf Chapter 2.5.1 about the IOMUX driver.

0 Kudos