* Re: [net] can: mcp25xfd: interrupt not setup
[not found] <1606411294.8062.0@v038639.kasserver.com>
@ 2020-11-27 7:19 ` Marc Kleine-Budde
0 siblings, 0 replies; only message in thread
From: Marc Kleine-Budde @ 2020-11-27 7:19 UTC (permalink / raw)
To: petter, linux-can
[-- Attachment #1.1: Type: text/plain, Size: 2192 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-27 7:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1606411294.8062.0@v038639.kasserver.com>
2020-11-27 7:19 ` [net] can: mcp25xfd: interrupt not setup Marc Kleine-Budde
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.