C1+ SPI and edit dts file

Moderators: mdrjr, odroid

C1+ SPI and edit dts file

Unread postby Zaren » Fri Jan 12, 2018 4:41 am

Hello!

I need help for editing meson8b_odroidc.dts file. I dont know in which way I can add some information for kernel to recognize some SPI device. I need to add MCP251x device and I expect to get can0 . For that I applied patch for kernel and recompile it.

I compiled the kernel for c1+ according by https://wiki.odroid.com/odroid-c1/os_images/ubuntu/v2.2
There are my stages:
0. Buckup my eMmc flash drive to file on my desktop by dd command.
1. Clone by git the kernel for c1
2. Apply patch files for spi ( apart from 0008-ARM-dts-enable-mcp2515-for-XU3-XU4.patch this file)
3. Compile following the instruction.

I hope patches are work. Because I did same things for XU4. And can0 on XU4 appeared only after I changed dts file. But I have no idea how to change dts file for C1+ =(

I tried to change dts file in different ways but in vain... like this

Code: Select all
dtc -O dtb -o ./meson8b_odroidc.dtb ./meson8b_odroidc.dts
Error: ./meson8b_odroidc.dts:38.17-18 syntax error
FATAL ERROR: Unable to parse input tree


Thanks
Zaren
 
Posts: 23
Joined: Wed Nov 08, 2017 7:12 am
languages_spoken: english
ODROIDs: ODROID C1+, XU4

Re: C1+ SPI and edit dts file

Unread postby odroid » Fri Jan 12, 2018 10:10 am

We bought a couple of mcp2515 boards.
We will test it with C1+ and XU4 early next week and get back to you.
User avatar
odroid
Site Admin
 
Posts: 26392
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: C1+ SPI and edit dts file

Unread postby Zaren » Sat Jan 13, 2018 3:28 am

Good news!

Thank you for helping me! Right now I want to connect some SPI board to Odroid and I need some drivers to do that.
But I think there is another approach. I just connect SPI boards to some micrcontroller ( for instance atmega328 ) and after that connect it to Odroid through UART. ATMega would be as some filter to pass data what I need to Odroid. But as far as I know ATmega does not need some drivers to plug some SPI boards. Just raw C code to read and write information to/from boards. Is there is some approach on Odroid to read/write data through SPI bus without drivers like on ATmega?
Zaren
 
Posts: 23
Joined: Wed Nov 08, 2017 7:12 am
languages_spoken: english
ODROIDs: ODROID C1+, XU4

Re: C1+ SPI and edit dts file

Unread postby odroid » Sat Jan 13, 2018 2:22 pm

User avatar
odroid
Site Admin
 
Posts: 26392
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 4 guests