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

Joe Nicholson joe at joenicholson.co.uk
Fri Jul 10 08:55:19 PDT 2015


Hi

I've now rebuilt with linux-xlnx kernel master-next branch (4.0 kernel) but still get 'Found IRQ 0' when I try to register an interrupt to the gpio controller.

I've added the following to the gpio controller definition:
	interrupt-controller;
	interrupt-cells = <2>

Then this to my I2C device:
	interrupt-parent = <&ps7_gpio_0>;
                interrupts = <9 4>;
	(I'm trying to attach to MIO 9)

Does this mean that even the latest linux-xlnx kernel doesn't gpio controller interrupt controller capabilities?

Cheers!

Joe


-----Original Message-----
From: meta-xilinx-bounces at yoctoproject.org [mailto:meta-xilinx-bounces at yoctoproject.org] On Behalf Of Joe Nicholson
Sent: 10 July 2015 11:50
To: 'Mike Looijmans'; meta-xilinx at yoctoproject.org
Subject: Re: [meta-xilinx] MIO used as Interrupt Line in Device Tree

Thanks Mike!

I see that you're using this feature (in https://github.com/topic-embedded-products/linux/blob/topic-miami/arch/arm/boot/dts/topic-miami-florida-gen.dtsi)... just spotted you're milosoftware on the Xilinx forum post, so it must work!!

I'll try a newer kernel version and retest.

Cheers!

Joe


-----Original Message-----
From: meta-xilinx-bounces at yoctoproject.org [mailto:meta-xilinx-bounces at yoctoproject.org] On Behalf Of Mike Looijmans
Sent: 10 July 2015 06:41
To: meta-xilinx at yoctoproject.org
Subject: Re: [meta-xilinx] MIO used as Interrupt Line in Device Tree

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-devic
> e-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





--
_______________________________________________
meta-xilinx mailing list
meta-xilinx at yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx

--
_______________________________________________
meta-xilinx mailing list
meta-xilinx at yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx




More information about the meta-xilinx mailing list