LS1046 GPIO interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1046 GPIO interrupt

2,026 Views
shijj
Contributor I

hi!

I want to use a GPIO as an interrupt source,so I refer to this manual LS1043 GPIO support in Linux SDK

I configured  according to the manual,but when i  type  echo  both > edge ,the terminal print this:

root@localhost:/sys/class/gpio/gpio448# echo both > edge
[ 440.803793] gpio gpiochip1: (2310000.gpio): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ
-bash: echo: write error: Input/output error

and i check the /proc/interrupts :

root@localhost:/sys/class/gpio/gpio448# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
1: 0 0 0 0 GICv2 25 Level vgic
3: 6506 5623 5394 4957 GICv2 30 Level arch_timer
4: 0 0 0 0 GICv2 27 Level kvm guest timer
6: 0 0 0 0 GICv2 138 Level arm-pmu
7: 0 0 0 0 GICv2 139 Level arm-pmu
8: 0 0 0 0 GICv2 127 Level arm-pmu
9: 0 0 0 0 GICv2 129 Level arm-pmu
11: 0 0 0 0 GICv2 75 Level fsl-ifc
12: 1 0 0 0 GICv2 131 Level
13: 40530 0 0 0 GICv2 94 Level mmc0
14: 0 0 0 0 GICv2 77 Level bman-err, qman-err, fman-err
20: 0 0 0 0 GICv2 214 Level QMan portal 3
21: 0 0 0 0 GICv2 216 Level QMan portal 2
22: 0 0 0 0 GICv2 218 Level QMan portal 1
23: 0 0 0 0 GICv2 220 Level QMan portal 0
29: 0 0 0 0 GICv2 215 Level BMan portal 3
30: 0 0 0 0 GICv2 217 Level BMan portal 2
31: 0 0 0 0 GICv2 219 Level BMan portal 1
32: 0 0 0 0 GICv2 221 Level BMan portal 0
34: 112 0 0 0 GICv2 88 Level 2180000.i2c
35: 34 0 0 0 GICv2 91 Level 21b0000.i2c
36: 1788 0 0 0 GICv2 86 Level ttyS0
42: 0 0 0 0 GICv2 118 Level 29d0000.ftm0
43: 0 0 0 0 GICv2 115 Level 2ad0000.watchdog
44: 0 0 0 0 GICv2 135 Level eDMA
45: 0 0 0 0 GICv2 92 Level xhci-hcd:usb1
46: 0 0 0 0 GICv2 93 Level xhci-hcd:usb3
47: 0 0 0 0 GICv2 95 Level xhci-hcd:usb5
48: 0 0 0 0 GICv2 101 Level ahci-qoriq[3200000.sata]
63: 0 0 0 0 GICv2 149 Level PCIe PME
64: 0 0 0 0 GICv2 150 Level aerdrv
65: 0 0 0 0 GICv2 76 Level fman
IPI0: 5614 10437 8082 6962 Rescheduling interrupts
IPI1: 462 717 676 700 Function call interrupts
IPI2: 0 0 0 0 CPU stop interrupts
IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
IPI4: 0 0 0 0 Timer broadcast interrupts
IPI5: 1528 658 469 443 IRQ work interrupts
IPI6: 0 0 0 0 CPU wake-up interrupts
Err: 0

I can't find any information about mpc8xxx.

Is it that I did not open the driver for mpc8xxx correctly? But I have already followed the manual completely.

my lsdk version is 18.03.

Another question : How can I create a GPIO interrupt in the driver layer? I did not find any information about this.

thanks

Tags (1)
0 Kudos
1 Reply

1,526 Views
Pavel
NXP Employee
NXP Employee

Check your Linux BSP.

The following message dump happens on the LS1046ARDB board if LSDK 1906 Linux BSP is used:

root@TinyDistro:/sys/class/gpio# echo 448 > export

root@TinyDistro:/sys/class/gpio# ls

export       gpio448      gpiochip384  gpiochip416  gpiochip448  gpiochip480  unexport

root@TinyDistro:/sys/class/gpio# cd gpio448

root@TinyDistro:/sys/class/gpio/gpio448# echo both > edge

root@TinyDistro:/sys/class/gpio/gpio448# cd ..

root@TinyDistro:/sys/class/gpio# more gpio448

 

*** gpio448: directory ***

 

root@TinyDistro:/sys/class/gpio# more gpio448/*

::::::::::::::

gpio448/active_low

::::::::::::::

0

 

*** gpio448/device: directory ***

 

::::::::::::::

gpio448/direction

::::::::::::::

in

::::::::::::::

gpio448/edge

::::::::::::::

both

 

*** gpio448/power: directory ***

 

 

*** gpio448/subsystem: directory ***

 

::::::::::::::

gpio448/uevent

::::::::::::::

::::::::::::::

gpio448/value

::::::::::::::

0

Have a great day,
Pavel Chubakov

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos