Thread (6 messages) 6 messages, 3 authors, 2021-07-12

RE: MCP2518FD Drivers Rarely Working with Custom Kernel 5.10.Y

From: Joshua Quesenberry <hidden>
Date: 2021-07-06 18:40:39

Good Afternoon,

Today I was planning to attack this problem from two different angles, first to detach the HAT and try narrowing down my config.txt to just what's needed for CAN (HAT wired up by jumper wires) and second to completely rebuild my OS from scratch in case something went awry during the upgrades; luckily during narrowing down my config.txt I found the issue. It appears that when I try to load the I2S subsystem that it's conflicting with SPI0. Since it's a lesser used feature, I'm guessing none of you all are testing with it loaded? Any ideas on how to begin troubleshooting this? I2S is something we need.

Current config.txt with two I2S lines (double hash) removed that results in working CAN on each reboot:

------------------------------------------------------------------------------------------------------------------------------------

dtdebug=1

disable_splash=1
boot_delay=0

hdmi_force_mode=1

hdmi_group=1
hdmi_mode=3 # 480p 60Hz H

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
## dtparam=i2s=on
dtparam=spi=off
enable_uart=0

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# I2S WM8782 Driver
## dtoverlay=hel-wm8782,alsaname=mic

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
start_x=1
gpu_mem=512

# GPS
dtoverlay=uart3

# Reserved for HAT IDs
dtoverlay=i2c0
dtparam=pins_0_1=on
dtparam=combine=off

# Power Supervisor, IMU, RPi I2C Bus
dtoverlay=i2c1

# CAN 0/1
dtoverlay=spi0-cs
dtparam=cs0_pin=8
dtparam=cs1_pin=7

# Reserved
dtoverlay=spi5-2cs
dtparam=cs0_pin=12
dtparam=cs0_spidev=disabled
dtparam=cs1_pin=26
dtparam=cs1_spidev=disabled

# CAN 0
dtoverlay=mcp251xfd,spi0-0,interrupt=24,oscillator=40000000,speed=20000000

# CAN 1
dtoverlay=mcp251xfd,spi0-1,interrupt=25,oscillator=40000000,speed=20000000

------------------------------------------------------------------------------------------------------------------------------------

Thanks,

Josh Q

-----Original Message-----
From: Joshua Quesenberry <redacted> 
Sent: Friday, July 2, 2021 10:27 AM
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Patrick Menschel <redacted>; kernel@pengutronix.de; linux-can@vger.kernel.org; Joshua Quesenberry <redacted>
Subject: Re: MCP2518FD Drivers Rarely Working with Custom Kernel 5.10.Y

The only other format I have is Saleae's trace format, if you're willing to install their software, the attached trace should work. I double checked that the application will load even without the device attached, and it does, so it should work for you. I was using Logic 1, but switched to their Logic 2 app and recollected a trace for you.
https://www.saleae.com/downloads/

Thanks,

Josh Q

On Fri, Jul 2, 2021 at 5:31 AM Marc Kleine-Budde [off-list ref] wrote:
On 25.06.2021 12:55:26, Joshua Quesenberry wrote:
quoted
Forgive me, I forgot can0 = spi0.1 and can1 = spi0.0 right now 
because I killed my UDEV rule so I was tapped onto the wrong CS 
line. Attached is a snapshot of what I'm seeing AND an export of the 
data from Saleae which may prove more useful than snapshots.
Pulseview cannot parse the csv file correctly (see [1]). Can you save 
it in a different format?

Marc

[1] 
https://www.mail-archive.com/sigrok-devel@lists.sourceforge.net/msg037
51.html


--
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 |
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help