• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

CANBus ?

MSDevel

New member
Hi all,

Does anyone know how to get CANBus working with the CFA920/921 and the iMX287?
Ive had a look through the dev trees source file in the kernel, and it doesn't seem to be present?

Thanks!
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Support

Administrator
Hi all,

Does anyone know how to get CANBus working with the CFA920/921 and the iMX287?
Ive had a look through the dev trees source file in the kernel, and it doesn't seem to be present?

Thanks!
It should be as simple as enabling it in the kernel configuration, then adding it to the device tree.

kernel cfa-3.12.18 defconfig with CAN: http://pastebin.com/ALKzCqKb
imx28-cfa10058.dts (CFA-921-TS) with CAN: http://pastebin.com/npMQcL9Y
imx28-cfa10057.dts (CFA-920-TS) with CAN: http://pastebin.com/NxWAjyvF

Here are the same device tree files compiled:
View attachment imx28-cfa10058.dtb and View attachment imx28-cfa10057.dtb

If you need the compiled kernel, send an email to support@crystalfontz.com and we'll get it to you.
 

CF Support

Administrator
CAN0: Tx is port 0, pin 22, Rx is port 0, pin 23
CAN1: Tx is port 0, pin 18, Rx is port 0, pin 19

From imx28.dtsi (arch/arm/boot/dts/imx28.dtsi) and referring to fsl,mxs-pinctrl.txt (Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt)

can0_pins_a: can0@0 {
reg = <0>;
fsl,pinmux-ids = <
0x0161 /* MX28_PAD_GPMI_RDY2__CAN0_TX */
0x0171 /* MX28_PAD_GPMI_RDY3__CAN0_RX */
>;
fsl,drive-strength = <0>;
fsl,voltage = <1>;
fsl,pull-up = <0>;
};

can1_pins_a: can1@0 {
reg = <0>;
fsl,pinmux-ids = <
0x0121 /* MX28_PAD_GPMI_CE2N__CAN1_TX */
0x0131 /* MX28_PAD_GPMI_CE3N__CAN1_RX */
>;
fsl,drive-strength = <0>;
fsl,voltage = <1>;
fsl,pull-up = <0>;
};
 

MSDevel

New member
Thanks :)

Is there a table somewhere that lists the iMX28 pins/ports and corresponding pins/pads on the CFA920/921?
I dont want to ask everytime i need to know where a pin is.
 

CF Support

Administrator
My bad, counting is hard.

The defines above are using the alternate contacts. You'll find them on pins 34 and 35 respectively for CAN0, and CAN1 on pins 38 and 39. I gave the port 0 pin rather than the pin number on J_DBG1.
 

MSDevel

New member
So JDBG1 pads 34 and 35 for can0?

I don't understand how that can be correct...
Dont the pin numbers in the table (ie L08) correspond to the pins in the imx28 datasheet?
 
Top