Hi @gclaudino.tx,
I need to use GPT0 in order to divide an external clock (4MHz) to a lower frequency which is then output on a pin. This output signal is then used to start ADC conversions (at e.g. 100kHz) that are handled by the M4 core (another subject I did not yet fully explore ). The fact to use the external source is important since the sampling time shall be related to this 4MHz signal that is used to modulate a signal that is sampled afterwards (the details are a bit complicated…)
As per I/O mux of the Colibri i.MX7D, SODIMM pin 60 is dedicated to GPT1.CLK and pin 93 is GPT1.COMPARE. I already “liberated” these pins from the standard function by modifying the device tree (see my post GPT1 )
Although nothing is fixed, I already have our custom motherboard on my desk, i.e. it will not be easy to re-map the 4MHz input and frequency programmable output signals to other SODIMM pins.
So far, I have been looking at different snippets of code which often appear to come from kernel source and require specific #includes which I do not have.
One of my other fears is that GPT1 is already used by the Linux kernel itself but I do not have the faintest idea of how to find this out. The only thing I know is that in the Colibri device tree, there are definitions for gpt1 … gpt4 in imx7s.dtsi
and gpt1 is the only one that does not have the line status = "disabled"
.
For me this either means that it already should appear as a device under Linux or that it is reserved.
I have also tried to find a definition for the device tree syntax concerning gpt. How do you specify that the CLK and COMPARE pins mentioned above are associated with the device ?
Hopefully this information will give you some better idea of what I want to achieve…
Best regards,
Jeroen