BeagleBone Black/Green SPI pins always low with 4.1.22 kernel

394 views
Skip to first unread message

Grzesiek Stawik

unread,
Apr 29, 2016, 12:08:10 PM4/29/16
to BeagleBoard
So i had this other issue where the power button would not trigger poweroff, and from time to time i try new kernel versions to see if it works, and i have recently switched to 4.1.22 because it does work there.

But.

Strange things happen with SPI in 4.1.22, spidev is now created as /dev/spidev2.X instead /dev/spidev1.X, or, when using "cape-universal" overlay, i get both /dev/spidev1.X and /dev/spidev2.X but none of them are working.

What i mean by " SPI not working".

I can get the kernel to create /dev/spidevX.X, i can open it, write to it, read from it etc, however, it does not trigger ANY electrical change on physical SPI bus pins, none. I have been fiddling with device tree overlay sources, without success.

I have my oscilloscope connected and MISO/MOSI lines are not even hoing high during transmision ( they are suppose to go high as soon as /dev/spidevX.X is created ).

So i am swapping uname_r value in uEnv.txt to switch between kernels and compare the results, and so far in 4.1.1 spi is working fine, and in 4.1.22 spi is a black hole, pretending to work, and has absolutely no effect on physical spi pins on the cpu.

I HAVE TRIED 4.1.22 kernel from diffrent pre-builds and from sources.

TL;DR
On kernel 4.1.22, spi bus pins are always low.

evilwulfie

unread,
Apr 29, 2016, 12:36:58 PM4/29/16
to beagl...@googlegroups.com
On the console image if you want the power button to function you install  acpid
It will shutdown the bbb on power button press AND if a battery is connected will shutdown the bbb as well

As far as spi goes have you tried  BB-SPIDEV1-00A0.dtbo or BB-SPIDEV0-00A0.dtbo?
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/cd4384e6-16eb-496e-a71c-cdaac43795da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Virus-free. www.avast.com

Robert Nelson

unread,
Apr 29, 2016, 12:40:41 PM4/29/16
to Beagle Board
On Fri, Apr 29, 2016 at 11:08 AM, Grzesiek Stawik <sta...@gmail.com> wrote:
So i had this other issue where the power button would not trigger poweroff, and from time to time i try new kernel versions to see if it works, and i have recently switched to 4.1.22 because it does work there.

But.

Strange things happen with SPI in 4.1.22, spidev is now created as /dev/spidev2.X instead /dev/spidev1.X, or, when using "cape-universal" overlay, i get both /dev/spidev1.X and /dev/spidev2.X but none of them are working.

"cape-universal" just enables the peripheral out of the box..

When using it, you need to use "config-pin" to mux the pin's utilized..

Here is the readme:


the 'overlay' is already loaded by default.. you just need to use config-pin to setup the spidev pin's..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Grzesiek Stawik

unread,
Apr 29, 2016, 1:40:55 PM4/29/16
to beagl...@googlegroups.com
Thanks, for the responses, let me clarify the problem.

In 4.1.1 i have been using overlays from "https://github.com/RobertCNelson/bb.org-overlays" and everything was working fine for the last year or so except the power button ( i gave up on this and don't remember the details, but issue was something about the power button device in /dev/ or /sys missing, and acpid not receiving any signal from the button )

so i have working system with 4.1.1 ( except the power button, which is a minor issue ).



i have recently upgraded, ONLY the kernel ( and modules, and firmware ) to 4.1.22, ( also later updated overlays from bb.org-overlays ) and now the power button works fine, but /dev/spidevX.X is dead.

if i simply boot the old kernel, spidev comes back to life.

again, from the system's point of view, on 4.1.22 everything is fine, spidev exists and i can use it, however no electrons are present on the physical spi pins.


Other overlays from bb.org-overlays are working fine on 4.1.22


Best Regards.




--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/QiFPB9HjL4Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYjrj9NUz7bD%3D6ASAy%2BUvijyRbRbjadeY0P0Xmq34TL4-g%40mail.gmail.com.

Mattt C

unread,
May 27, 2016, 9:29:20 AM5/27/16
to BeagleBoard
Hi, 

I got the exact same problem. I use the DTBO BB-SPIDEV0 with linux kernel 4.1.15. The pinmux of SPI pins doesn't change when I load the SPI overlay. I tried loading I2C1, pin P9_18 change its pinmux. When I load SPIDEV0, it doesn't.

Best regards.

Robert Nelson

unread,
May 27, 2016, 9:34:57 AM5/27/16
to Beagle Board, matthie...@gmail.com
On Fri, May 27, 2016 at 8:29 AM, Mattt C <matthie...@gmail.com> wrote:
Hi, 

I got the exact same problem. I use the DTBO BB-SPIDEV0 with linux kernel 4.1.15. The pinmux of SPI pins doesn't change when I load the SPI overlay. I tried loading I2C1, pin P9_18 change its pinmux. When I load SPIDEV0, it doesn't.

BB-SPIDEV0 needs to be loaded at bootup, not later, as it will fail if manually loaded...

add it to /boot/uEnv.txt

cape_enable=bone_capemgr.enable_partno=BB-SPIDEV0
Regards,

John Syne

unread,
May 27, 2016, 4:07:14 PM5/27/16
to beagl...@googlegroups.com, Pantelis Antoniou
Hi Robert,

You are talking about the edma not being registered for the SPI when using overlays, right?

I’ve been working on adding DMA to the IIO ADC driver and I came across the same problem. It seems like prepare_unused_channel_list is only called the first time edma_alloc_channel is called. In prepare_unused_channel_list, it scans the device tree for “dmas” & “dma-cells” and sets up the edma_cc[0]->edma_unused. 

So similar to the problem you have with SPI, I had to add the ADC spec into the base devicetree because the overlay would not work. 

Regards,
John




--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYh%3DmV%2BPb48zEjy3Zqh2HN_kq_iCAZB2KCcfmdVhAWqUzA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages