AnsweredAssumed Answered

LS1043A : GPIO1_30 doesn't generate interruption

Question asked by Serge Payre on Mar 8, 2018
Latest reply on Mar 12, 2018 by Serge Payre

Hi,

 

On my card, the GPIO1_30 input line is connected to the MCP2515's external interrupt.

 

I configure RCW wort to set GPIO1_30 as an interrupt (IRQ_EXT=0x0, IRQ_BASE, GPIO1[30]=0).

 

I added the following lines in my device tree:

 

&dspi0 {
status = "okay";
bus-num = <0>;

   can0: can@1 {

      compatible = "microchip,mcp2515";
      reg = <1>;

      clocks = <&mcp251x_clk>;

      interrupt-parent = <&gpio0>;
      interrupts = <30 0x2>;
      spi-max-frequency = <5000000>;
      fsl,spi-cs-sck-delay = <200>;
      fsl,spi-sck-cs-delay = <200>;
      mcp251x_clk: clock {
         compatible = "fixed-clock";
         #clock-cells = <0>;
         clock-frequency = <20000000>;
      };
   };
};

 

When I send CAN messages from PC to board, CAN message are correctly acknowledged.

 

When I send CAN message from board to PC,  these messages are correctly received on PC

 

On board, If I look at the interruption line, I see what it goes down to level 0 at the first transmit message but never goes back to level 1.

To transfer a new message, I need to close and open device CAN again (ifconfig can0 down / up)

 

At this point, I think that hardware interrupt isn't notified to GIC Controller

 

Where is the problem ?

 

Thanks.

 

root@bipls1043:~# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3
  1:          0          0          0          0       GIC  29 Edge      arch_timer
  2:       2867       2706       2752       1523       GIC  30 Edge      arch_timer
  3:          0          0          0          0       GIC  27 Edge      kvm guest timer
  9:          0          0          0          0       GIC  25 Edge      vgic
 11:       7191          0          0          0       GIC  75 Level     fsl-ifc
 12:         52          0          0          0       GIC  94 Level     mmc0
 13:          0          0          0          0       GIC  77 Level     bman-err, qman-err, fman-err
 14:          0          0          0          0       GIC  76 Level     fman
 16:         48          0          0          0       GIC  96 Level     2100000.dspi
 17:          2          0          0          0       GIC 131 Level     1550000.quadspi
 18:         96          0          0          0       GIC  88 Level     2180000.i2c
 19:          0          0          0          0       GIC  89 Level     2190000.i2c
 20:          0          0          0          0       GIC  90 Level     21a0000.i2c
 21:          0          0          0          0       GIC  91 Level     21b0000.i2c
 22:       1300          0          0          0       GIC  86 Level     serial
 29:          0          0          0          0       GIC 118 Level     29d0000.ftm0
 32:         28          0          0          0       GIC  92 Level     xhci-hcd:usb1
 33:          0          0          0          0       GIC  93 Level     xhci-hcd:usb3
 34:          0          0          0          0       GIC  95 Level     xhci-hcd:usb5
 35:          0          0          0          0       GIC 101 Level     3200000.sata
 36:          0          0          0          0       GIC 184 Level     qDMA error
 37:          0          0          0          0       GIC  71 Level     qDMA queue
 38:          0          0          0          0       GIC 159 Level     ls-pcie-pme
 39:          0          0          0          0       GIC 160 Level     aerdrv
 45:          0          0          0       4902       GIC 214 Level     QMan portal 3
 46:          0          0       4674          0       GIC 216 Level     QMan portal 2
 47:          0       4903          0          0       GIC 218 Level     QMan portal 1
 48:       4896          0          0          0       GIC 220 Level     QMan portal 0
 54:          0          0          0          0       GIC 215 Level     BMan portal 3
 55:          0          0          0          0       GIC 217 Level     BMan portal 2
 56:          0          0          0          0       GIC 219 Level     BMan portal 1
 57:          0          0          0          0       GIC 221 Level     BMan portal 0
 58:          0          0          0          0       GIC 148 Level     MSI-GROUP
 59:          0          0          0          0       GIC 158 Level     MSI-GROUP
 60:          0          0          0          0       GIC 192 Level     MSI-GROUP
 61:          0          0          0          0       GIC 152 Level     PCIe PME
 62:          0          0          0          0  mpc8xxx-gpio  30 Edge      mcp251x
 63:          2          0          0          0       GIC 103 Level     1710000.jr
 64:          0          0          0          0       GIC 104 Level     1720000.jr
 65:          0          0          0          0       GIC 105 Level     1730000.jr
 66:          0          0          0          0       GIC 106 Level     1740000.jr
IPI0:      2451       2190       2470       1928       Rescheduling interrupts
IPI1:        56         42         72         76       Function call interrupts
IPI2:         0          0          0          0       CPU stop interrupts
IPI3:         0          0          0          0       Timer broadcast interrupts
IPI4:         0          0          0          0       IRQ work interrupts
Err:          0

Outcomes