Can't boot after activating CAN in release Linux Image (2020-04-21) colibri IMX8X

Dear Community,

today I did the update of the Linux Image for my Colibri iMX8X from the beta release to the release version. I used the Toradex Easy Installer and just installed the new Image. I rebooted my Colibri and the new Linux version worked. Then I changed the device tree, because I need to activate the CAN interface. I cloned the Kernel version toradex_4.14-2.0.x-imx. The .dtsi file is the following:

// SPDX-License-Identifier: GPL-2.0+ OR X11
/*
 * Copyright 2018-2019 Toradex
 */

/ {
	aliases {
		rtc0 = &rtc_i2c;
		rtc1 = &rtc;
	};

	/* fixed crystal dedicated to mpc25xx */
	clk16m: clk16m {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <16000000>;
	};

	display-subsystem {
		status = "okay";
	};

	extcon_usbc_det: usbc_det {
		compatible = "linux,extcon-usb-gpio";
		debounce = <25>;
		id-gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_usbc_det>;
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpiokeys>;

		wakeup {
			label = "Wake-Up";
			gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
			linux,code = <KEY_WAKEUP>;
			debounce-interval = <10>;
			wakeup-source;
		};
	};

	regulators {
		reg_3v3: regulator-3v3 {
			compatible = "regulator-fixed";
			regulator-name = "3.3V";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
		};

		reg_5v0: regulator-5v0 {
			compatible = "regulator-fixed";
			regulator-name = "5V";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
		};

		reg_usbh_vbus: regulator-usbh-vbus {
			compatible = "regulator-fixed";
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_usbh1_reg>;
			regulator-name = "usbh_vbus";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			gpio = <&gpio4 3 GPIO_ACTIVE_LOW>;
			regulator-always-on;
		};
	};
};

/* Colibri Analogue Inputs */
&adc0 {
	status = "okay";
};

&dpu1 {
	status = "okay";
};

/* Colibri Ethernet */
&fec1 {
	status = "okay";
};

&gpio3 {
	/*
	 * Add GPIO3_10 as a wakeup source:
	 * Pin:  SC_P_QSPI0A_DATA1 (SODIMM_45)
	 * Type: SC_PAD_WAKEUP_RISE_EDGE
	 * Line: GPIO3_IO10
	 */
	pad-wakeup = <157 6 10>;
	pad-wakeup-num = <1>;
 };

&gpu_3d0 {
	status = "okay";
};

&i2c1 {
	status = "okay";

	/* M41T0M6 real time clock on carrier board */
	rtc_i2c: rtc@68 {
		compatible = "st,m41t0";
		reg = <0x68>;
	};
};

&imx8_gpu_ss {
	status = "okay";
};

/* Colibri SPI */
&lpspi2 {
	status = "okay";

	mcp2515: can@0 {
		compatible = "microchip,mcp2515";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_can_int>;
		reg = <0>;
		clocks = <&clk16m>;
		interrupt-parent = <&gpio3>;
		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
		spi-max-frequency = <10000000>;
		vdd-supply = <&reg_3v3>;
		xceiver-supply = <&reg_5v0>;
		status = "okay";
	};

	spidev0: spidev@0 {
		compatible = "toradex,evalspi";
		reg = <0>;
		spi-max-frequency = <10000000>;
		status = "disabled";
	};
};

/* Colibri UART_B */
&lpuart0 {
	status = "disabled";
};

/* Colibri UART_C */
&lpuart2 {
	status = "okay";
};

/* Colibri UART_A */
&lpuart3 {
	status= "okay";
};

/* Colibri PWM_A */
&pwm_adma_lcdif {
	status = "okay";
};

/* Colibri PWM_B */
&pwm0 {
	status = "okay";
};

/* Colibri PWM_C */
&pwm1 {
	status = "okay";
};

/* Colibri PWM_D */
&pwm2 {
	status = "okay";
};

&usbotg1 {
	extcon = <&extcon_usbc_det &extcon_usbc_det>;
	vbus-supply = <&reg_usbh_vbus>;
	srp-disable;
	hnp-disable;
	adp-disable;
	power-polarity-active-high;
	disable-over-current;
	status = "okay";
};

&usbotg3 {
	dr_mode = "host";
	status = "okay";
};

/* Colibri SDCard */
&usdhc2 {
	status = "okay";
};

&vpu {
	status = "okay";
};

&vpu_decoder {
	status = "okay";
};

&vpu_encoder {
	status = "disabled";
};

/*Colibri optional CAN on UART_B RTS/CTS */
&flexcan1 {
	status = "okay";
};

/* Colibri optional CAN on PS2 */
&flexcan2 {
	status = "okay";
};

I used the UMS method to include the .dtb file to the BOOT partition of my Colibri. After I unmounted and try to boot my colibri the following happens

U-Boot 2018.03-toradex_imx_v2018.03_4.14.98_2.3.0_bringup+gd626574ba1 (Apr 17 2020 - 19:01:21 +0000)

CPU:   Freescale i.MX8QXP revB A35 at 1200 MHz at 32C
DRAM:  1022 MiB
PMIC:  device id: 0x40, revision id: 0x20, emrev 0, prog id fff
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX8 DualX 1GB V1.0B, Serial# 06494088

 BuildInfo: 
  - SCFW b929edfe, SECO-FW f449a0d2, IMX-MKIMAGE d7f9440d, ATF bb209a0
  - U-Boot 2018.03-toradex_imx_v2018.03_4.14.98_2.3.0_bringup+gd626574ba1 

flash target is MMC:0
Net:   eth0: ethernet@5b040000 [PRIME]
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
MMC: no card present
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
1243 bytes read in 7 ms (172.9 KiB/s)
## Executing script at 86000000
81526 bytes read in 13 ms (6 MiB/s)
21563904 bytes read in 432 ms (47.6 MiB/s)
## Flattened Device Tree blob at 84000000
   Booting using the fdt blob at 0x84000000
   Loading Device Tree to 00000000bd663000, end 00000000bd679e75 ... OK
/dma-controller@591F0000, 62900
/dma-controller@599F0000, 63788
/dma-controller@5a1f0000, 62024
/dma-controller@5a1f0000, 62024

Starting kernel ...

And nothing happens afterwards. Is there anything wrong about my procedure. Because I used the same .dtb file for the Beta Version of the Linux and the CAN worked just fine.

Thank you for your help.

Kind regards.

Hi @jaski.tx,

thank you very much for this information. I did as you said and it worked perfectly!

Kind regards.

Hi @cae30989

Thanks for writing to the Toradex Community!

Regarding your issue:

I cloned the Kernel version toradex_4.14-2.0.x-imx.

For Bsp 3.0.4, you should clone the branch toradex_4.14-2.3.x-imx.

Could you try this and let us know, if this solves your issue?

Best regards,
Jaski

Pefect that it works. Thanks for your feedback.

Best regards,
Jaski