Mcp2515 on iMX8M

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mcp2515 on iMX8M

1,168 Views
Faruk
Contributor I

Hello

I have MaaxBoard-Avnet and Mcp2515. I am trying to run mcp2515 with MaaxBoard for spi to CAN.

Mcp2515 worked with MaaxBoard on kernel 4.14 however when I try same configuration for kernel 5.4. mcp2515 can't work. I tried to explain my studies and results below.

I compiled an image using the steps on the https://github.com/Avnet/meta-maaxboard/tree/zeus. I added IMAGE_INSTALL_append = " can-utils" to yocto local.conf file for can commands.

Kernel configuration:

Networking support  --->
    <*>   CAN bus subsystem support ---> 
        --- CAN bus subsystem support
        <*>   Raw CAN Protocol (raw access with CAN-ID filtering)
        <*>   Broadcast Manager CAN Protocol (with content filtering)
              CAN Device Drivers  --->
                  <*> Virtual Local CAN Interface (vcan)
                  <*> Platform CAN drivers with Netlink support
                  [*]   CAN bit-timing calculation
CAN SPI interfaces --->
<*> Microchip 251x series SPI CAN Controller

.dts configuration is:

Spoiler
/*
 * Copyright 2019 EMBEST
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/* 40-pin extended GPIO, expanded into SPI, I2C, PWM and other interfaces */

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_hog>;

	imx8mq-evk {
		pinctrl_hog: hoggrp {
			fsl,pins = <
				/*Default GPIOs*/
				MX8MQ_IOMUXC_NAND_READY_B_GPIO3_IO16	0x19	/* PIN 7,  GPIO 4  */
				MX8MQ_IOMUXC_NAND_WE_B_GPIO3_IO17		0x19	/* PIN 11, GPIO 17 */
			//	MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8		0x19	/* PIN 13, 		 		MCP2515 INT_1 */
			//	MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9		0x19	/* PIN 15,  			MCP2515 INT_2 */
				MX8MQ_IOMUXC_NAND_RE_B_GPIO3_IO15		0x19	/* PIN 22, GPIO 25 */
				MX8MQ_IOMUXC_GPIO1_IO03_GPIO1_IO3		0x19	/* PIN 36, GPIO 16 		CAN_STB_Maax_Out */
			//	MX8MQ_IOMUXC_NAND_DATA05_GPIO3_IO11		0x19	/* PIN 37, 				TRIG_SN65DS183_EN */
				//MX8MQ_IOMUXC_NAND_CE1_B_GPIO3_IO2		0x19	/* PIN 26,   			MCP2515 CS_2 */
				MX8MQ_IOMUXC_NAND_CLE_GPIO3_IO5			0x19	/* PIN 29, GPIO 5  */
				MX8MQ_IOMUXC_NAND_DATA04_GPIO3_IO10		0x19	/* PIN 31, GPIO 6  */
				MX8MQ_IOMUXC_SAI2_TXC_GPIO4_IO25		0x19	/* PIN 12, GPIO 18 */
			//	MX8MQ_IOMUXC_GPIO1_IO15_GPIO1_IO15		0x19	/* PIN 32 				WTD_INTERLOCK_Maax */
				MX8MQ_IOMUXC_SAI2_RXFS_GPIO4_IO21		0x19	/* PIN 35, GPIO 19 */
				MX8MQ_IOMUXC_SAI2_RXD0_GPIO4_IO23		0x19	/* PIN 38, GPIO 20 */
				MX8MQ_IOMUXC_SAI2_TXD0_GPIO4_IO26		0x19	/* PIN 40, GPIO 21 */
			>;
		};

		pinctrl_ecspi1: ecspi1grp {
				fsl,pins = <
				MX8MQ_IOMUXC_ECSPI1_SS0_GPIO5_IO9		0x16		// CAN 0 CS
				MX8MQ_IOMUXC_NAND_CE1_B_GPIO3_IO2		0x16		// CAN 1 CS 	GPIO3_IO02
				MX8MQ_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI	0x16
				MX8MQ_IOMUXC_ECSPI1_MISO_ECSPI1_MISO	0x16
				MX8MQ_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK	0x1816
				MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8		0x146		//	LVTTL Enabled, Pull-up Enabled, Slew Rate Field :Slow  Interrupt pin CAN0 
				MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9		0x146		//	LVTTL Enabled, Pull-up Enabled, Slew Rate Field :Slow  Interrupt pin CAN1 				
			>;
		};

		pinctrl_i2c2: i2c2grp {
			fsl,pins = <
				MX8MQ_IOMUXC_I2C2_SCL_I2C2_SCL			0x4000007f
				MX8MQ_IOMUXC_I2C2_SDA_I2C2_SDA			0x4000007f
			>;
		};

		pinctrl_i2c3: i2c3grp {
			fsl,pins = <
				MX8MQ_IOMUXC_I2C3_SCL_I2C3_SCL			0x4000007f
				MX8MQ_IOMUXC_I2C3_SDA_I2C3_SDA			0x4000007f
			>;
		};

		pinctrl_i2c4: i2c4grp {
			fsl,pins = <
				MX8MQ_IOMUXC_I2C4_SCL_I2C4_SCL			0x4000007f
				MX8MQ_IOMUXC_I2C4_SDA_I2C4_SDA			0x4000007f
			>;
		};

		pinctrl_uart2: uart2grp {
			fsl,pins = <
				MX8MQ_IOMUXC_UART2_RXD_UART2_DCE_RX		0x49
				MX8MQ_IOMUXC_UART2_TXD_UART2_DCE_TX		0x49
			>;
		};

	};
};

