Re: [linux-sunxi] A20 higher External interrupr (EINT22-EINT31)

2015-11-25 Thread ivoronov
DTS FIXED:
Per
http://www.serverphorums.com/read.php?12,1260131

Add a proper interrupt xlate function, that uses the same description than
the GPIOs (  ), that will make things less confusing.

Corrected example

interrupt-parent = <>;
interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */

-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] A20 higher External interrupr (EINT22-EINT31)

2015-11-24 Thread ivoronov
Update:

When trying to load the example 
http://linux-sunxi.org/External_interrupts
just changing PH20 to PH7 


[  529.653595] /rebooter: arguments longer than property
[  529.658844] rebooter-irq: cannot register IRQ -6
[  529.663558] prismlx-rebooter: probe of rebooter failed with error -5

-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] A20 higher External interrupr (EINT22-EINT31)

2015-11-23 Thread ivoronov
Dear Andrea, Maxime & Co,

In the past I have set up EINT7 for my Cubie2 per manual 
http://linux-sunxi.org/External_interrupts and it works well on 3.19 through 
4.2 kernels.

In looking at audio sunxi-codec working I switched to 4.4-rc1 over the last 
week and discovered the following:
1) my module with EINT7 stop working
2) also EINT20 example from http://linux-sunxi.org/External_interrupts does not 
work "as is".

Any suggestion on what is going wrong?

Thank you,

Best regards,
Ivan

-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] A20 higher External interrupr (EINT22-EINT31)

2015-05-07 Thread Andrea Venturi


On Thursday, May 7, 2015 at 10:00:04 AM UTC+2, Maxime Ripard wrote:

 ...
  any advice for further investigation? 

 There's more to it. 


thanx for the quick reply!
 

 I don't think that ever supposed to work that way, most notably 
 because it just wouldn't work with SoCs that multiple interrupt banks 
 (like the A31, A23, etc.) 


sorry, i'm slowly wading my way on this topic, so i'm not very competent
I  supposed this single bank interrupt setup, as it's simpler (and older: 
A10 A20..) case were already working, and someway it works! :-)

then the more general case, multiple banks and so on.. will follow adding 
over.
 

 I think it worked by accident, because it's somewhat compatible with 
 the default interrupt property parsing code, but that probably need 
 some additional development. 

 What's mainly missing would be an irq_xlate function in the pinctrl 
 driver that would parse the interrupt property with the same format 
 than we have for gpios (phandle excluded, of course), which would mean 
 something like that in your case. 

 interrupt-parent = pio; 
 interrupts = 8 10 flags; 


in this example, there was a interrupt-extended entry that's i suppose 
it's more or less similar..

http://linux-sunxi.org/External_interrupts  

is that a fake/stub entry? amazing..

That function would then need to lookup in our pin array that it's 
 indeed an interrupt, and would return the number of the interrupt 
 within the interrupt controller (which would be 22 in your case). 

 I can try to cook something during the weekend, and send you a patch 
 for you to test. 


that would be more than i expect.. surely i'll test!

thanx

Andrea
 


 Maxime 

 -- 
 Maxime Ripard, Free Electrons 
 Embedded Linux, Kernel and Android engineering 
 http://free-electrons.com 


-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] A20 higher External interrupr (EINT22-EINT31)

2015-05-07 Thread Maxime Ripard
On Wed, May 06, 2015 at 11:48:59PM -0700, Andrea Venturi wrote:
 hello,
 
 i have an issue about external interrupts, following this clear example: 
 http://linux-sunxi.org/External_interrupts
 
 it works for EINT up to EINT21 in PH port, but if i try in an Olimex A20 
 SOM (on a A20 SOM EVB who have a schematic available showing no hints 
 AFAICS) an EINT in PI port (EINT22-EINT31) nothing is raised when i put the 
 pin to GND.
 
 i slightly more thorough description is in Olimex forum 
 https://www.olimex.com/forum/index.php?topic=4400.0 but i suppose it's more 
 general issue, that's why i post here too (sorry if it's seen as a bad 
 attitude..)
 
 BTW the A20 PIO page on linux-sunxi.org doesn't talk about these higher 
 EINT22-EINT31 so i smell something fishy here: 
 http://linux-sunxi.org/A20/PIO
 
 any advice for further investigation?

There's more to it.

I don't think that ever supposed to work that way, most notably
because it just wouldn't work with SoCs that multiple interrupt banks
(like the A31, A23, etc.)

I think it worked by accident, because it's somewhat compatible with
the default interrupt property parsing code, but that probably need
some additional development.

What's mainly missing would be an irq_xlate function in the pinctrl
driver that would parse the interrupt property with the same format
than we have for gpios (phandle excluded, of course), which would mean
something like that in your case.

interrupt-parent = pio;
interrups = 8 10 flags; 

That function would then need to lookup in our pin array that it's
indeed an interrupt, and would return the number of the interrupt
within the interupt controller (which would be 22 in your case).

I can try to cook something during the weekend, and send you a patch
for you to test.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] A20 higher External interrupr (EINT22-EINT31)

2015-05-07 Thread Andrea Venturi
hello,

i have an issue about external interrupts, following this clear example: 
http://linux-sunxi.org/External_interrupts

it works for EINT up to EINT21 in PH port, but if i try in an Olimex A20 
SOM (on a A20 SOM EVB who have a schematic available showing no hints 
AFAICS) an EINT in PI port (EINT22-EINT31) nothing is raised when i put the 
pin to GND.

i slightly more thorough description is in Olimex forum 
https://www.olimex.com/forum/index.php?topic=4400.0 but i suppose it's more 
general issue, that's why i post here too (sorry if it's seen as a bad 
attitude..)

BTW the A20 PIO page on linux-sunxi.org doesn't talk about these higher 
EINT22-EINT31 so i smell something fishy here: 
http://linux-sunxi.org/A20/PIO

any advice for further investigation?

bests

Andrea

-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] A20 higher External interrupr (EINT22-EINT31)

2015-05-07 Thread Maxime Ripard
Please keep all the recipients in Cc.

On Thu, May 07, 2015 at 02:13:16AM -0700, Andrea Venturi wrote:
  I don't think that ever supposed to work that way, most notably 
  because it just wouldn't work with SoCs that multiple interrupt banks 
  (like the A31, A23, etc.) 
 
 
 sorry, i'm slowly wading my way on this topic, so i'm not very
 competent I supposed this single bank interrupt setup, as it's
 simpler (and older: A10 A20..) case were already working, and
 someway it works! :-)

Like I said, I strongly suspect it works by accident.

 then the more general case, multiple banks and so on.. will follow
 adding over.
 
  I think it worked by accident, because it's somewhat compatible with 
  the default interrupt property parsing code, but that probably need 
  some additional development. 
 
  What's mainly missing would be an irq_xlate function in the pinctrl 
  driver that would parse the interrupt property with the same format 
  than we have for gpios (phandle excluded, of course), which would mean 
  something like that in your case. 
 
  interrupt-parent = pio; 
  interrupts = 8 10 flags; 

 in this example, there was a interrupt-extended entry that's i suppose 
 it's more or less similar..
 

interrupt-extended is a way to group interrupt-parent and interrupts
together. These two syntaxes are strictly equivalent.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature