Hello,
I'm trying to add supports for the the touch screen on our custom LS1021a board. The touchscreen I2C device AR1020/1021 interrupt line connects directly to the IRQ2 pin of the LS1021a. Using the default ar1021_i2c.c driver that comes with the QOIOQ-SDK-2.0, I manage to get the driver loaded and probed but I can't figure out the correct interrupt number to use for the IRQ2. I randomly use <GIC_SPI 90 IRQ_TYPE_EDGE_RISING> in the DTS file as:
&i2c0 {
status = "okay";
ar1021_i2c@4d {
compatible = "microchip,ar1021-i2c";
reg = <0x4d>;
interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
status = "okay";
};
};
I think think it's the wrong interrupt id to use since the stat from /proc/interrupts doesn't have any anything:
root@ls1021atwr:~# cat /proc/interrupts
CPU0 CPU1
16: 0 0 GIC 29 Edge arch_timer
17: 24471 14098 GIC 30 Edge arch_timer
26: 4202 0 GIC 126 Level mmc0
27: 0 0 GIC 133 Level 3200000.sata
31: 0 0 GIC 120 Level 2180000.i2c
32: 0 0 GIC 122 Edge ar1021_i2c
38: 577 0 GIC 112 Level fsl-lpuart
39: 0 0 GIC 150 Level 29d0000.ftm0
Any idea what value to use for the "interrupts" line of the i2c in the DTS file?
cheers,
Solved! Go to Solution.
NXP SDK for LS1021a does not declare IRQ2 interrupt in DTS file. This SDK supports sysfs for GPIO using as interrupt source. Perhaps this possibility can be used for your task. If IRQ2 is needed, see attached files.
It looks like that
interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_LOW>;
property should be added.
property is calculated as "Internal interrupt ID" - 32
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
NXP SDK for LS1021a does not declare IRQ2 interrupt in DTS file. This SDK supports sysfs for GPIO using as interrupt source. Perhaps this possibility can be used for your task. If IRQ2 is needed, see attached files.
It looks like that
interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_LOW>;
property should be added.
property is calculated as "Internal interrupt ID" - 32
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you! It works after modifying the dts' entry with "GIC_SPI 165".
Cheers,