We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:xu3_hardware_spi [2015/08/22 12:31]
charles.park
en:xu3_hardware_spi [2016/12/24 12:15] (current)
odroid [Reading the SPI Flash device ID on Expansion-Board]
Line 3: Line 3:
 ===== Reading the SPI Flash device ID on Expansion-Board ===== ===== Reading the SPI Flash device ID on Expansion-Board =====
 To use spidev on your **ODROID-XU3** you should fix device tree source. To use spidev on your **ODROID-XU3** you should fix device tree source.
-=== How to fix device tree blob with command line === 
-Install device tree compiler package. 
-  sudo apt-get install device-tree-compiler 
  
-Edit dtb file.+<WRAP center round important 100%> 
 +To use the SPI, you first need to update the kernel version to "​3.10.82"​ or higher. 
 +  sudo apt-get update && sudo apt-get dist-upgrade 
 +</​WRAP>​ 
 + 
 +<WRAP center round important 100%> 
 +SPI MODE 3 doesn'​t work by unknown reason. Please try to use the SPI MODE 0. 
 +</​WRAP>​ 
 + 
 +=== How to enable driver (Only Ubuntu 16.04 or higher is required) === 
 +Edit /​etc/​modprobe.d/​blacklist-odroid.conf to comment out following two ines.
 <​code>​ <​code>​
-sudo -s +blacklist ​spidev 
-fdtput -c /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev +blacklist spi_s3c64xx
-fdtput -t s /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev compatible "​spidev"​ +
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev reg 0 +
-fdtput -t i /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev spi-max-frequency 20000000 +
-fdtput -c /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev/​controller-data +
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev/​controller-data cs-gpio 0x44, 0x5, 0x0 +
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev/​controller-data samsung,​spi-feedback-delay 0+
 </​code>​ </​code>​
  
Line 34: Line 35:
 34 34 34 34 34 34 34 34
 </​code>​ </​code>​
 +
 +If you tie the MOSI and MISO pins, the output is "AB 00 00 00".\\
 +We call it loopback test.
 +
 <file c spidev_test.c>​ <file c spidev_test.c>​
 /*                                                                              ​ /*                                                                              ​
Line 158: Line 163:
 } }
 </​file>​ </​file>​
 +
 +
 +**If you want to use 16bit/32bit length protocol with different SPI speed on XU4, refer this [[en:​c1_hardware_spidev|c1_hardware_spidev]].**
 +
en/xu3_hardware_spi.1440216112.txt.gz · Last modified: 2016/01/25 10:19 (external edit)
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0