Cannot enable device tree overlay for CAN bus on Debian 8.8

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:

https://www.reddit.com/r/BeagleBone/comments/5n0u54/is_it_still_needed_to_alter_device_tree_overlay/

http://www.thomas-wedemeyer.de/beaglebone-canbus-python.html

https://github.com/beagleboard/bb.org-overlays

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?

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,

Thank you for your answer Robert.
May I ask why did you add the line for UART as well?

Best regards,
Peter

W dniu czwartek, 15 czerwca 2017 23:35:24 UTC+2 użytkownik RobertCNelson napisał:

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..

Regards,

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

W dniu czwartek, 15 czerwca 2017 23:50:11 UTC+2 użytkownik RobertCNelson napisał:

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

Regards,

Thank you for your help Robert.
Everything is working correctly now with socketcan tools.

Best regards,
Peter

W dniu piątek, 16 czerwca 2017 00:17:27 UTC+2 użytkownik RobertCNelson napisał: