Hi All. I am trying to use EPIT. I have made some changes on below file.
imx6sx.dtsi - >
epit1: epit@020d0000 {
compatible = "fsl,imx6sx-epit", "fsl,imx31-epit";
reg = <0x020d0000 0x4000>;
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SX_CLK_EPIT1>;
clock-names = "ipg", "per";
status = "okay";
};
epit2: epit@020d4000 {
compatible = "fsl,imx6sx-epit", "fsl,imx31-epit";
reg = <0x020d4000 0x4000>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SX_CLK_EPIT2>;
clock-names = "ipg", "per";
status = "okay";
};
2- Please find the attached simple epit module.
3 - When I am inserting the module getting below error
" EPIT1 base address: c0dc0000
genirq: Flags mismatch irq 56. 00000004 (EPIT1) vs. 00000004 (sdma)
EPIT1 request_irq return -16
EPIT1 : request_irq() failure! ""
Can you please help me how to resolve this error.
Thanks in advance.
I assume your DTS changes are wrong. The "clock" property has one element whilst the "clock-names" property has two elements.
The interrupt number (56/57) seem to be correct (reference manual numbers minus 32). Please check the interrupt number of the SDMA in your device tree.
regards,
Christian
I made changes in below dtsi
imx6sx.dtsi - >
epit1: epit@020d0000 {
compatible = "fsl,imx6sx-epit", "fsl,imx31-epit";
reg = <0x020d0000 0x4000>;
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SX_CLK_EPIT1>;
clock-names = "ipg", "per";
status = "okay";
};
epit2: epit@020d4000 {
compatible = "fsl,imx6sx-epit", "fsl,imx31-epit";
reg = <0x020d4000 0x4000>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SX_CLK_EPIT2>;
clock-names = "ipg", "per";
status = "okay";
};
2. I am using The interrupt number (56/57) seem to be correct (reference manual numbers minus 32).
I am using 24 for EPIT and 25 for EPIT in request irq but after inserting the kernel module getting below interrupts.
root@GW-1000-NWE-1011945187000000 ~# cat /proc/interrupts
CPU0
16: 19241 GPC 55 Level i.MX Timer Tick
17: 0 GPC 94 Level arm-pmu
21: 0 GPC 20 Level caam-snvs
22: 416 GPC 26 Level 2020000.serial
24: 0 GPC 50 Level EPIT.1
25: 0 GPC 83 Level EPIT.2
43: 0 GPC 80 Level 20bc000.wdog
44: 0 GPC 49 Level imx_thermal
56: 0 GPC 2 Level sdma
-> In dtsi 50 is assign to asrc: asrc@02034000 and 83 is assign to pwm1: pwm@02080000
but for EPIT is have 56 and 57 in dtsi and sdma is 2
Can you please check it and share us correct dtsi configuration for imx6 solo x.
Thank you so much in advance.
I had a short look into your driver code. It seems that you have hard coded the I/O adresses and interrupt number. So there is no value putting this information into the device tree as you driver doesn't use it.
regards,
Christian
Okay I got it your point.
Can you please provide me sample code or how to configure the dtsi.
How to use the I/O adresses and interrupt number. please guide me
Best regards
Ravi
Hi ceggers
I made same changes in DTSI.
If you have any update how to enable EPIT for imx6 solo x.
Please share me all steps.
Thank you so much for your reply...
Which board are you using? Which version of BSP are you using?