|
楼主 |
发表于 2015-7-27 17:54:02
|
显示全部楼层
jiangdou 发表于 2015-7-27 16:46
https://github.com/jiangdoudou/linux-sdk-a20/tree/shanghai-a20-spi/spi-driver-test
打印信息如下:多谢大神指导
root@cubietruck:/# ./spi -D /dev/spidev0.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00
root@cubietruck:/# dmesg |grep spi
[spi-inf] Found 1 spi devices in config files
[spi-inf] boards num modalias max_spd_hz bus_num cs mode
[spi-inf] spi_board0 irq gpio not used
[spi-inf] 0 spidev 12000000 0 0 0x0
[spi-inf] sun7i_spi_probe: spi0 dma type: normal
[spi-inf] bus num = 0, spi used = 1
[spi-inf] sun7i_spi_probe: spi0 cs bitmap: 0x1
[spi-inf] sun7i_spi_set_mclk: spi0 source = sdram_pll_p, src_clk = 432000000, mclk 86400000
sun7i-spi sun7i-spi.0: registered master spi0
sun7i-spi sun7i-spi.0: master is unqueued, this is deprecated
spi spi0.0: setup mode 0, 8 bits/w, 12000000 Hz max --> 0
sun7i-spi sun7i-spi.0: registered child spi0.0
[spi-inf] sun7i_spi_probe: reuuimlla's SoC SPI Driver loaded for Bus SPI0 with 2 Slaves at most
[spi-inf] sun7i_spi_probe: spi0 driver probe succeed, base f02a8000, irq 42, dma_id_rx 24, dma_id_tx 24
spidev spi0.0: setup mode 0, 8 bits/w, 12000000 Hz max --> 0
spidev spi0.0: spi mode 00
spidev spi0.0: setup mode 0, 8 bits/w, 12000000 Hz max --> 0
spidev spi0.0: 8 bits per word
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 500000 Hz (max)
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: spi mode 00
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 8 bits per word
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 500000 Hz (max)
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: spi mode 00
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 8 bits per word
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 500000 Hz (max)
|
|