Hi NXP Community !
Subject:
I want to use the General Purpose Timer 1 in INPUT Capture mode on the i.MX8MM.
I've used the following patches described here: https://lwn.net/ml/linux-kernel/[email protected]/
In device tree i've added those following lines:
gpt1: gpt@302d0000 {
compatible = "fsl,imx8mm-gpt";
reg = <0x302d0000 0x10000>;
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MM_CLK_GPT1_ROOT>,
<&clk IMX8MM_CLK_GPT1_ROOT>,
<&clk IMX8MM_CLK_GPT_3M>;
clock-names = "ipg", "per", "osc_per";
};
I've also disabled SAI3 and SAI5 to avoid any reconfiguration.
But i get the following error on boot logs:
i.MX timer: unable to get clk
According the driver in /drivers/clocksource/timer-imx-gpt.c, it seems that is because it didn't manage to use any clock for the device (clk_per).
I've followed this link :https://community.nxp.com/t5/i-MX-Processors/GPT-capture-sample-on-M4-seems-to-hang-on-Linux-boot/m-...
It says that the linux part is disabling the clock. Why that?
I've followed this link also : https://community.nxp.com/t5/i-MX-Processors/GPT-on-i-MX-8M-Mini/m-p/1206969#M167291
I don't really understand the answer, tried it, I got the clocksource initialized:
[0.008172] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
But the kernel stops at the middle of the boot process.
Any advices?
I obviously added CONFIG_CLKSRC_IMX_GPT=y to enable the driver, as some logs shown above came from that driver.
So device tree seems fines.
Config seems fines.
I suspect a clocking problem.
Thanks!