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 [2016/08/29 18:18]
odroid [Reading the SPI Flash device ID on Expansion-Board]
en:xu3_hardware_spi [2016/12/24 12:15] (current)
odroid [Reading the SPI Flash device ID on Expansion-Board]
Line 13: Line 13:
 </​WRAP>​ </​WRAP>​
  
-=== How to fix device tree blob with command line === +=== How to enable driver (Only Ubuntu 16.04 or higher is required) ​=== 
-Install device tree compiler package. +Edit /​etc/​modprobe.d/blacklist-odroid.conf to comment out following two ines.
-  sudo apt-get install device-tree-compiler +
- +
-Edit dtb file.+
 <​code>​ <​code>​
-sudo -s +blacklist ​spidev 
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000 samsung,​spi-src-clk 0 +blacklist spi_s3c64xx
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000 num-cs 0 +
-fdtput -c /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev +
-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 0x46, 0x5, 0x0 +
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev/​controller-data samsung,​spi-feedback-delay 0+
 </​code>​ </​code>​
  
Line 46: 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>​
 /*                                                                              ​ /*                                                                              ​
en/xu3_hardware_spi.1472464105.txt.gz · Last modified: 2016/08/29 18:18 by odroid
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0