Hi, For if ever anyone runs into this problem, setting the following in the linux-menuconfig file fixes the problem (to load the can device):
CONFIG_CAN_C_CAN=y CONFIG_CAN_C_CAN_PLATFORM=y Cheers On Fri, May 14, 2021 at 10:39 AM Andy Bergh <[email protected]> wrote: > Thank you for the reply and info John. > > The solution provided (in the link as well) is using the debian > distribution for the beaglebone, which has a ton of packages to assist with > the configuration of the BBB. My buildroot image does not even have a > package manager! It is less than 80MB in total size. I do not have access > to modules and features such as *cape_mgr*, *pin-config* ect. > > My understanding is that I have to edit the default device tree source > file to enable the CAN device, which is the part I am not able to do. > > Regards > > On Fri, May 14, 2021 at 10:20 AM John Dammeyer <[email protected]> > wrote: > >> I've only used CAN1 since the I2C for Cape ID isn't something I wanted to >> lose. >> >> >> >> The Beagle that was running with the CAN cape had its SD card die so I >> lost the configuration information. But this site here does a pretty >> good job of explaining what is needed. >> >> https://www.beyondlogic.org/adding-can-to-the-beaglebone-black/ >> >> >> >> I did not see the same information as the web page when I looked at dmesg >> . >> >> debian@beaglebone:/dev$ dmesg | grep -i can >> >> [ 0.851243] CAN device driver interface >> >> [ 0.975646] can: controller area network core (rev 20170425 abi 9) >> >> [ 0.982999] PM: Cannot get wkup_m3_ipc handle >> >> debian@beaglebone:/dev$ >> >> >> >> I've got a cape from Logic Supply on this beagle but it's not found at >> the moment on this new 4.14 installation. Following the web page⦠>> >> >> >> debian@beaglebone:/dev$ config-pin p9.24 can >> >> P9_24 pinmux file not found! >> >> Pin has no cape: P9_24 >> >> >> >> Ever since $SLOTs concept was trashed on the Beagles the Logic Supply >> user manual for the CBB Cape is useless for installing the device but I've >> included the dts in case that will help. >> >> >> >> At the moment I have no idea how to even ask the Beagle if it has seen >> the cape installed. I can see it's connected physically. I put the >> beagles into their kennel last summer and before that they spent more than >> a year in isolation. Now they are out again and I'm working through >> Derek Molloy's book so at some point I'm sure the cape will be seen. >> >> >> >> My other Beagle may well have worked with the CAN cape at one point but >> it doesn't have the cape installed. >> >> >> >> debian@ebb:~$ dmesg | grep -i can >> >> [ 1.015868] CAN device driver interface >> >> [ 1.017132] c_can_platform 481cc000.can: c_can_platform device >> registered (regs=fa1cc000, irq=42) >> >> [ 1.018405] c_can_platform 481d0000.can: c_can_platform device >> registered (regs=fa1d0000, irq=43) >> >> [ 1.160062] can: controller area network core (rev 20170425 abi 9) >> >> [ 1.167640] PM: Cannot get wkup_m3_ipc handle >> >> debian@ebb:~$ config-pin p9.24 can >> >> debian@ebb:~$ config-pin p9.26 can >> >> debian@ebb:~$ sudo /sbin/ip link set can1 up type can bitrate 250000 >> >> [sudo] password for debian: >> >> debian@ebb:~$ >> >> >> >> This one doesn't complain. Again, I've completely forgotten what I've >> done. >> >> >> >> John >> >> >> >> >> >> >> >> *From:* [email protected] [mailto:[email protected]] >> *On Behalf Of *Andy Bergh >> *Sent:* May-14-21 12:35 AM >> *To:* BeagleBoard >> *Subject:* [beagleboard] Configure CAN0 with buildroot >> >> >> >> >> >> 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 >> <https://groups.google.com/d/msgid/beagleboard/01f7e77d-c061-4ade-954d-94d29dcabf80n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "BeagleBoard" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/beagleboard/N3XgXZ9NHv4/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beagleboard/0bec01d74899%24dff0dee0%249fd29ca0%24%40autoartisans.com >> <https://groups.google.com/d/msgid/beagleboard/0bec01d74899%24dff0dee0%249fd29ca0%24%40autoartisans.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/CAAmck7W2fqq4Ri-jAR%2B8sRjFdoTxqrh7NJjfe6QosX0GNDXaBQ%40mail.gmail.com.
