BBB rev C 3.8.13-38-ARCH SPI doesn't work

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

BBB rev C 3.8.13-38-ARCH SPI doesn't work

Postby fpspiter » Thu Jan 29, 2015 6:02 pm

Hello guys.

I have troubles with enabling SPI on BBB, ofc followed http://hipstercircuits.com/enable-spi-w ... opy-paste/
I even installed a fresh arch to the uSD in case I really messed up system on eMMC.

My settings are:

Since SPI1 has issues with HDMI I disabled anything HDMI related I found.
Not sure about fdfile entry though, found it somewhere on the web. (I also tried without it)
Currently I'm working on the SD card if that matters.

uEnv.txt
$this->bbcode_second_pass_code('', 'optargs=quiet coherent_pool=1M fdtfile=am335x-boneblack.dtb capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN')

I took dts file straight from the hipstercircuits.com and compiled it with alarm/dtc-overlay 1.4.1-1 installed via pacman.

After disabling HDMI in uEnv.txt $this->bbcode_second_pass_code('', 'echo BB-SPI1-01 > /sys/devices/bone_capemgr.*/slots') went ok and I saw:
$this->bbcode_second_pass_code('', '[root@alarm ~]# cat /sys/devices/bone_capemgr.9/slots
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPI1-01')

What is more interesting I didn't see anything about P9_29, P9_31 etc, which are part of SPI1, in pingroups:
$this->bbcode_second_pass_code('', '[root@alarm ~]# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups
registered pin groups:
group: pinmux_userled_pins
pin 21 (44e10854)
pin 22 (44e10858)
pin 23 (44e1085c)
pin 24 (44e10860)

group: pinmux_rstctl_pins
pin 20 (44e10850)

group: pinmux_i2c0_pins
pin 98 (44e10988)
pin 99 (44e1098c)

group: pinmux_i2c2_pins
pin 94 (44e10978)
pin 95 (44e1097c)

group: pinmux_mmc1_pins
pin 88 (44e10960)

group: pinmux_emmc2_pins
pin 32 (44e10880)
pin 33 (44e10884)
pin 0 (44e10800)
pin 1 (44e10804)
pin 2 (44e10808)
pin 3 (44e1080c)
pin 4 (44e10810)
pin 5 (44e10814)
pin 6 (44e10818)
pin 7 (44e1081c)

group: pinmux_userled_pins
pin 21 (44e10854)
pin 22 (44e10858)
pin 23 (44e1085c)
pin 24 (44e10860)')

The spidevs are present in /dev
$this->bbcode_second_pass_code('', '[root@alarm ~]# ls -l /dev | grep spi
crw------- 1 root root 153, 1 Jan 29 17:13 spidev1.0
crw------- 1 root root 153, 0 Jan 29 17:13 spidev1.1')

To test the interface both python method mentioned in the tutorial and spidev_test.c (https://www.kernel.org/doc/Documentatio ... dev_test.c) compiled on the BBB were used.
$this->bbcode_second_pass_code('', 'gcc spidev_test.c -o spidev_test')
In case of python library there is no error but also nothing at the output - not even a clock signal on the SCL line.

spidev_test returns:
$this->bbcode_second_pass_code('', '[root@alarm spi_a]# ./spidev_test
can't set spi mode: Inappropriate ioctl for device
Aborted (core dumped)
[root@alarm spi_a]# ./spidev_test -D /dev/spidev1.0
can't set spi mode: Inappropriate ioctl for device
Aborted (core dumped)
[root@alarm spi_a]# ./spidev_test -D /dev/spidev1.1
can't set spi mode: Inappropriate ioctl for device
Aborted (core dumped)')

Do I have to make use of *.dts and *.dtb files provided at the beginning of the hipstercircuit's tutorial?

I probably screwed up sth easy. Any ideas what was it?
Did you get it working just like that?
All advices are welcome and will be very appreciated! ;)
fpspiter
 
Posts: 1
Joined: Thu Jan 29, 2015 3:18 pm

Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 6 guests