Hi,

How can I use the CAN0 device with a Buildroot image?

I have a Beaglebone black rev C and have build an image using Buildroot. I 
used the standard beaglebone_defconfig and installed can-utils as well as 
iproute2.

My understanding is that the i2c2 pins should be reconfigured to be able to 
use the CAN0 device. In order to keep things simple (and avoid overlays) I 
edit the "am335x-bone-common.dtsi" file in two ways.

1) Comment out the i2c2 and insert the CAN0 pin setup:

//    i2c2_pins: pinmux_i2c2_pins {
//        pinctrl-single,pins = <
//            0x178 (PIN_INPUT_PULLUP | MUX_MODE3)    /* 
uart1_ctsn.i2c2_sda */
//            0x17c (PIN_INPUT_PULLUP | MUX_MODE3)    /* 
uart1_rtsn.i2c2_scl */
//        >;
//    };

dcan0_pins: pinmux_dcan0_pins {
        pinctrl-single,pins = <
            0x178 (PIN_OUTPUT_PULLUP | MUX_MODE2)  /* P9.20 (0x178), 
ddcan0_tx */
            0x17c (PIN_INPUT_PULLUP | MUX_MODE2)   /* P9.19 (0x17c), 
ddcan0_rx */
        >;
    };

2) Replace i2c2 with
&dcan0 {
    #address-cells = <1>;
    #size-cells = <1>;
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&dcan0_pins>;
   
};

Once I log in I can not get any CAN device going anywhere:
# ifup can0
Cannot find device "can0"
# ifconfig can0 up
ifconfig: SIOCGIFFLAGS: No such device

And looking at the available networks

# ls -al /sys/class/net/
total 0
drwxr-xr-x    2 root     root             0 Jan  1 00:00 .
drwxr-xr-x   43 root     root             0 Jan  1 00:00 ..
lrwxrwxrwx    1 root     root             0 Jan  1 00:00 eth0 -> 
../../devices/platform/ocp/4a100000.ethernet/net/eth0
lrwxrwxrwx    1 root     root             0 Jan  1 00:00 lo -> 
../../devices/virtual/net/lo
lrwxrwxrwx    1 root     root             0 Jan  1 00:02 sit0 -> 
../../devices/virtual/net/sit0

I have exhausted all resources and am truly stuck. Any information which 
may help will be greatly appreciated.

Thank you

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/01f7e77d-c061-4ade-954d-94d29dcabf80n%40googlegroups.com.

Reply via email to