GPT on i.MX 8M Mini

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

GPT on i.MX 8M Mini

2,109 次查看
nirgeller
Contributor I

Hi There,

I'm currently evaluating the i.MX 8M Mini and I need to use the GPT.

According to

https://community.nxp.com/t5/i-MX-Processors/How-to-enable-timer-Interrupt-in-iMX8MQ-EVK/m-p/988745

it seems that GPT is useable on i.MX8MQ.

Can you please verify that the GPT is actually useable in the i.MX 8M Mini?

If so, can you help me make it functional with the latest Yocto BSP, Linux kernel 5.4.47?

Thanks a lot,

Nir.

0 项奖励
3 回复数

2,094 次查看
nirgeller
Contributor I

Hi,

I'm interested in GPT, not EPIT.

I already read the Linux Reference Manual.

 

Using config tools for i.MX8 I added the pins GPT1_CLK, GPT1_COMPARE and GPT1_CAPTURE to pinctrl_flexspi0.

I added gpt node in the dtb (taken from imx8mq.dtsi)

 

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";
status = "okay";
};

 

I got the gpt driver (drivers/clocksource/timer-imx-gpt.c) to compile, and the function imx6dl_timer_init_dt()  is invoked.

The function imx6dl_timer_init_dt() fails at 

of_clk_get_by_name(np, "ipg");

of_clk_get_by_name(np, "osc_per");

and

of_clk_get_by_name(np, "per");

 

Can you help me solve this error?

 

Thanks,

 

Nir.

0 项奖励

2,101 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Nirgeller,

 

One can try to follow example below and timer description in sect.2.1.3 Timer of the  Linux reference Manual.

epit.c\mach-imx\arm\arch - linux-imx - i.MX Linux kernel 

 

Regards

 

0 项奖励

2,041 次查看
nirgeller
Contributor I

Hi,

 

Any progress on setting up GPT clocks properly?

 

I understand that GPT is functional on i.MX8MM with kernel 4.9.123

 

Can you please provide support to get it functional with kernel 5.4.47 as well?

It's probably something with definitions of clocks.

Thanks,

 

Nir.

0 项奖励