RPI4: SPI isn't working

This is for ARMv8 based devices

RPI4: SPI isn't working

Postby ewtoombs » Mon Dec 21, 2020 10:06 pm

Here's my whole /boot/config.txt:
$this->bbcode_second_pass_code('', '
enable_uart=1

dtparam=spi=on
dtoverlay=spi0-1cs
')

I got the instructions for configuring this file from here:
https://www.raspberrypi.org/documentati ... /README.md

So why wouldn't this work?

Never mind, I figured it out halfway through writing this. It was because I was using the default of uboot+linux-aarch64 instead of linux-raspberrypi4. uboot doesn't actually read config.txt. Without lines and lines of unreadable uboot fuckery, how do I configure the default bootloader setup to accept device tree overlays and parameter changes?
ewtoombs
 
Posts: 6
Joined: Tue Sep 20, 2016 8:45 pm

Re: RPI4: SPI isn't working

Postby graysky » Mon Dec 21, 2020 11:45 pm

If SPI is something provided by rpi foundation, the linux-aarch64 package will not provide the libs/firmware as it is the mainline kernel. Currently, Arch ARM doesn't yet offer a rpi foundation kernel package for aarch64. That will change in future once 5.10.y matures (although it has been rock solid for me so far).

The good news is that I have been kicking around an aarch64 package you are welcome to use/test.

Option 1: use my repo, instructions here: http://repo-ck.com/aarch64-test/
Option 2: clone my git repo and build your own: https://github.com/graysky2/PKGBUILDs/tree/5.10.y
graysky
Developer
 
Posts: 1880
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: RPI4: SPI isn't working

Postby ewtoombs » Tue Dec 22, 2020 8:55 pm

There is definitely a package for the raspberrypi kernel. It's called linux-raspberrypi4. It works fine. Oh and SPI support is in linux-aarch64. It's just something wrong with the device tree. I probably have to add the device tree parameter spi=on. But I don't know how to do that with uboot. I tried reading the documentation, but I can't figure it out.
ewtoombs
 
Posts: 6
Joined: Tue Sep 20, 2016 8:45 pm


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 7 guests