Issue setting up CAN1 in 4.14.71-ti-r80, trying to use dtb_rebuilder

58 views
Skip to first unread message

David Miller Lowe

unread,
Dec 26, 2018, 9:46:16 PM12/26/18
to BeagleBoard
Hi; 

Using the old kernel cape-manager I was able to dcan1 working with a few tries.

Since updating to  bone-debian-9.5-iot-armhf-2018-10-07-4gb.img I have not been successful using the new u-boot device tree system.

I have tried to follow several other threads without success.  

My old code relied on the test that the dcan1 rx and tx lines are both set to Mode-2 in the pin-mux 

No matter how I mix-up using the old and new device tree code I cannot get a 0x2 in the last position of 

debian@beaglebone:~$ sudo devmem2 0x44E10980 w
/dev/mem opened.
Memory mapped at address 0xb6f8c000.
Value at address 0x1155598720 (0xb6f8c980): 0x18  <-- should have 2 in lower three bits
debian@beaglebone
:~$ sudo devmem2 0x44E10984 w
/dev/mem opened.
Memory mapped at address 0xb6fa5000.
Value at address 0x1155598724 (0xb6fa5984): 0x50  <-- should have 2 in lower three bits


In trying to stick to the dtb_rebuilder method I currently have included 

#include "am335x-bone-pinmux-can1.dtsi"



in the top of src/arm/am335x-boneblack.dts and rebuild/install

When I boot with this modified device tree I can see lines in pinmux-pins

debian@beaglebone:~/dtb-rebuilder/src/arm$ cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins | grep dcan
pin
96 (PIN96): 481d0000.can (GPIO UNCLAIMED) function pinmux_dcan1_pins group pinmux_dcan1_pins
pin
97 (PIN97): 481d0000.can (GPIO UNCLAIMED) function pinmux_dcan1_pins group pinmux_dcan1_pins


and am able to setup linux can0 

debian@beaglebone:~$ sudo modprobe can
debian@beaglebone
:~$ sudo modprobe can-dev
debian@beaglebone
:~$ sudo modprobe can-raw
debian@beaglebone
:~$ sudo ip link set can0 type can bitrate 250000

debian@beaglebone
:~$ sudo ip link set can0 up

debian@beaglebone
:~$ ifconfig can0

can0
: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets
0  bytes 0 (0.0 B)
        RX errors
0  dropped 0  overruns 0  frame 0
        TX packets
0  bytes 0 (0.0 B)
        TX errors
0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt
36  


But I am still unable to send or receive any messages using candump or cansend.

My big concern is that the pin-muxing is not being set correctly when I check the control register in the am533 chip.  

Am I wrong that the dump of the pin-muxing register should end in 2?

Thanks in advance, I appreciate any help.

Miller





Reply all
Reply to author
Forward
0 new messages