On Wednesday, May 27, 2015 at 5:53:06 AM UTC+3, Lawrence Y wrote:
>
> Hi,
>

Hi!
 

>
> I was wondering if there was an example of a dts that used external 
> interrupts with the sun6i or sun8i chips?  I've been trying to configure an 
> external interrupt on PA23 with no luck so far.  I looked through all of 
> the sun6i and sun8i dts files for an example but did not find anything that 
> appeared to be using an external interrupt.
>
> I did find this documentation on external interrupts on the wiki
>

> http://linux-sunxi.org/External_interrupts
>

It is nice that you found our wiki somewhat helpful, but please see below.

 

> but it appears to be for sun7i which does not use a banked interrupt 
> architecture.
>
> I also found this patch set which contains functionality for external 
> interrupts on the sun6i A31, but I think I am misunderstanding how to setup 
> the interrupt in the dts.
>
> http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/260377.html
>
> For background, I am trying to get a gsl3675 touchscreen to generate an 
> IRQ inside the sun6i A31s when the interrupt line toggles.  I can confirm 
> that some signal line toggles when touches are present with a logic 
> analyzer, but it's unclear if it is PA3 or PA23 and I have been trying 
> both.  The fex file says PA3 but the A31 schematics say PA23.  
>

Now, please start with the New Device Howto page found here:

 http://linux-sunxi.org/New_Device_howto

And work through it, because there currently isn't a single device 
documented in the wiki with gsl3675 touchscreen controller.

 

> A snippet of the relevant portions of my dts are below, if it helps. (my 
> dts could be totally wrong)
>
> &i2c1 {
>     pinctrl-names = "default";
>     pinctrl-0 = <&i2c1_pins_a>;
>     status = "okay";
>
>     gsl3675: touchscreen@40 {
>         compatible = "silead,gsl3675";
>         reg = <0x40>;
>         interrupt-parent = <&pio>;
>         interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
>         pinctrl-names = "default";
>         pinctrl-0 = <&ts_irq_pin>;
>     };
> };
>
> &pio {
>     ts_irq_pin: tspin@0 {
>         allwinner,pins = "PA23";
>         allwinner,function = "irq";
>         allwinner,drive = <0>;
>         allwinner,pull = <1>;
>     };
> };
>
> When I load my test module I get the following error which may or may not 
> be relevant.  (I don't see where the irq 55 is coming from)
>
> [   10.826782] genirq: Setting trigger mode 11 for irq 55 failed 
> (sunxi_pinctrl_irq_set_type+0x0/0x144)
>
> If anyone has any suggestions on things I could try to set things up 
> properly so that the the IRQ will fire, I would appreciate them.
>
> Thanks!
>
> Lawrence
>
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to