# MCP2515 CAN device on VOXL2 J10 SPI + gpio

Source: https://forum.modalai.com/topic/4238/mcp2515-can-device-on-voxl2-j10-spi-gpio
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2025-03-06 16:45:26 UTC by Paul Handrigan
Replies: 1 · Views: 445

## Paul Handrigan · 2025-03-06 16:45:26 UTC

I have added a MCP2515 CAN controller to the SPI bus on J10 using GPIO_46/CS1 as the interrupt gpio pin.  I have added the in tree driver into the kernel.  I have requested gpio 46 as the interrupt pin, but it is not taking effect.  However, when it does request the gpio, you can see contention on the pin. 

What do I need to do in order to configure GPIO_46 as an input gpio to use as an interrupt for this device?  Below is the DT node that I am using.

+&qupv3_se14_spi {
+       status = "ok";
+       can_spi: can@0 {
+               compatible = "microchip,mcp2515";
+               reg = <0>;
+               interrupt-parent = <&tlmm>;
+               interrupts = <46 0x8>;
+               clocks = <&clk12M>;
+               spi-max-frequency = <8000000>;
+       };
+};

Thanks in advance!
Paul

## Reply by Alex Kushleyev (ModalAI staff) · 2025-03-07 17:13:30 UTC

@Paul-Handrigan , please see this post, depending on which board you have (M0054 or M0154), it may not be possible to use GPIO 46 as input :

https://forum.modalai.com/topic/4200/issue-reading-gpio-1146-pin-6-on-j10-on-voxl2
