kernel updates: 4.1.12-ti-r27 (BBB all spi/spidev users rejoice)

488 views
Skip to first unread message

Robert Nelson

unread,
Nov 5, 2015, 9:47:50 AM11/5/15
to Beagle Board
The journey into spi & dma..

So for awhile now, we've had a bug for spi users, where the system
would hardlock at the "160" byte threashold:

debian@beaglebone:~$ sudo dd if=/dev/zero of=/dev/spidev1.0 bs=159 count=1
1+0 records in
1+0 records out
159 bytes (159 B) copied, 0.000508833 s, 312 kB/s
debian@beaglebone:/sys$ dd if=/dev/zero of=/dev/spidev1.0 bs=160 count=1
^C

(hangs..)

"160" happens to be a the magic number where DMA takes over from PIO mode...

Well as of yesterday:

debian@beaglebone:~$ sudo dd if=/dev/zero of=/dev/spidev1.0 bs=320 count=1
1+0 records in
1+0 records out
320 bytes (320 B) copied, 0.00266366 s, 120 kB/s

So here's the deal, it looks to be a spi/overlay bug, as we don't seem
to get the correct dma tx/rx channels..

What interesting, when the "spi" node is enabled in the main dtb:

https://github.com/RobertCNelson/dtb-rebuilder/blob/4.1-ti/src/arm/am335x-boneblack-spi0.dts#L120-L137

it works fine in dma mode...

So with "4.1.12-ti-r27" spi-dma is now disabled..

*btw:

Late last night i wrote a better fix (will be r28)

where you can disable "spi-dma" via the dt option:

ti,pio-mode;

https://github.com/beagleboard/bb.org-overlays/commit/48d33d4d22f284103db83626b343724cf18c578d

Regards,

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

Rick Mann

unread,
Nov 5, 2015, 3:01:11 PM11/5/15
to beagl...@googlegroups.com
Nice work, Robert.

Are the recent PRU-related changes in this update?
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.


--
Rick Mann
rm...@latencyzero.com


Robert Nelson

unread,
Nov 5, 2015, 3:19:09 PM11/5/15
to Beagle Board
On Thu, Nov 5, 2015 at 2:00 PM, Rick Mann <rm...@latencyzero.com> wrote:
> Nice work, Robert.
>
> Are the recent PRU-related changes in this update?

Well everything part of "r26" is still there in r27:

http://processors.wiki.ti.com/index.php/PRU-ICSS

https://github.com/dinuxbg/pru-gcc-examples

Drew Fustini

unread,
Nov 5, 2015, 4:11:46 PM11/5/15
to beagl...@googlegroups.com
Thanks for your efforts!

drivers/staging/fbtft now works for me. Here is example of using
Adafruit 1.8" TFT LCD as a Framebuffer with 4.1.12-ti-r27 kernel:

https://gist.github.com/pdp7/6607665262fda38b8099#file-fbtft-works-4-1-12-ti-r27

Rick Mann

unread,
Nov 5, 2015, 4:27:25 PM11/5/15
to beagl...@googlegroups.com

> On Nov 5, 2015, at 12:18 , Robert Nelson <robert...@gmail.com> wrote:
>
> On Thu, Nov 5, 2015 at 2:00 PM, Rick Mann <rm...@latencyzero.com> wrote:
>> Nice work, Robert.
>>
>> Are the recent PRU-related changes in this update?
>
> Well everything part of "r26" is still there in r27:
>
> http://processors.wiki.ti.com/index.php/PRU-ICSS
>
> https://github.com/dinuxbg/pru-gcc-examples

Thanks, I lost track of where things were.

--
Rick Mann
rm...@latencyzero.com


Micka

unread,
Nov 6, 2015, 6:53:21 AM11/6/15
to beagl...@googlegroups.com
Hi Robert,

about this bug, are you also fixing the kernel am33x-rt-v4.1 ?

I'm interested also by the spi in the kernel am33x-rt-v4.1.


Micka,


Robert Nelson

unread,
Nov 6, 2015, 3:56:52 PM11/6/15
to Beagle Board
On Fri, Nov 6, 2015 at 5:52 AM, Micka <micka...@gmail.com> wrote:
> Hi Robert,
>
> about this bug, are you also fixing the kernel am33x-rt-v4.1 ?
>
> I'm interested also by the spi in the kernel am33x-rt-v4.1.

ToDate:

4.1.12-ti-r27+
4.1.12-ti-rt-r27+

and what will become "4.4-rc1"..

Haven't had a chance to apply it "everywhere"..

Andreas Müller

unread,
May 2, 2016, 5:25:44 AM5/2/16
to beagl...@googlegroups.com
It is very long time ago, but now I am running into performance issues
with SPI. I see the DMA is still disabled in current bb.org-overlays.
So is the bug for blocks > 160 still there (what about kernel 4.4.x?)

Thanks in advance

Andreas
Reply all
Reply to author
Forward
0 new messages