Raspberry Pi3+ aarch64 mainline SPI

This is for ARMv8 based devices

Raspberry Pi3+ aarch64 mainline SPI

Postby xorly » Thu Feb 24, 2022 10:55 pm

Hi,
I can't make SPI to work in this combination: Raspberry Pi3+, aarch64 alarm, mainline kernel.

contents of /boot/config.txt
$this->bbcode_second_pass_code('', '
enable_uart=1

device_tree_param=spi=on
')

contents of /boot/boot.txt (->scr)
$this->bbcode_second_pass_code('', '
# After modifying, run ./mkscr

# Set root partition to the second partition of boot device
# part uuid ${devtype} ${devnum}:2 uuid
# ^^ does not work with MBR and RPi 3 supports only MBR

setenv bootargs console=ttyS1,115200 console=tty0 root=UUID=d4941768-b095-46b8-8da0-db1e20a171c1 rw rootwait smsc95xx.macaddr="${usbethaddr}"

if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /Image; then
if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /dtbs/${fdtfile}; then
if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /initramfs-linux.img; then
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
else
booti ${kernel_addr_r} - ${fdt_addr_r};
fi;
fi;
fi
')

This is serial output from u-boot and start of kernel boot:
$this->bbcode_second_pass_code('', '
U-Boot 2021.04-1 (May 27 2021 - 18:44:02 +0000) Arch Linux ARM

DRAM: 948 MiB
RPI 3 Model B+ (0xa020d3)
MMC: mmc@7e202000: 0, mmcnr@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In: serial
Out: vidconsole
Err: vidconsole
Net: No ethernet found.
starting USB...
Bus usb@7e980000: USB DWC2
scanning bus usb@7e980000 for devices... 5 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
859 bytes read in 2 ms (418.9 KiB/s)
## Executing script at 02c00000
40735232 bytes read in 1771 ms (21.9 MiB/s)
20474 bytes read in 5 ms (3.9 MiB/s)
6746619 bytes read in 289 ms (22.3 MiB/s)
Moving Image from 0x80000 to 0x200000, end=29c0000
## Flattened Device Tree blob at 02e00000
Booting using the fdt blob at 0x2e00000
Using Device Tree in place at 0000000002e00000, end 0000000002e07ff9

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.16.11-1-aarch64-ARCH (builduser@leming) (aarch64-unknown-linux-gnu-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.38) #1 SMP Wed Feb 23 18:39:15 UTC 2022
[ 0.000000] Machine model: Raspberry Pi 3 Model B+
...
')

SPI module does not get loaded.

I am suspecting some issue some issue with FDT, but IDK how to debug it.

Do you have any idea?
xorly
 
Posts: 1
Joined: Wed Feb 02, 2022 8:18 pm

Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 6 guests