Hello,
I would like to use General Purpose timer 1 on a board with the i.MX7d running Linux.
What I plan to do is to use GPT1 to divide a 4 MHz signal on an gpt1.CLK (ALT1 on ball name LCD_DAT2) and output the resulting frequency on the gpt1.COMPARE1 pin (ALT1 on Ball name LCD_RESET).
So basically, I need to configure GTP1 to use an external clock, and program the compare function.
The main question is what I have to do in order to achieve this ? For me, there are a lot of things that need to be clarified :
- Reading the i.MX Linux manual, section 3.3 "Timer" mentions that GPT may be used by Linux for time keeping. If this is the case, I can probably forget using it the way I want..
=> How can I check whether GPT1 is in use by Linux ?
(I also asked Toradex, the manufacturer of the SoM I am using) - I am aware of device trees and I did modify them in the project for other devices. But I cannot find any documentation that describes how to modify the gpt1 node.
=> what changes are needed to my device tree ?
I can provide the current device tree if this helps - After the two points above are successfully passed, how do I access the GPT ?
=> Is there a Linux driver similar to e.g. spidev ?
Any help is very much appreciated,
Jeroen