[meta-xilinx] MIO used as Interrupt Line in Device Tree

Joe Nicholson joe at joenicholson.co.uk
Thu Jul 9 02:32:26 PDT 2015


Hi All

 

I'm trying to set up an I2C device in the device tree, that has its
interrupt line connected to an MIO (MIO 9).

 

I'm using a custom design that's based on the zc702 dev board.  Yocto is
Fido latest, kernel is 3.14 linux-xlnx as normal.

 

How do I get this to work?

 

I've tried connecting the interrupt to the GPIO IRQ:

 

        /* Note: First I2C interface */

        ps7_i2c_0: ps7-i2c at e0004000 {

 

            /* I2C LTC4306 MUX */

            i2c_mux_1: i2cmux at 47 {

                compatible = "ltc,ltc4306";

                #address-cells = <1>;

                #size-cells = <0>;

                reg = <0x47>;

 

               /* IRQ 52 - 32 = 20 */

                interrupts = <0 20 4>;

                interrupt-parent = <&ps7_scugic_0>;

       [...]

 

This fails with error:

[    2.470032] ltc4306 0-0047: Unable to register IRQ

[    2.475099] Unable to handle kernel NULL pointer dereference at virtual
address 00000000

[    2.483544] pgd = edd18000

[    2.487753] [00000000] *pgd=2dcf3831, *pte=00000000, *ppte=00000000

[    2.495973] Internal error: Oops: 17 [#1] PREEMPT SMP ARM

[    2.501348] Modules linked in: i2c_mux_ltc4306(O+)

[    2.506564] CPU: 0 PID: 595 Comm: udevd Tainted: G 

 

I've also tried the method described here, where the GPIO is set up as an
interrupt-controller:

http://forums.xilinx.com/t5/Embedded-Linux/MIO-GPIO-interrupt-in-device-tree
/td-p/631659 

 

i.e. adding the following to gpio:

        ps7_gpio_0: ps7-gpio at e000a000 {

            interrupt-controller;

            interrupt-cells = <2>;

        } ;

 

then setting up the IRQ as follows:

 

            /* I2C LTC4306 MUX */

            i2c_mux_1: i2cmux at 47 {

                compatible = "ltc,ltc4306";

                #address-cells = <1>;

                #size-cells = <0>;

                reg = <0x47>;

 

                /* MIO 9 is IRQ */

                interrupt-parent = <&ps7_gpio_0>;

                interrupts = <9 4>;

 

This seems to register the IRQ, but always returns IRQ 0.

[    2.374433] ltc4306 0-0047: Found IRQ 0

 

The rest of the new tree actually works fabulously.  A pointer in the right
direction here would be really helpful as I feel I'm missing something
conceptual. but simply cannot see it.

 

Cheers!

 

Joe

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20150709/92bd8020/attachment.html>


More information about the meta-xilinx mailing list