Odroid XU4 with PICAN CAN-Bus Board

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

Odroid XU4 with PICAN CAN-Bus Board

Postby grubenlord » Thu Feb 11, 2016 2:56 pm

Hey :D ,

I try to expand the ODROID XU4 with a PICAN CAN-Bus Board. XU4 Shifter Shield is used for the hardware connection of the two components. The chip of the CAN-Bus Board (MCP2515) converts the CAN-signal to SPI, which can theoretically be processed by ODROID.
Now I want change the recognized spi device, that directly can device appears. On http://skpang.co.uk/blog/archives/1165 this has been done for the Raspberry Pi with Rasberian. There overlays are added to the /boot/config.txt:
$this->bbcode_second_pass_code('', 'dtparam=spi=on
dtoverlay=mcp2515-can0-overlay,oscillator=16000000,interrupt=25
dtoverlay=spi-bcm2835-overlay')
I'm not quite sure, but in my case "bcm2835" should be replaced by "exynos5422". However, my main question is where to write these overlays, because no config.txt file is on my Arch Arm Linux (kernel: 3.10.96) with ODROID. :?:
I think that I have to add these overlays to the file /boot/dtbs/exynos5422-odroidxu3.dtb. For this case, I was able to generate the .dts file from the .dtb file.
How and Where I would have to modify the code to add it to the .mts file?
Or rather, is there a way to create a config file, similar to the config.txt file?

Many thanks for your help
grubenlord
 
Posts: 3
Joined: Thu Feb 11, 2016 10:35 am

Re: Odroid XU4 with PICAN CAN-Bus Board

Postby mdrjr » Thu Feb 11, 2016 5:01 pm

Apply those patchs to the kernel source and let me know if it works.

http://mdrjr.net/mcp2515_patchs.tar

Kernel 3.10 used on XU3/XU4 the MCP2515 driver doesn't support device tree.
I've backported the required changes to the mcp2515 driver and enabled the spi device on device tree.

For further information: http://odroid.com/dokuwiki/doku.php?id=en:odroid-xu4
mdrjr
 
Posts: 15
Joined: Fri Dec 14, 2012 6:09 pm

Re: Odroid XU4 with PICAN CAN-Bus Board

Postby grubenlord » Mon Feb 15, 2016 9:47 am

Thanks for the reply. I need some time to build the kernel. If I have something to report, I will write again.
grubenlord
 
Posts: 3
Joined: Thu Feb 11, 2016 10:35 am

Re: Odroid XU4 with PICAN CAN-Bus Board

Postby grubenlord » Fri Feb 19, 2016 3:50 pm

Hey mdrjr,

I've managed to compile the kernel with your patches and update my arch. According to http://skpang.co.uk/blog/archives/1165 you can activate the CAN with the following command:
$this->bbcode_second_pass_code('', '
sudo /sbin/ip link set can0 up type can bitrate 500000
')
I tried different CAN names (can0_osc, can0, can1), but it's always the wrong device. But somehow I have the feeling that I'm on the wrong way.
Are there other steps that I have to follow to activate the CAN?

In addition, I have discovered that there are any errors for the relevant SPI device on bootup:
$this->bbcode_second_pass_code('', '
9.668189] [c1] spi spi1.0: child node 'controller-data' not found
9.668198] [c1] spi spi1.0: No CS for SPI(0)
9.668208] [c1] s3c64xx-spi 12d30000.spi: can't setup spi1.0, status -19
9.668218] [c1] spi_master spi1: spi_device register error /spi@12d30000/mcp2515@0
9.668995] [c1] PM DOMAIN: pd-isp, Device : 131a0000.spi Registered
9.669051] [c1] s3c64xx-spi 131a0000.spi: spi bus clock parent not specified, using clock at index 0 as parent
9.669060] [c1] s3c64xx-spi 131a0000.spi: number of chip select lines not specified, assuming 1 chip select line
9.669451] [c1] PM DOMAIN: pd-isp, Device : 131b0000.spi Registered
9.669493] [c1] s3c64xx-spi 131b0000.spi: spi bus clock parent not specified, using clock at index 0 as parent
9.669503] [c1] s3c64xx-spi 131b0000.spi: number of chip select lines not specified, assuming 1 chip select line
')
What can I do? And I apologize for any silly questions, I have not been working so long with linux.
grubenlord
 
Posts: 3
Joined: Thu Feb 11, 2016 10:35 am


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 9 guests