Part Number: BEAGLEBN
Hi,
we use Buildroot for the Linux running on our Beaglebone Black. So far we have used the Buildroot version 2014.11 and were able to use both CAN interfaces. Now we decided to upgrade to the lates Buildroot LTS version 2019.02. This current Buildroot version uses the TI Linux Version 4.14.40 (git://git.ti.com/processor-sdk/processor-sdk-linux.git Repository version: 4796173fc58688055a99a1cef19a839174067220).
With this version we are not able to use one of the two CAN interfaces, because neither the can0 nor the can1 interface are available. These are the steps, that we have done so far to enable the CAN interfaces:
1. We added the following lines to am335x-boneblack.dts
&am33xx_pinmux {
dcan0_pins_default: dcan0_pins_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x978, PIN_OUTPUT_PULLUP | MUX_MODE2)
AM33XX_IOPAD(0x97C, PIN_INPUT_PULLUP | MUX_MODE2)
>;
};
dcan1_pins_default: dcan1_pins_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x980, PIN_OUTPUT_PULLUP | MUX_MODE2)/*uart1_rxd.d_can1_tx*/
AM33XX_IOPAD(0x984, PIN_INPUT_PULLUP | MUX_MODE2) /*uart1_txd.d_can1_rx*/
>;
};
};
&i2c2 {
status = "disabled";
};
&uart1 {
status = "disabled"; /* Pin conflict with dcan1 so we disable it if we use dcan1 */
};
&dcan0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&dcan0_pins_default>;
};
&dcan1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&dcan1_pins_default>;
};
1. We started the CAN drivers
modprobe can modprobe can-dev modprobe can-raw modprobe c_can
This is the output of the commands and of lsmod:
# modprobe can [ 49.778858] can: controller area network core (rev 20170425 abi 9) [ 49.785835] NET: Registered protocol family 29 # modprobe can-dev [ 55.454286] CAN device driver interface # modprobe can-raw [ 61.789893] can: raw protocol (rev 20170425) # modprobe c_can # # lsmod Module Size Used by Not tainted c_can 20480 0 can_raw 20480 0 can_dev 24576 1 c_can can 28672 1 can_raw #
If we now use ifconfig -a to list all interfaces neither can0 nor can1 interface is available.
If we use Buildroot 2014.11 (TI Linux 3.12 Repository version: 7f280334068b7c875ade51f8f3921ab311f0c824) then both CAN interfaces work properly. This is how we modified the old am335x-boneblack.dts:
&am33xx_pinmux {
dcan1_pins_s0: dcan1_pins_s0 {
pinctrl-single,pins = <
0x180 0x12 /* d_can1_tx, SLEWCTRL_FAST | INPUT_PULLUP | MODE2 */
0x184 0x32 /* d_can1_rx, SLEWCTRL_FAST | RECV_ENABLE | INPUT_PULLUP | MODE2 */
>;
};
dcan0_pins_s0: dcan0_pins_s0 {
pinctrl-single,pins = <
0x178 0x12 /* d_can0_tx, SLEWCTRL_FAST | INPUT_PULLUP | MODE2 */
0x17C 0x32 /* d_can0_rx, SLEWCTRL_FAST | RECV_ENABLE | INPUT_PULLUP | MODE2 */
>;
};
};
&dcan1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&dcan1_pins_s0>;
};
&dcan0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&dcan0_pins_s0>;
};
So I have no idea what we are missing or what we are doing wrong in the latest Linux version? Do you have any idea what we missed or what we are doing wrond?
Thank you and best regards,
Uwe