All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Schuchmann <schuchmann@schleissheimer.de>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: mcp251xfd No Oscillator (clock) defined
Date: Sun, 6 Dec 2020 10:18:23 +0000	[thread overview]
Message-ID: <DB8P190MB0634231494D3D788E87DCE54D9CF0@DB8P190MB0634.EURP190.PROD.OUTLOOK.COM> (raw)

Hi all,
I am new to the list so sorry for any errors.

I want to get Seeed "2 Channel CAN BUS FD Shield for Raspberry Pi" 
https://wiki.seeedstudio.com/2-Channel-CAN-BUS-FD-Shield-for-Raspberry-Pi/
get to work on a Raspberry Pi Compute Module 4 IO Board
https://www.raspberrypi.org/products/compute-module-4-io-board

I have installed the Raspberry Pi OS with Raspberry Pi Imager

$ uname -a
Linux raspberrypi 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l GNU/Linux

without any changes. Therefore I tried the following commands to load the overlay 

$ sudo dtoverlay spi0-1cs cs0_pin=24
$ sudo dtoverlay mcp251xfd spi0-1 oscillator=40000000 speed=20000000 interrupt=18

then dmesg shows me this:
[  175.674317] spi spi0.1: setting up native-CS1 to use GPIO
[  175.733692] CAN device driver interface
[  175.737453] mcp251xfd spi0.1: No Oscillator (clock) defined.

Can anyone help me to setup the Oscillator?

I already tried to enable "dtparam=spi=on" in /boot/config.txt but this does not change anything.

I also tried the second CAN interface to run on SPI1 with
$ sudo dtoverlay spi1-1cs cs0_pin=12
$ sudo dtoverlay mcp251xfd spi1-1 oscillator=40000000 speed=20000000 interrupt=22

but then kernel seems to crash

