I can confirm that this issue is the result of the C0 stepping on all new Raspberry Pi 4 boards.
The old stepping, B0 works fine:
$this->bbcode_second_pass_code('', '
$ cat /sys/firmware/devicetree/base/model
Raspberry Pi 4 Model B Rev 1.4
')
- BCM2711 code for B0 stepping
- raspi4b_b0.jpg (149.35 KiB) Viewed 8782 times
The new stepping, C0,
does not work fine:
$this->bbcode_second_pass_code('', '
$ cat /sys/firmware/devicetree/base/model
Raspberry Pi 4 Model B Rev 1.5
')
- BCM2711 code for C0 stepping
- raspi4b_c0.jpg (129.26 KiB) Viewed 8782 times
When installing aarch64 according to the install guide, it works fine on any rpi with B0 stepping. However, with C0 stepping I ran into two different errors, depending on if it was a 4GB or 2GB version.
For the 2GB version, I had the following error show up after the kernel init:
$this->bbcode_second_pass_code('', '
[ 3.285920] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 24, base_baud = 0) is a PL011 rev2
[ 3.295185] serial serial0: tty port ttyAMA0 registered
[ 3.302518] raspberrypi-firmware soc:firmware: Attached to firmware from 2022-02-04T12:05:40
[ 3.466223] dwc2 fe980000.usb: supply vusb_d not found, using dummy regulator
[ 3.473605] dwc2 fe980000.usb: supply vusb_a not found, using dummy regulator
[ 3.581314] dwc2 fe980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[ 3.601366] sdhci-iproc fe300000.mmc: allocated mmc-pwrseq
[ 3.652023] mmc0: SDHCI controller on fe300000.mmc [fe300000.mmc] using PIO
[ 3.704362] ALSA device list:
[ 3.707397] No soundcards found.
[ 3.720024] mmc1: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[ 3.727761] random: fast init done
[ 3.731546] Freeing unused kernel memory: 6272K
[ 3.736229] Run /init as init process
[ 3.744090] mmc0: new high speed SDIO card at address 0001
[ 3.779752] mmc1: ADMA error: 0x02000000
[ 3.783765] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 3.783769] mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00001002
[ 3.783772] mmc1: sdhci: Blk size: 0x00007008 | Blk cnt: 0x00000001
[ 3.783776] mmc1: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013
[ 3.783778] mmc1: sdhci: Present: 0x1fff0206 | Host ctl: 0x00000011
[ 3.816412] mmc1: sdhci: Power: 0x0000000f | Blk gap: 0x00000080
[ 3.816415] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00007d07
[ 3.829471] mmc1: sdhci: Timeout: 0x00000000 | Int stat: 0x00000000
[ 3.829474] mmc1: sdhci: Int enab: 0x03ff100b | Sig enab: 0x03ff100b
[ 3.829476] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 3.849056] mmc1: sdhci: Caps: 0x45ee6432 | Caps_1: 0x0000a525
[ 3.849059] mmc1: sdhci: Cmd: 0x0000333a | Max curr: 0x00080008
[ 3.862113] mmc1: sdhci: Resp[0]: 0x00000920 | Resp[1]: 0x00edc87f
[ 3.862116] mmc1: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x00400e00
[ 3.875171] mmc1: sdhci: Host ctl2: 0x00000008
[ 3.875175] mmc1: sdhci: ADMA Err: 0x00000001 | ADMA Ptr: 0xc3000200
[ 3.875177] mmc1: sdhci: ============================================
[ 3.875179] mmc1: sdhci: c3000200: DMA 0xf3400000, LEN 0x0008, Attr=0x21
[ 3.875183] mmc1: sdhci: c3000208: DMA 0x00000000, LEN 0x0000, Attr=0x03
[ 3.875281] mmc1: error -5 whilst initialising SD card
<< error above repeats constantly >>
')
On a 4GB rpi with C0 stepping, I had a different error:
$this->bbcode_second_pass_code('', '
[ 3.291795] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 24, base_baud = 0) is a PL011 rev2
[ 3.301101] serial serial0: tty port ttyAMA0 registered
[ 3.308482] raspberrypi-firmware soc:firmware: Attached to firmware from 2022-02-04T12:05:40
[ 3.472194] dwc2 fe980000.usb: supply vusb_d not found, using dummy regulator
[ 3.479578] dwc2 fe980000.usb: supply vusb_a not found, using dummy regulator
[ 3.587277] dwc2 fe980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[ 3.607296] sdhci-iproc fe300000.mmc: allocated mmc-pwrseq
[ 3.657941] mmc0: SDHCI controller on fe300000.mmc [fe300000.mmc] using PIO
[ 3.710320] ALSA device list:
[ 3.713354] No soundcards found.
[ 3.725963] mmc1: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[ 3.737576] Freeing unused kernel memory: 6272K
[ 3.739192] random: fast init done
[ 3.742261] Run /init as init process
[ 3.759911] mmc0: new high speed SDIO card at address 0001
[ 3.789100] mmc1: invalid bus width
[ 3.792675] mmc1: error -22 whilst initialising SD card
[ 4.114815] mmc1: invalid bus width
[ 4.118382] mmc1: error -22 whilst initialising SD card
<< mmc1 error above repeats continuously >>
')
Following the advice on this thread, I had luck replacing "fdt_addr_r" with "fdt_addr" on only the booti lines, which gives a final boot.txt file of:
$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
setenv bootargs console=ttyS1,115200 console=tty0 root=PARTUUID=${uuid} 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};
else
booti ${kernel_addr_r} - ${fdt_addr};
fi;
fi;
fi
')
After which, I ran the mkscr script.
I also had to
ignore the installation instructions which say:
$this->bbcode_second_pass_code('', '
sed -i 's/mmcblk0/mmcblk1/g' root/etc/fstab
')
I tried many things to reach this outcome, including updating to the latest u-boot, which does not work. I can confirm, however, that using the ARMv7 kernel does work. I confirmed this by booting the fresh aarch64 install on the rpi4b with older B0 stepping, then running `pacman -S linux-rpi` in order to replace the kernel. This also uninstalled u-boot. After plugging this into the newer C0 stepping devices, it worked fine, but I would prefer to run aarch64.
I hope this helps someone! I've spent over two full days trying to figure out this issue.