&ecspi1{
	fsl,spi-num-chipselects = < 2 >;
	cs-gpios = <&gpio5 9 0 >,<&gpio3 2 0 > ;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi1 >;
	status = "okay";
	#address-cells=<1>;
	#size-cells=<1>;
	can0: spidev@0x00{
		compatible = "microchip,mcp2515";
		clocks = <&osc_8m>;
		interrupt-parent =<&gpio3>;		// GPIO3_IO08	
		interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
		spi-max-frequency = <8000000>;
		reg = <0>;
	};
	can1: spidev@0x01{
		compatible = "microchip,mcp2515";
		clocks = <&osc_8m>;
		interrupt-parent =<&gpio3>;		// GPIO3_IO09
		interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
		spi-max-frequency = <8000000>;
		reg = <1>;
	};	
};

&i2c2 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	status = "okay";
};

&i2c3 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c3>;
	status = "okay";
};

&i2c4 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c4>;
	status = "okay";
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2>;
	assigned-clocks = <&clk IMX8MQ_CLK_UART2>;
	assigned-clock-parents = <&clk IMX8MQ_CLK_25M>;
	status = "okay";
};

 

 

 

 and also I created new clock node on imx8mq.dtsi file. Part of clock node:

 

osc_8m: clock-osc-8m {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency= <8000000>;
		clock-output-names = "osc_8m";
	};

 

 

Dmesg output messages is:

