Cannot enable device tree overlay for CAN bus on Debian 8.8

590 views
Skip to first unread message

Piotr C

unread,
Jun 15, 2017, 5:30:16 PM6/15/17
to BeagleBoard

Hello, I am using the newest Debian 8.8 from weekly builds, found here: https://rcn-ee.net/rootfs/bb.org/testing/2017-06-11/
I needed it because of the quite new nodejs version.

I am trying to enable DCAN1 Device Tree overlay - I am following the steps present in these sources:

My steps:
1. I went to /lib/firmware
2. I have typed 
sudo sh -c "echo 'BB-UART1' > /sys/devices/platform/bone_capemgr/slots"

the shell has frozen, I couldn't interrupt with neither of these: Ctrl+D, Ctrl+Z, Ctrl+X, Ctrl+CI 
3. I have added: 
a) cape_enable=bone_capemgr.enable_partno=BB-CAN1 to /boot/uEnv.txt

b) # Options to pass to capemgr
CAPE=BB-CAN1 
in /etc/default/capemgr

However, after the reboot, after typing, I still see that no CAN overlay was loaded:

root@beaglebone:/var/log# cat /sys/devices/platform/bone_capemgr/slots
 0: ---l--  -1
 1: ------  -1
 2: ---l--  -1
 3: ---l--  -1
 4: --Ol--  -1
 5: --O---  -1
 6: --O---  -1

and

cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins

pin 96 (44e10980.0): ocp:P9_26_pinmux (GPIO UNCLAIMED) function pinmux_P9_26_default_pin group pinmux_P9_26_default_pin
pin 97 (44e10984.0): ocp:P9_24_pinmux (GPIO UNCLAIMED) function pinmux_P9_24_default_pin group pinmux_P9_24_default_pin


I am pretty much sure that on Debian 8.6 everything was working fine after these commands, because I don't remember having any problems with DTO.


What am I doing wrong with Debian 8.8? 
Have I missed any steps?

Robert Nelson

unread,
Jun 15, 2017, 5:35:24 PM6/15/17
to Beagle Board, cerb...@gmail.com
New weekly images use U-Boot Overlays by default:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays

tod what you want, in /boot/uEnv.txt set:

uboot_overlay_addr4=/lib/firmware/BB-CAN1-00A0.dtbo
uboot_overlay_addr5=/lib/firmware/BB-UART1-00A0.dtbo

Regards,

--
Robert Nelson
https://rcn-ee.com/

Piotr C

unread,
Jun 15, 2017, 5:47:22 PM6/15/17
to BeagleBoard, cerb...@gmail.com
Thank you for your answer Robert.
May I ask why did you add the line for UART as well?

Best regards,
Peter

Robert Nelson

unread,
Jun 15, 2017, 5:50:11 PM6/15/17
to Beagle Board, cerb...@gmail.com
On Thu, Jun 15, 2017 at 4:47 PM, Piotr C <cerb...@gmail.com> wrote:
> Thank you for your answer Robert.
> May I ask why did you add the line for UART as well?

Well you referenced it in your original email..

and i only spent a couple of seconds actually reading it, so your can
drop the UART node..

Piotr C

unread,
Jun 15, 2017, 6:14:53 PM6/15/17
to BeagleBoard, cerb...@gmail.com
Yes, it popped accidentally due to copying command from one of the tutorials that I have linked.

I have added:
uboot_overlay_addr4=/lib/firmware/BB-CAN1-00A0.dtbo 
as you suggested.

It changed the output of cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins


pin 96 (44e10980.0): 481d0000.can (GPIO UNCLAIMED) function pinmux_dcan1_pins group pinmux_dcan1_pins
pin 97 (44e10984.0): 481d0000.can (GPIO UNCLAIMED) function pinmux_dcan1_pins group pinmux_dcan1_pins

However, after typing:
root@beaglebone:/home/debian# cat /sys/devices/platform/bone_capemgr/slots
 0: ---l--  -1
 1: ------  -1
 2: ---l--  -1
 3: ---l--  -1
 4: --Ol--  -1
 5: --O---  -1

In line 5: I was expecting some text like: "Override Board Name,00A0,Override (...)
// taken from here:

Should I expect a change in slots configuration after adding the lines that you have mentioned in /boot/uEnv.txt?
Is there any other to check whether the CAN Device Tree overlay was properly loaded?

Best regards,
Peter

Robert Nelson

unread,
Jun 15, 2017, 6:17:27 PM6/15/17
to Beagle Board, cerb...@gmail.com
With u-boot overlays, the "/sys/devices/platform/bone_capemgr/slots"
is not updated..

you should see the can interface showing up under:

sudo ifconfig -a

Piotr C

unread,
Jun 16, 2017, 3:36:33 PM6/16/17
to BeagleBoard, cerb...@gmail.com
Thank you for your help Robert.
Everything is working correctly now with socketcan tools.

Best regards,
Peter
Reply all
Reply to author
Forward
0 new messages