[  226.615817] ------------[ cut here ]------------
[  226.615842] kernel BUG at mm/slub.c:4010!
[  226.615860] Internal error: Oops - BUG: 0 [#1] SMP ARM
[  226.615878] Modules linked in: spi_bcm2835aux mcp251xfd can_dev binfmt_misc sha256_generic libsha256 cfg80211 rfkill 8021q garp stp llc spidev raspberrypi_hwmon vc4 cec drm_kms_helper v3d gpu_sched bcm2835_codec(C) drm snd_soc_core snd_bcm2835(C) bcm2835_isp(C) drm_panel_orientation_quirks bcm2835_v4l2(C) snd_compress v4l2_mem2mem bcm2835_mmal_vchiq(C) videobuf2_dma_contig videobuf2_vmalloc snd_pcm_dmaengine videobuf2_memops videobuf2_v4l2 videobuf2_common snd_pcm snd_timer syscopyarea snd sysfillrect videodev sysimgblt rpivid_mem fb_sys_fops mc vc_sm_cma(C) spi_bcm2835 uio_pdrv_genirq uio ip_tables x_tables ipv6
[  226.616079] CPU: 0 PID: 631 Comm: dtoverlay Tainted: G         C        5.4.79-v7l+ #1373
[  226.616101] Hardware name: BCM2711
[  226.616131] PC is at kfree+0x240/0x290
[  226.616154] LR is at free_overlay_changeset+0x84/0xa8
[  226.616172] pc : [<c03f5fa0>]    lr : [<c08ff00c>]    psr: 40000013
[  226.616191] sp : d6e8ddb0  ip : d6e8dde0  fp : d6e8dddc
[  226.616208] r10: c1204fc8  r9 : d7047a00  r8 : d7047a00
[  226.616225] r7 : d61b8000  r6 : c08ff00c  r5 : 00000000  r4 : dc0e5280
[  226.616244] r3 : c12a11a8  r2 : 00000030  r1 : 00000000  r0 : d61b8000
[  226.616264] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  226.616284] Control: 30c5383d  Table: 17047600  DAC: fffffffd
[  226.616304] Process dtoverlay (pid: 631, stack limit = 0x8d6d8885)
[  226.616323] Stack: (0xd6e8ddb0 to 0xd6e8e000)
[  226.616341] dda0:                                     dc0e5280 00000002 d6e8ddf4 d7047c40
[  226.616367] ddc0: d7047c40 ffffffea d61b8584 d7047a00 d6e8ddf4 d6e8dde0 c08ff00c c03f5d6c
[  226.616392] dde0: d7047c40 d61b8000 d6e8de6c d6e8ddf8 c08ffbd8 c08fef94 00000000 c03f734c
[  226.616416] de00: d7047c44 c1204fc8 d7047c40 d7047c60 c12927f4 c1368484 d682503c c0e40498
[  226.616441] de20: d6158000 ffffffea d6825000 d61b8000 d6158174 d6826000 f0851000 449c3aea
[  226.616466] de40: d7047700 00001862 d6825000 d6824000 00000000 d7047700 00000008 d41ba4c8
[  226.616491] de60: d6e8de8c d6e8de70 c08f8fa8 c08ffac8 d6ce6380 d6fc4b40 d41ba4c8 d7047704
[  226.616516] de80: d6e8deb4 d6e8de90 c04ac400 c08f8f50 d6fc4b40 d41ba4c8 000d801e ef97a610
[  226.616540] dea0: d55382a8 00000008 d6e8def4 d6e8deb8 c040e3e4 c04ac384 00000000 00000000
[  226.616565] dec0: c020ce54 d6fc4b48 d682d170 d6fc4b40 00000000 d682cc40 d682d19c c12b9d54
[  226.616590] dee0: d682d170 c1204fc8 d6e8df04 d6e8def8 c040e59c c040e34c d6e8df2c d6e8df08
[  226.616614] df00: c02433f8 c040e590 ffffe000 d6e8dfb0 c02011c4 00000004 fffffe30 5ac3c35a
[  226.616639] df20: d6e8dfac d6e8df30 c020ce54 c0243350 d6e8df4c d6e8df40 5ac3c35a c1204fcc
[  226.616664] df40: d6e8df6c d6e8df50 c0407de8 c040eb18 00000003 d6864800 d686484c 00000000
[  226.616688] df60: d6e8df94 d6e8df70 c042fcc0 c0407d84 00173198 b6ecbb1c 00000000 449c3aea
[  226.616713] df80: c02011c4 00173198 b6ecbb1c 00000000 00000006 c02011c4 d6e8c000 00000006
[  226.616738] dfa0: 00000000 d6e8dfb0 c0201034 c020c8cc 00000000 00000444 b6ecb6d8 b6deb864
[  226.616762] dfc0: 00173198 b6ecbb1c 00000000 00000006 001743a0 00000000 00000000 00174268
[  226.616787] dfe0: 0000006c bed894d0 b6ded088 b6e50f74 20000010 00000003 00000000 00000000
[  226.616807] Backtrace:
[  226.616833] [<c03f5d60>] (kfree) from [<c08ff00c>] (free_overlay_changeset+0x84/0xa8)
[  226.616859]  r8:d7047a00 r7:d61b8584 r6:ffffffea r5:d7047c40 r4:d7047c40
[  226.616886] [<c08fef88>] (free_overlay_changeset) from [<c08ffbd8>] (of_overlay_fdt_apply+0x11c/0x990)
[  226.616909]  r5:d61b8000 r4:d7047c40
[  226.616932] [<c08ffabc>] (of_overlay_fdt_apply) from [<c08f8fa8>] (cfs_overlay_item_dtbo_write+0x64/0xa4)
[  226.616958]  r10:d41ba4c8 r9:00000008 r8:d7047700 r7:00000000 r6:d6824000 r5:d6825000
[  226.616980]  r4:00001862
[  226.617004] [<c08f8f44>] (cfs_overlay_item_dtbo_write) from [<c04ac400>] (configfs_release_bin_file+0x88/0xb0)
[  226.617030]  r7:d7047704 r6:d41ba4c8 r5:d6fc4b40 r4:d6ce6380
[  226.617055] [<c04ac378>] (configfs_release_bin_file) from [<c040e3e4>] (__fput+0xa4/0x244)
[  226.617081]  r9:00000008 r8:d55382a8 r7:ef97a610 r6:000d801e r5:d41ba4c8 r4:d6fc4b40
[  226.617108] [<c040e340>] (__fput) from [<c040e59c>] (____fput+0x18/0x1c)
[  226.617129]  r10:c1204fc8 r9:d682d170 r8:c12b9d54 r7:d682d19c r6:d682cc40 r5:00000000
[  226.617150]  r4:d6fc4b40
[  226.617174] [<c040e584>] (____fput) from [<c02433f8>] (task_work_run+0xb4/0xd4)
[  226.617202] [<c0243344>] (task_work_run) from [<c020ce54>] (do_work_pending+0x594/0x59c)
[  226.617227]  r9:5ac3c35a r8:fffffe30 r7:00000004 r6:c02011c4 r5:d6e8dfb0 r4:ffffe000
[  226.617254] [<c020c8c0>] (do_work_pending) from [<c0201034>] (slow_work_pending+0xc/0x20)
[  226.617276] Exception stack(0xd6e8dfb0 to 0xd6e8dff8)
[  226.617294] dfa0:                                     00000000 00000444 b6ecb6d8 b6deb864
[  226.617319] dfc0: 00173198 b6ecbb1c 00000000 00000006 001743a0 00000000 00000000 00174268
[  226.617343] dfe0: 0000006c bed894d0 b6ded088 b6e50f74 20000010 00000003
[  226.617365]  r10:00000006 r9:d6e8c000 r8:c02011c4 r7:00000006 r6:00000000 r5:b6ecbb1c
[  226.617386]  r4:00173198
[  226.617405] Code: 1a000003 e5943008 e3130001 1a000000 (e7f001f2)
[  226.617428] ---[ end trace cd616810d13be5e4 ]---