Spoiler
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.4.24-2.1.0+ge4abce0bad07 (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Tue Dec 28 08:13:53 UTC 2021
[    0.000000] Machine model: Avnet Maaxboard
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000044000000, size 960 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x00000000bfffffff]
[    0.000000] NUMA: NODE_DATA [mem 0xbfbd3500-0xbfbd4fff]
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000040000000-0x00000000bfffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000bfffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[    0.000000] On node 0 totalpages: 524288
[    0.000000]   DMA32 zone: 8192 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 524288 pages, LIFO batch:63
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.1
[    0.000000] percpu: Embedded 24 pages/cpu s58904 r8192 d31208 u98304
[    0.000000] pcpu-alloc: s58904 r8192 d31208 u98304 alloc=24*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] Speculative Store Bypass Disable mitigation not required
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p2 rootwait rw
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1044972K/2097152K available (16572K kernel code, 1444K rwdata, 6512K rodata, 2944K init, 1018K bss, 69140K reserved, 983040K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 128 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] GICv3: Distributor has no Range Selector support
[    0.000000] GICv3: 16 PPIs implemented
[    0.000000] GICv3: no VLPI support, no direct LPI support
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000038880000
[    0.000000] ITS: No ITS available, not enabling LPIs
[    0.000000] random: get_random_bytes called from start_kernel+0x2b8/0x44c with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 8.33MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1ec0311ec, max_idle_ns: 440795202152 ns
[    0.000004] sched_clock: 56 bits at 8MHz, resolution 120ns, wraps every 2199023255541ns
[    0.000546] Console: colour dummy device 80x25
[    0.000628] Calibrating delay loop (skipped), value calculated using timer frequency.. 16.66 BogoMIPS (lpj=33333)
[    0.000641] pid_max: default: 32768 minimum: 301
[    0.000736] LSM: Security Framework initializing
[    0.000808] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000825] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.023984] ASID allocator initialised with 32768 entries
[    0.031982] rcu: Hierarchical SRCU implementation.
[    0.041038] EFI services will not be available.
[    0.048022] smp: Bringing up secondary CPUs ...
[    0.080189] Detected VIPT I-cache on CPU1
[    0.080219] GICv3: CPU1: found redistributor 1 region 0:0x00000000388a0000
[    0.080246] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.112234] Detected VIPT I-cache on CPU2
[    0.112256] GICv3: CPU2: found redistributor 2 region 0:0x00000000388c0000
[    0.112278] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.144306] Detected VIPT I-cache on CPU3
[    0.144326] GICv3: CPU3: found redistributor 3 region 0:0x00000000388e0000
[    0.144347] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.144432] smp: Brought up 1 node, 4 CPUs
[    0.144458] SMP: Total of 4 processors activated.
[    0.144466] CPU features: detected: 32-bit EL0 Support
[    0.144475] CPU features: detected: CRC32 instructions
[    0.154902] CPU: All CPU(s) started at EL2
[    0.154932] alternatives: patching kernel code
[    0.156865] devtmpfs: initialized
[    0.164836] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.164855] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.196887] pinctrl core: initialized pinctrl subsystem
[    0.197765] DMI not present or invalid.
[    0.198079] NET: Registered protocol family 16
[    0.212434] DMA: preallocated 256 KiB pool for atomic allocations
[    0.212451] audit: initializing netlink subsys (disabled)
[    0.212613] audit: type=2000 audit(0.212:1): state=initialized audit_enabled=0 res=1
[    0.213575] cpuidle: using governor menu
[    0.214153] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.215216] Serial: AMBA PL011 UART driver
[    0.215299] imx mu driver is registered.
[    0.215325] imx rpmsg driver is registered.
[    0.219871] imx8mq-pinctrl 30330000.iomuxc: initialized IMX pinctrl driver
[    0.250497] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.250510] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.250518] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.250526] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    0.252820] cryptd: max_cpu_qlen set to 1000
[    0.259915] ACPI: Interpreter disabled.
[    0.260876] iommu: Default domain type: Translated 
[    0.261040] vgaarb: loaded
[    0.261422] SCSI subsystem initialized
[    0.261573] libata version 3.00 loaded.
[    0.261835] usbcore: registered new interface driver usbfs
[    0.261882] usbcore: registered new interface driver hub
[    0.261961] usbcore: registered new device driver usb
[    0.263345] mc: Linux media interface: v0.10
[    0.263379] videodev: Linux video capture interface: v2.00
[    0.263457] pps_core: LinuxPPS API ver. 1 registered
[    0.263464] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.263482] PTP clock support registered
[    0.263645] EDAC MC: Ver: 3.0.0
[    0.264578] No BMan portals available!
[    0.264914] QMan: Allocated lookup table at (____ptrval____), entry count 65537
[    0.265272] No QMan portals available!
[    0.265802] No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
[    0.266236] FPGA manager framework
[    0.266331] Advanced Linux Sound Architecture Driver Initialized.
[    0.266831] Bluetooth: Core ver 2.22
[    0.266863] NET: Registered protocol family 31
[    0.266869] Bluetooth: HCI device and connection manager initialized
[    0.266880] Bluetooth: HCI socket layer initialized
[    0.266890] Bluetooth: L2CAP socket layer initialized
[    0.266907] Bluetooth: SCO socket layer initialized
[    0.267699] clocksource: Switched to clocksource arch_sys_counter
[    0.267864] VFS: Disk quotas dquot_6.6.0
[    0.267924] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.268144] pnp: PnP ACPI: disabled
[    0.275423] thermal_sys: Registered thermal governor 'step_wise'
[    0.275427] thermal_sys: Registered thermal governor 'power_allocator'
[    0.275837] NET: Registered protocol family 2
[    0.276241] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.276285] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.276447] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[    0.276747] TCP: Hash tables configured (established 16384 bind 16384)
[    0.276846] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.276909] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.277086] NET: Registered protocol family 1
[    0.277532] RPC: Registered named UNIX socket transport module.
[    0.277539] RPC: Registered udp transport module.
[    0.277546] RPC: Registered tcp transport module.
[    0.277552] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.277968] PCI: CLS 0 bytes, default 64
[    0.278778] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.279201] kvm [1]: IPA Size Limit: 40bits
[    0.280189] kvm [1]: vgic-v2@31020000
[    0.280214] kvm [1]: GIC system register CPU interface enabled
[    0.280295] kvm [1]: vgic interrupt IRQ1
[    0.280418] kvm [1]: Hyp mode initialized successfully
[    0.287185] Initialise system trusted keyrings
[    0.287306] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[    0.295053] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.295861] NFS: Registering the id_resolver key type
[    0.295883] Key type id_resolver registered
[    0.295890] Key type id_legacy registered
[    0.295904] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.295929] jffs2: version 2.2. (NAND) \xc2\xa9 2001-2006 Red Hat, Inc.
[    0.296382] fuse: init (API version 7.31)
[    0.296669] 9p: Installing v9fs 9p2000 file system support
[    0.317036] Key type asymmetric registered
[    0.317045] Asymmetric key parser 'x509' registered
[    0.317083] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    0.317091] io scheduler mq-deadline registered
[    0.317098] io scheduler kyber registered
[    0.322787] EINJ: ACPI disabled.
[    0.332351] imx-sdma 302c0000.sdma: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2
[    0.332367] imx-sdma 302c0000.sdma: Falling back to sysfs fallback for: imx/sdma/sdma-imx7d.bin
[    0.338088] mxs-dma 33000000.dma-apbh: initialized
[    0.342533] Bus freq driver module loaded
[    0.348132] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.350549] 30860000.serial: ttymxc0 at MMIO 0x30860000 (irq = 32, base_baud = 1562500) is a IMX
[    1.307592] printk: console [ttymxc0] enabled
[    1.312503] 30890000.serial: ttymxc1 at MMIO 0x30890000 (irq = 33, base_baud = 1562500) is a IMX
[    1.321931] 30a60000.serial: ttymxc3 at MMIO 0x30a60000 (irq = 39, base_baud = 5000000) is a IMX
[    1.332188] gpiomem-maaxboard gpiomem: Initialised: Registers at 0x00000000
[    1.347825] imx-dcss 32e00000.display-controller: ctxld: can't get irq number
[    1.355065] imx-dcss 32e00000.display-controller: submodules initialization failed
[    1.362669] imx-dcss 32e00000.display-controller: master bind failed: -517
[    1.381878] loop: module loaded
[    1.387592] imx ahci driver is registered.
[    1.394672] spi_imx 30820000.spi: dma setup error -19, use pio
[    1.401099] spi_imx 30820000.spi: probed
[    1.406768] libphy: Fixed MDIO Bus: probed
[    1.411862] tun: Universal TUN/TAP device driver, 1.6
[    1.417114] CAN device driver interface
[    1.421743] thunder_xcv, ver 1.0
[    1.425034] thunder_bgx, ver 1.0
[    1.428312] nicpf, ver 1.0
[    1.432214] Freescale FM module, FMD API version 21.1.0
[    1.437760] Freescale FM Ports module
[    1.441435] fsl_mac: fsl_mac: FSL FMan MAC API based driver
[    1.447204] fsl_dpa: FSL DPAA Ethernet driver
[    1.451707] fsl_advanced: FSL DPAA Advanced drivers:
[    1.456683] fsl_proxy: FSL DPAA Proxy initialization driver
[    1.462389] fsl_oh: FSL FMan Offline Parsing port driver
[    1.468742] hclge is initializing
[    1.472073] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[    1.479305] hns3: Copyright (c) 2017 Huawei Corporation.
[    1.484677] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[    1.491737] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    1.497538] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    1.503381] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.509351] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k
[    1.516322] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.521944] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[    1.529787] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    1.535922] sky2: driver version 1.30
[    1.540683] VFIO - User Level meta-driver version: 0.3
[    1.548530] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.555072] ehci-pci: EHCI PCI platform driver
[    1.559565] ehci-platform: EHCI generic platform driver
[    1.565004] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.571207] ohci-pci: OHCI PCI platform driver
[    1.575710] ohci-platform: OHCI generic platform driver
[    1.581628] usbcore: registered new interface driver usb-storage
[    1.587738] usbcore: registered new interface driver usbserial_generic
[    1.594305] usbserial: USB Serial support registered for generic
[    1.600354] usbcore: registered new interface driver ftdi_sio
[    1.606130] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.613483] usbcore: registered new interface driver usb_serial_simple
[    1.620040] usbserial: USB Serial support registered for carelink
[    1.626160] usbserial: USB Serial support registered for zio
[    1.631847] usbserial: USB Serial support registered for funsoft
[    1.637881] usbserial: USB Serial support registered for flashloader
[    1.644263] usbserial: USB Serial support registered for google
[    1.650218] usbserial: USB Serial support registered for libtransistor
[    1.656786] usbserial: USB Serial support registered for vivopay
[    1.662830] usbserial: USB Serial support registered for moto_modem
[    1.669130] usbserial: USB Serial support registered for motorola_tetra
[    1.675775] usbserial: USB Serial support registered for novatel_gps
[    1.682157] usbserial: USB Serial support registered for hp4x
[    1.687932] usbserial: USB Serial support registered for suunto
[    1.693886] usbserial: USB Serial support registered for siemens_mpi
[    1.702540] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
[    1.712200] input: 30370000.snvs:snvs-powerkey as /devices/platform/soc@0/soc@0:bus@30000000/30370000.snvs/30370000.snvs:snvs-powerkey/input/input0
[    1.727719] snvs_rtc 30370000.snvs:snvs-rtc-lp: registered as rtc0
[    1.734020] i2c /dev entries driver
[    1.738224] mxc-mipi-csi2_yav 30a70000.mipi_csi1: mipi_csi2_probe
[    1.744393] mxc-mipi-csi2_yav 30a70000.mipi_csi: Remote device at endpoint@0 XXX found
[    1.752336] mxc-mipi-csi2_yav 30a70000.mipi_csi1: lanes: 2, name: mxc-mipi-csi2.0
[    1.760098] mx6s-csi 30a90000.csi1_bridge: initialising
[    1.765593] CSI: Registered sensor subdevice: mxc-mipi-csi2.0
[    1.773077] qoriq_thermal 30260000.tmu: throttle-cfg: missing temp_delta parameter,use default 3000 (3C)
[    1.783727] imx2-wdt 30280000.watchdog: timeout 60 sec (nowayout=0)
[    1.790353] Bluetooth: HCI UART driver ver 2.3
[    1.794817] Bluetooth: HCI UART protocol H4 registered
[    1.799972] Bluetooth: HCI UART protocol BCSP registered
[    1.805320] Bluetooth: HCI UART protocol LL registered
[    1.810471] Bluetooth: HCI UART protocol ATH3K registered
[    1.815906] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    1.822283] Bluetooth: HCI UART protocol Broadcom registered
[    1.827977] Bluetooth: HCI UART protocol QCA registered
[    1.835813] sdhci: Secure Digital Host Controller Interface driver
[    1.842007] sdhci: Copyright(c) Pierre Ossman
[    1.846599] Synopsys Designware Multimedia Card Interface Driver
[    1.853350] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.892601] mmc0: SDHCI controller on 30b40000.mmc [30b40000.mmc] using ADMA
[    1.903895] ledtrig-cpu: registered to indicate activity on CPUs
[    1.911509] caam 30900000.crypto: device ID = 0x0a16040100000000 (Era 9)
[    1.918277] caam 30900000.crypto: job rings = 3, qi = 0
[    1.945694] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.947619] caam algorithms registered in /proc/crypto
[    1.956800] mmc0: new high speed SDHC card at address aaaa
[    1.965098] mmcblk0: mmc0:aaaa SB32G 29.7 GiB 
[    1.971711] caam 30900000.crypto: caam pkc algorithms registered in /proc/crypto
[    1.974132]  mmcblk0: p1 p2
[    1.984046] caam_jr 30901000.jr: registering rng-caam
[    1.993286] caam-snvs 30370000.caam-snvs: can't get snvs clock
[    1.999179] caam-snvs 30370000.caam-snvs: violation handlers armed - non-secure state
[    2.007810] usbcore: registered new interface driver usbhid
[    2.013397] usbhid: USB HID core driver
[    2.019408] No fsl,qman node
[    2.022319] Freescale USDPAA process driver
[    2.026516] fsl-usdpaa: no region found
[    2.030364] Freescale USDPAA process IRQ driver
[    2.052152] imx-cdnhdmi sound-hdmi: ASoC: failed to init link imx8 hdmi: -517
[    2.059310] imx-cdnhdmi sound-hdmi: snd_soc_register_card failed (-517)
[    2.066225] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    2.075855] NET: Registered protocol family 26
[    2.081077] NET: Registered protocol family 10
[    2.086304] Segment Routing with IPv6
[    2.090052] NET: Registered protocol family 17
[    2.094519] can: controller area network core (rev 20170425 abi 9)
[    2.100759] NET: Registered protocol family 29
[    2.105218] can: raw protocol (rev 20170425)
[    2.109500] can: broadcast manager protocol (rev 20170425 t)
[    2.115176] can: netlink gateway (rev 20190810) max_hops=1
[    2.121220] Bluetooth: RFCOMM TTY layer initialized
[    2.126125] Bluetooth: RFCOMM socket layer initialized
[    2.131293] Bluetooth: RFCOMM ver 1.11
[    2.135063] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.140386] Bluetooth: BNEP filters: protocol multicast
[    2.145626] Bluetooth: BNEP socket layer initialized
[    2.150602] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.156540] Bluetooth: HIDP socket layer initialized
[    2.161563] 8021q: 802.1Q VLAN Support v1.8
[    2.165776] lib80211: common routines for IEEE802.11 drivers
[    2.171449] lib80211_crypt: registered algorithm 'NULL'
[    2.171453] lib80211_crypt: registered algorithm 'WEP'
[    2.171457] lib80211_crypt: registered algorithm 'CCMP'
[    2.171460] lib80211_crypt: registered algorithm 'TKIP'
[    2.171576] 9pnet: Installing 9P2000 support
[    2.175905] tsn generic netlink module v1 init...
[    2.180704] Key type dns_resolver registered
[    2.186505] registered taskstats version 1
[    2.190621] Loading compiled-in X.509 certificates
[    2.265751] ldo5: supplied by buck6
[    2.271800] ldo6: supplied by buck7
[    2.278758] i2c i2c-0: IMX I2C adapter registered
[    2.284760] i2c i2c-1: IMX I2C adapter registered
[    2.290591] i2c i2c-2: IMX I2C adapter registered
[    2.296415] i2c i2c-3: IMX I2C adapter registered
[    2.301702] imx8mq-usb-phy 381f0040.usb-phy: 381f0040.usb-phy supply vbus not found, using dummy regulator
[    2.311738] imx8mq-usb-phy 382f0040.usb-phy: 382f0040.usb-phy supply vbus not found, using dummy regulator
[    2.328910] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.335547] [drm] No driver support for vblank timestamp query.
[    2.344332] cdns-mhdp-imx 32c00000.hdmi: lane-mapping 0xe4
[    2.356058] imx-dcss 32e00000.display-controller: bound 32c00000.hdmi (ops cdns_mhdp_imx_ops)
[    2.365968] [drm] Initialized imx-dcss 1.0.0 20190917 for 32e00000.display-controller on minor 0
[    2.375862] [drm] Cannot find any crtc or sizes
[    2.390860] mcp251x spi0.0: CANCTRL 0x0a
[    2.390868] mcp251x spi0.0: Cannot initialize MCP2515. Wrong wiring?
[    2.397258] [drm] Cannot find any crtc or sizes
[    2.401841] mcp251x spi0.0: Probe failed, err=19
[    2.406498] [drm] Cannot find any crtc or sizes
[    2.446351] mcp251x spi0.1: CANCTRL 0x00
[    2.446358] mcp251x spi0.1: Cannot initialize MCP2515. Wrong wiring?
[    2.452741] mcp251x spi0.1: Probe failed, err=19
[    2.460442] pps pps0: new PPS source ptp0
[    2.472008] libphy: fec_enet_mii_bus: probed
[    2.478515] random: fast init done
[    2.482813] fec 30be0000.ethernet eth0: registered PHC device 0
[    2.490244] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[    2.495767] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 1
[    2.503566] xhci-hcd xhci-hcd.4.auto: hcc params 0x0220fe6c hci version 0x110 quirks 0x0000000001010010
[    2.513027] xhci-hcd xhci-hcd.4.auto: irq 52, io mem 0x38100000
[    2.520883] hub 1-0:1.0: USB hub found
[    2.524677] hub 1-0:1.0: 1 port detected
[    2.528920] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[    2.534435] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 2
[    2.542114] xhci-hcd xhci-hcd.4.auto: Host supports USB 3.0 SuperSpeed
[    2.548710] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.557844] hub 2-0:1.0: USB hub found
[    2.561640] hub 2-0:1.0: 1 port detected
[    2.567142] xhci-hcd xhci-hcd.5.auto: xHCI Host Controller
[    2.572658] xhci-hcd xhci-hcd.5.auto: new USB bus registered, assigned bus number 3
[    2.580451] xhci-hcd xhci-hcd.5.auto: hcc params 0x0220fe6c hci version 0x110 quirks 0x0000000001010010
[    2.589906] xhci-hcd xhci-hcd.5.auto: irq 53, io mem 0x38200000
[    2.597070] hub 3-0:1.0: USB hub found
[    2.600860] hub 3-0:1.0: 1 port detected
[    2.605091] xhci-hcd xhci-hcd.5.auto: xHCI Host Controller
[    2.610600] xhci-hcd xhci-hcd.5.auto: new USB bus registered, assigned bus number 4
[    2.618282] xhci-hcd xhci-hcd.5.auto: Host supports USB 3.0 SuperSpeed
[    2.624884] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.634023] hub 4-0:1.0: USB hub found
[    2.637813] hub 4-0:1.0: 1 port detected
[    2.642376] imx-cpufreq-dt imx-cpufreq-dt: cpu speed grade 2 mkt segment 2 supported-hw 0x4 0x4
[    2.653244] sdhci-esdhc-imx 30b50000.mmc: allocated mmc-pwrseq
[    2.693857] mmc1: SDHCI controller on 30b50000.mmc [30b50000.mmc] using ADMA
[    2.702801] galcore: clk_get 2d core clock failed, disable 2d/vg!
[    2.709353] Galcore version 6.4.0.234062
[    2.729063] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    2.736195] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.753042] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.761463] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    2.776343] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[    2.840208] mmc1: new high speed SDIO card at address 0001
[    2.871875] hantrodec: module inserted. Major = 235
[    2.879215] debugfs: Directory '30050000.sai' with parent 'imx-audio-hdmi' already present!
[    2.887728] imx-cdnhdmi sound-hdmi: i2s-hifi <-> 30050000.sai mapping ok
[    2.894469] imx-cdnhdmi sound-hdmi: ASoC: no DMI vendor name!
[    2.900280] debugfs: File 'Capture' in directory 'dapm' already present!
[    2.912071] input: gpio_keys as /devices/platform/gpio_keys/input/input1
[    2.921168] input: bd718xx-pwrkey as /devices/platform/soc@0/soc@0:bus@30800000/30a20000.i2c/i2c-0/0-004b/gpio-keys.1.auto/input/input2
[    2.934600] snvs_rtc 30370000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T00:00:01 UTC (1)
[    2.943989] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.955744] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.962339] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.964340] ALSA device list:
[    2.970971] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    2.973968]   #0: imx-audio-hdmi
[    3.019741] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.028013] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.038379] devtmpfs: mounted
[    3.042498] Freeing unused kernel memory: 2944K
[    3.047096] Run /sbin/init as init process
[    3.410376] systemd[1]: System time before build time, advancing clock.
[    3.456396] systemd[1]: systemd 243.2+ running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
[    3.478353] systemd[1]: Detected architecture arm64.
[    3.531144] systemd[1]: Set hostname to <maaxboard>.
[    3.551476] random: systemd: uninitialized urandom read (16 bytes read)
[    3.558259] systemd[1]: Initializing machine ID from random generator.
[    3.847569] systemd[1]: /lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket \xe2\x86\x92 /run/dbus/system_bus_socket; please update the unit file accordingly.
[    3.878356] systemd[1]: /lib/systemd/system/syslogd.service:8: PIDFile= references a path below legacy directory /var/run/, updating /var/run/syslogd.pid \xe2\x86\x92 /run/syslogd.pid; please update the unit file accordingly.
[    3.908019] systemd[1]: /lib/systemd/system/rpcbind.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/rpcbind.sock \xe2\x86\x92 /run/rpcbind.sock; please update the unit file accordingly.
[    3.935083] systemd[1]: /lib/systemd/system/klogd.service:8: PIDFile= references a path below legacy directory /var/run/, updating /var/run/klogd.pid \xe2\x86\x92 /run/klogd.pid; please update the unit file accordingly.
[    4.008636] systemd[1]: /lib/systemd/system/rngd.service:21: Unknown key name 'ProtectKernelLogs' in section 'Service', ignoring.
[    4.066007] random: systemd: uninitialized urandom read (16 bytes read)
[    4.072829] systemd[1]: system-getty.slice: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[    4.103830] random: systemd: uninitialized urandom read (16 bytes read)
[    4.537122] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    4.783977] systemd-journald[367]: Received client request to flush runtime journal.
[    5.287965] random: crng init done
[    5.291388] random: 7 urandom warning(s) missed due to ratelimiting
[    6.078488] ov5640_mipi 0-003c: 0-003c supply DOVDD not found, using dummy regulator
[    6.103845] ov5640_mipi 0-003c: 0-003c supply DVDD not found, using dummy regulator
[    6.119824] ov5640_mipi 0-003c: 0-003c supply AVDD not found, using dummy regulator
[    6.225051] ov5640_mipi 0-003c: Read reg error: reg=300a
[    6.235796] ov5640_mipi 0-003c: Camera is not found
[    6.298695] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.571892] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.594334] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Sep 21 2018 04:08:34 version 7.45.173 (r707987 CY) FWID 01-d2799ea2
[    8.904268] imx-sdma 30bd0000.sdma: loaded firmware 4.5
[    9.124356] Atheros 8035 ethernet 30be0000.ethernet-1:04: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=30be0000.ethernet-1:04, irq=POLL)
[    9.750184] audit: type=1006 audit(1640675061.335:2): pid=516 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1



 

