12-09-2024, 07:43 PM
Not sure if this is a general question or a linux question but here goes.
I am coming back to a project after an extended interruption -- life got in the way of my play.
I have a number of GPS units running on a variety of hardware. The board I use for most of them is also allwiner based and run the same armbian as the pine64. But, I like pine64's as a general purpose board and have several on my desk so decided to track down why I couldn't get them to work the way I wanted last time.
That background information is not particularly normative but it offers some background. You don't need any special hardware to reproduce this issue.
My notes from many years ago says there was a post on IRC which confirmed we can not get interrupts from some of the GPIO banks. I can no longer find that reference but that seems to be true.
I can confirm that
in armbianEnv.txt works with dmesg containing
I can also confirm that
in armbianEnv.txt fails with dmesg containing
I got as far as https://github.com/torvalds/linux/blob/m...pio.c#L175 returning -EINVAL (-22) where I found it using deprecated functions to get the interrupt so it might just be something to do with the pps-gpio client.
The board that pps-gpio likes has pin 12 of the pi2 bus going to gpio PA6 whereas the pine64 connects pin 12 to gpio PC8 -- different banks on controller 0.
Anyway, for the question - are GPIO's on bank C expected to be able to generate interrupts? If so, I'll queue further investigation. Otherwise I'll limit my selection to pins in the PH bank, or use the euler bus.
I am coming back to a project after an extended interruption -- life got in the way of my play.
I have a number of GPS units running on a variety of hardware. The board I use for most of them is also allwiner based and run the same armbian as the pine64. But, I like pine64's as a general purpose board and have several on my desk so decided to track down why I couldn't get them to work the way I wanted last time.
That background information is not particularly normative but it offers some background. You don't need any special hardware to reproduce this issue.
My notes from many years ago says there was a post on IRC which confirmed we can not get interrupts from some of the GPIO banks. I can no longer find that reference but that seems to be true.
I can confirm that
Code:
overlays=pps-gpio
param_pps_pin=PH9
in armbianEnv.txt works with dmesg containing
Code:
[Mon Dec 9 23:58:56 2024] pps pps0: new PPS source pps@0.-1
[Mon Dec 9 23:58:56 2024] pps pps0: Registered IRQ 100 as PPS source
I can also confirm that
Code:
overlays=pps-gpio
param_pps_pin=PC8
in armbianEnv.txt fails with dmesg containing
Code:
[Tue Dec 10 00:04:25 2024] pps-gpio pps@0: failed to map GPIO to IRQ: -22
[Tue Dec 10 00:04:25 2024] pps-gpio: probe of pps@0 failed with error -22
I got as far as https://github.com/torvalds/linux/blob/m...pio.c#L175 returning -EINVAL (-22) where I found it using deprecated functions to get the interrupt so it might just be something to do with the pps-gpio client.
The board that pps-gpio likes has pin 12 of the pi2 bus going to gpio PA6 whereas the pine64 connects pin 12 to gpio PC8 -- different banks on controller 0.
Anyway, for the question - are GPIO's on bank C expected to be able to generate interrupts? If so, I'll queue further investigation. Otherwise I'll limit my selection to pins in the PH bank, or use the euler bus.