Sven  

--
Sven Schuchmann
Schleißheimer Soft- und
Hardwareentwicklung GmbH
Am Kalkofen 10
61206 Nieder-Wöllstadt
GERMANY
Phone: +49 6034 9148 711
Fax: +49 6034 9148 91
Email: schuchmann@schleissheimer.de

             reply	other threads:[~2020-12-06 10:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06 10:18 Sven Schuchmann [this message]
2020-12-06 10:32 ` mcp251xfd No Oscillator (clock) defined Marc Kleine-Budde
2020-12-06 12:40   ` AW: " Sven Schuchmann
2020-12-06 12:57     ` Marc Kleine-Budde
2020-12-06 14:56     ` Patrick Menschel
2020-12-06 16:28       ` AW: " Sven Schuchmann
2020-12-06 18:31       ` Marc Kleine-Budde
2020-12-06 19:15         ` Patrick Menschel
2020-12-06 19:26   ` Kurt Van Dijck
2020-12-06 19:34     ` Marc Kleine-Budde
2020-12-06 19:56       ` AW: " Sven Schuchmann
2020-12-06 20:14         ` Marc Kleine-Budde
2020-12-06 20:36           ` AW: " Sven Schuchmann
2020-12-06 20:48             ` Marc Kleine-Budde
2020-12-06 21:23               ` AW: " Sven Schuchmann
2020-12-06 22:00                 ` Marc Kleine-Budde
2020-12-07  9:35                   ` AW: " Sven Schuchmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB8P190MB0634231494D3D788E87DCE54D9CF0@DB8P190MB0634.EURP190.PROD.OUTLOOK.COM \
    --to=schuchmann@schleissheimer.de \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.