Enable both SPIDEV and CAN on dts

Hi, im at this file: imx6dl-colibri-eval-v3.dts « dts « boot « arm « arch - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

I want to enable both SPIDEV and the CAN, however, I’m getting confused by this comment:

	/* To keep the CAN controller enabled by default,
	 * disable conflicting spidev. This spidev device
	 * enables with the devicetree overlay.
	 */
	spidev0: spidev@0 {
		status = "disabled";
	};

Cant I enable both? My plan was to change status to “okay” and then to add CAN

	status = "okay";
};```

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!


Hello,

I see you’re looking to enable both SPIDEV and CAN on your device tree for a Toradex module. The comment you’ve encountered suggests that by default, enabling the CAN controller requires disabling SPIDEV due to potential pin conflicts. However, you’re interested in having both functionalities enabled simultaneously.

To achieve this, you indeed need to change the status of the SPIDEV from "disabled" to "okay" as you’ve planned. For the CAN interface, as you’ve noted, setting the status to "okay" for the respective CAN nodes (&can1 and/or &can2) is the correct approach.

However, it’s crucial to ensure there are no pin conflicts between the SPIDEV and CAN functionalities. This typically involves verifying that the pins used for SPIDEV and CAN are not overlapping and are correctly configured in the pinmux settings of your device tree. If there are shared pins, you’ll need to make a decision based on your hardware’s requirements and possibly redesign your hardware layout or choose between the functionalities.

After making these changes, ensure to compile the device tree again and deploy it to your device. Testing both functionalities to confirm they work as expected without interfering with each other is also recommended.

Remember, enabling both might require careful consideration of the hardware capabilities and pin configurations specific to your Toradex module and carrier board.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

CAN (Linux) | Toradex Developer Center.


How did you like my response?

:+1: :-1:

Hello @robs,

I have reached out to you via private message some time ago.
Can you please get back to us so we can better support you?

Best Regards,
Bruno