Re: [net] can: mcp25xfd: interrupt not setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/26/20 6:21 PM, petter wrote:
> Hi Folks,
> 
> The original problem I am coming from:
> 		root@cl-debian:~# dmesg | grep MCP
> 	[    7.512119] mcp251xfd spi1.0 can2: MCP2518FD rev0.0 (-RX_INT 
> -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD c:40.00MHz m:10.00MHz 
> r:10.00MHz e:0.00MHz) successfully 					initialized.
> 		root@PHYBOX3-206471:~# ip link set can2 type can bitrate 500000 
> dbitrate 2000000 fd on
> 		root@PHYBOX3-206471:~# ip link set can2 up
> 		root@PHYBOX3-206471:~#
> 
>                 candump / cansniffer did not show any traffic
>                 cansend will sent messages (only 4 after down/up 
> interface visible on scope) and after >20 messages there was an error 
> "write: No buffer space available"
> 
> Monitoring the INT line I can see after down/up the interface a high on 
> INT and e.g. after first packet is received the INT goes low but never 
> came high again.
> The mcp251xfd_irq was never called (checked with a printk) which in 
> turn never clears the interrupt.
> 
> The only thing I found out that a cat on debug/gpio did not list the 
> gpio.
> 
> A CD from the SD card interface, which have quite the same 
> functionality is listed here:
> 	gpio-128 ( |cd ) in hi IRQ ACTIVE LOW
> 
> since this is defined in the DT under &usdhc1
> 	cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
> 
> My expectation is that (or interrupt-parent, interrupts)
> 	interrupts-extended = <&gpio3 0 GPIO_ACTIVE_LOW>;
> will do the magic here and I should see the IRQ ACTIVE LOW for that pin 
> in debug/gpio

Have a look at the bindings example:

https://elixir.bootlin.com/linux/v5.10-rc5/source/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml#L74

It's "IRQ_TYPE_LEVEL_LOW" not "GPIO_ACTIVE_LOW"

> Did I miss something ?
> 
> Nevertheless I would request a pre-check that checks if the interrupt 
> is triggered.

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux