MCP2515 not working on raspberry pi 4 with AGL
Description
Environment
Activity

Jan-Simon Moeller January 30, 2022 at 1:49 PM
Does this still apply on master or on plain meta-raspberrypi ?

ashwin vijaykumar November 25, 2021 at 11:58 AM
Hello,
We are trying the same thing, still we are facing the same issue in Raspberry PI 4 with MCP2515 CAN Controller.
We are making the folllowing changes in /boot/config.txt
dtparam=spi=on
dtoverlay=mcp2515-can0, oscillator=8000000, interrupt=25
dtoverlay=spi0-hw-cs
Here is the error log we got.
U-Boot 2020.10 (Jun 29 2020 - 03:06:40 +0000)
DRAM: 3.7 GiB
RPI 4 Model B (0xc03111)
MMC: mmcnr@7e300000: 1, emmc2@7e340000: 0
Loading Environment from FAT... OK
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@7d580000
PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
starting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
262 bytes read in 6 ms (42 KiB/s)
Executing script at 02400000
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
17615360 bytes read in 758 ms (22.2 MiB/s)
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
Card did not respond to voltage select!
Device 0: unknown device
ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
bcmgenet: PHY startup failed: -110
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-dc-a6-32-68-29-98
ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

ashwin vijaykumar November 25, 2021 at 11:56 AM
Hello,
We are trying the same thing, still we are facing the same issue in Raspberry PI 4 with MCP2515 CAN Controller.
We are making the folllowing changes in /boot/config.txt
dtparam=spi=on
dtoverlay=mcp2515-can0, oscillator=8000000, interrupt=25
dtoverlay=spi0-hw-cs
Here is the error log we got.
U-Boot 2020.10 (Jun 29 2020 - 03:06:40 +0000)
DRAM: 3.7 GiB
RPI 4 Model B (0xc03111)
MMC: mmcnr@7e300000: 1, emmc2@7e340000: 0
Loading Environment from FAT... OK
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@7d580000
PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
starting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
262 bytes read in 6 ms (42 KiB/s)
Executing script at 02400000
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
17615360 bytes read in 758 ms (22.2 MiB/s)
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
Card did not respond to voltage select!
Device 0: unknown device
ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
bcmgenet: PHY startup failed: -110
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-dc-a6-32-68-29-98
ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

Jan-Simon Moeller November 17, 2021 at 12:48 PM
Closing due to no feedback. Please reopen if logs are available. Tnx.

Jan-Simon Moeller September 15, 2021 at 9:16 AM
Please paste the full error logs. The instructions are correct.
Details
Details
Assignee

Reporter

Hi,
I am unable to load the Mcp2515 driver on AGL. I am using Raspberry pi 4 with AGL for a POC. I have tried using the device tree overlay method and added the following lines in the config file:
dtparam=spi=on
dtoverlay=mcp2515-can0, oscillator=8000000, interrupt=25
dtoverlay=spi0-hw-cs
The Raspberry pi keeps on crashing when I make this change.
Can someone please help me with this? I have been stuck on this for quite some time now. Is there any other way by which the mcp2515 driver can be loaded on AGL?