[meta-xilinx] MIO used as Interrupt Line in Device Tree
Mike Looijmans
mike.looijmans at topic.nl
Thu Jul 9 22:41:03 PDT 2015
Try a newer kernel version. The "interrupt-parent" property missing on the
gpio controller node is a sign that it probably doesn't work on that version yet.
On 09-07-15 11:32, Joe Nicholson wrote:
> 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
>
>
>
Kind regards,
Mike Looijmans
System Expert
TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
Telefax: +31 (0) 499 33 69 70
E-mail: mike.looijmans at topicproducts.com
Website: www.topicproducts.com
Please consider the environment before printing this e-mail
More information about the meta-xilinx
mailing list