GPIO UART1, GPIO Interrupt

Options

hi
i would like to use ntp time sync from gps message(GPRMC, GPGGA) in Ubuntu 22.04.
there are some problems using GPIO UART1 and interrupt settings

problem 1. UART1 is not working
i tried GPIO14, 15 as UART input but no message came out from ttyS4

(UART0 (10 pin, ttyS5) -> working good)

problem 2. interrupt is blocked
i tried linux kernel module setting GPIO as /dev/pps

it fails in the process of registering the interrupt (register IRQ)
dmesg said "pin XXX cannot be used as IRQ"

(link: https://github.com/Jobbel/pps-gpio-dtless)
(both upboard pinctrl driver number 0 to 26 and sysfs 6XX~1001 failed)

Best Answers

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭
    Answer ✓
    Options

    Hi Sir,

    Q1: I will arrange time to test and confirm this problem, can you provide me with your Kernel version?
    Q2 : Do you use original control? Or use Pinctrl?

    Best Regards,
    Wilbert Lee.

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭
    Answer ✓
    Options

    Hi Sir,

    So far, pinctrl does not support the IRQ function.
    As for the sysfs part, I will ask the software engineer to arrange a time to confirm it.

    Best Regards,
    Wilbert Lee.

Answers

  • hyeonwoo
    hyeonwoo New Member Posts: 4
    Options

    Thank you for your kind response.

    My kernel version is 5.19.0-42.

    In addition, i wonder if there are other boards that support IRQ function.

  • garyw
    garyw New Member, Moderator, AAEON Posts: 82 admin
    Options

    @hyeonwoo
    pinctrl driver not implement interrupt yet, so currently there are a workarund to use it from native GPIO number, you can refer our old page in i11

    https://github.com/up-board/up-community/wiki/Pinout_UPXi11

  • hyeonwoo
    hyeonwoo New Member Posts: 4
    edited May 2023
    Options

    @garyw
    thank you for answer

    I think the native GPIO number you mentioned means the Linux GPIO Number (sysfs).

    Currently, i found every native GPIO number corresponding RPi GPIO number, and also confirmed input/output signals.

    But failed to set interrupt on native GPIO numbers Too.

    These are the correspondences i found

    RPi - sysfs
    0 - 669
    1 - 670
    2 - 671
    3 - 672
    4 - 870
    5 - 869
    6 - 872
    7 - 766
    8 - 865
    9 - 867
    10 - 868
    11 - 866
    12 - 856
    13 - 857
    14 - 835
    15 - 834
    16 - 837
    17 - 836
    18 - 760
    19 - 761
    20 - 763
    21 - 762
    22 - 859
    23 - 1001
    24 - 764
    25 - 765
    26 - 871
    27 - 858

  • rajsh
    rajsh New Member Posts: 1
    Options

    @garyw @hyeonwoo
    Any update on the IRQ using Linux sysfs 6XX~1001? I have the same issue on my xtreme i12

    [ 1747.299937] mcp2515_init: init
    [ 1747.300083] mcp2515_init: irq for pin 859 is 191
    [ 1747.318197] mcp2515_init: device created!
    [ 1747.327345] CAN device driver interface
    [ 1747.341318] mcp251x spi0.0 can0: MCP2515 successfully initialized.
    [ 1778.402456] tigerlake-pinctrl INTC1055:00: pin 123 cannot be used as IRQ
    [ 1778.402463] genirq: Setting trigger mode 2 for irq 191 failed (intel_gpio_irq_type+0x0/0x130)
    [ 1778.402614] mcp251x spi0.0: failed to acquire irq 191
    [ 1778.402626] A link change request failed with some changes committed already. Interface can0 may have been left with an inconsistent configuration, please check.

  • garyw
    garyw New Member, Moderator, AAEON Posts: 82 admin
    Options

    @rajsh @hyeonwoo
    we've release pinctrl-upboard v1.1.0 for interrupt support, you can try it now.