This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM67A: IRQ collision between pinctrl and E5010 JPEC encoder

Part Number: AM67A
Other Parts Discussed in Thread: AM67, AM62P

I tried to work with the JPEG encoder of the AM67A but got the following interesting behaviour.

Commit: c94f90807b390a224fd087549b4bd5d84d5fc971 added the device node for the e5010 inside k3-j722s-main.dtsi.

With that added I get the following error message during boot.

[    8.207286] genirq: Flags mismatch irq 14. 00000004 (e5010) vs. 00214084 (pinctrl)
[    8.218557] e5010 fd20000.e5010: error -EBUSY: failed to register IRQ 14
[    8.226111] e5010 fd20000.e5010: probe with driver e5010 failed with error -16

 

When checking the pinctrl node we see that it reference to the same IRQ. Here is also a comment which describes that the IRQ has no real function and can be reassigned if there is a conflict.

 

main_pmx0: pinctrl@f4000 {              
                compatible = "ti,am654-padconf", "pinctrl-single";
                reg = <0x00 0xf4000 0x00 0x2b0>;
                #pinctrl-cells = <1>;
                pinctrl-single,register-width = <32>;
                pinctrl-single,function-mask = <0xffffffff>;
                 /*
                 * pinctrl IP DOES NOT give any functional IRQs when a
                 * system is in active state. This IRQ is only a dummy IRQ
                 * that is being used to trick Linux into thinking that
                 * GIC can potentially recieve an interrupt from this IP.
                 * This helps us setup the IO daisychain wakeups for deep
                 * sleep via chained wake IRQs.
                 * Please feel free to assign a different number here as
                 * long as it is unused if 98 conflicts with another use case.
                 */
                interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
                interrupt-controller;
                #interrupt-cells = <1>;
                bootph-all;
};

When I override the assignment to a different IRQ inside my boards DTS, the error message disapears and I can use the JPEG encoder.

[    8.177403] e5010 fd20000.e5010: Device registered as /dev/video2

Now I have two questions about that.

  1. Are you already aware of that "by default" collission?
  2. How do I properly select an IRQ for the pinctrl so that nothing else get bricked?

At the moment I  reference to GIC_SPI 103 because I didnt't found any reference to this IRQ inside the DTS files for my board. Is that enough, or do I need to check something else?