Mcp2515 connect to MaaxBoard this:

Mcp2515 OutputMaaxBoard Pin Number
INT13
SCK(SCLK)23
SI(MOSI)19
SO(MISO)21
CS(CE0)24
GND6
Vcc(3.3V)1

 

ip link set can0 up type can bitrate 125000 command output is: Cannot find device "can0"

It would be great if you could help me figure out where to look.

Thanks.

0 Kudos
1 Reply

1,127 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Could you try to connect an oscilloscope and check the signals?
From dmesg I see the following:

[    2.390860] mcp251x spi0.0: CANCTRL 0x0a
[    2.390868] mcp251x spi0.0: Cannot initialize MCP2515. Wrong wiring?
[    2.397258] [drm] Cannot find any crtc or sizes
[    2.401841] mcp251x spi0.0: Probe failed, err=19
[    2.406498] [drm] Cannot find any crtc or sizes
[    2.446351] mcp251x spi0.1: CANCTRL 0x00
[    2.446358] mcp251x spi0.1: Cannot initialize MCP2515. Wrong wiring?
[    2.452741] mcp251x spi0.1: Probe failed, err=19

Please check that your connections are correct just to be safe. Also, It could be that there are some issues with the driver in that Linux release, contacting microchip regarding this may be a good idea.

Best regards,
Aldo.

0 Kudos