A Raspberry Pi 5’s settings for an Acorn

This page is for someone with an Acorn wired to a Raspberry Pi 5. It lists what the Pi must have set for the card’s serial pair and for JTAG, and where the kernel console must not be. Why each setting is what it is is on The serial port, the console and JTAG on a Raspberry Pi 5. Which wire goes where is on Acorn wiring on a Raspberry Pi 5.

The serial port

Each row of the table is one wire of the serial pair, a null-modem crossover: the end that transmits lands on the receiver of the other end.

Wire

Transmits

Lands on the host’s

K2

the FPGA

receiver, GPIO15 / RXD0

J2

the host

transmitter, GPIO14 / TXD0

Each row of the next table is a setting of the Pi’s header serial port and its value.

Setting

Value

Device

/dev/ttyAMA0

Baud rate

115200

Overlay

[pi5] dtoverlay=uart0-pi5 in config.txt

Pre-test

systemctl stop serial-getty@ttyAMA0

Warning

Never drive a Pi GPIO against an FPGA output. With the pin-ID design loaded, every P2 ball is an FPGA output, J2 included. Setting GPIO14 to a4 (TXD0) or op while pin-ID runs is then output against output on the J2 wire, and it crashes the Pi. Probe with pinctrl set 14 ip pn (input, no pull). Restore pinctrl set 14 a4 only once a design that treats J2 as an input is loaded.

JTAG from the Pi

Each row of the next table is a setting of JTAG from a Pi 5 and its value. To run JTAG, follow How to run JTAG by hand on an Acorn on a Raspberry Pi 5.

Setting

Value

Pins

SPI0, GPIO8-11

SPI modules

need not be unloaded: pinctrl shows GPIO8-11 unclaimed with them loaded

The 40-pin header’s GPIO chip

the one gpiodetect lists as pinctrl-rp1, numbered 11 to 15: /dev/gpiochip15 under kernel 6.12

Cable these pages use

libgpiod, which always opens /dev/gpiochip0

Link before the libgpiod cable runs

the header’s chip as /dev/gpiochip0, made again at each boot

Package in the Welland NFS root

openfpgaloader-fpgasonline-git, from fpgas.online-fpga-tools (What runs on a Pi host)

Other cable of that package

rp1pio (RP1 PIO-driven JTAG), which needs /dev/pio0

Each row of the next table is an action of that openFPGALoader build and what it does to the card.

Action

Effect

--detect

read-only; safe against a live PCIe endpoint

--read-dna, --read-xadc, --read-register

read-only

Loading a bitstream

not safe against a live PCIe endpoint: why the endpoint is detached before a load

Kernel console on the FPGA UART

Warning

The kernel console must not be on the FPGA’s UART. It is there when the kernel command line has console=ttyAMA0, or console=serial0 on a host whose header UART is enabled. Then loading any design that drives serial TX reboots or crashes the host.

Those designs are the UART SoC, pin-ID and the GPIO loopback. The FPGA drives K2 at its own baud rate, 1200 for pin-ID and 115200 for the UART SoC. The console reads those bytes as garbage, and some of them are SysRq commands: reboot(b), crash(c), poweroff(o), kill-all-tasks(i).

Each row of the table is a kernel setting that keeps the console off the FPGA’s UART, and where it is set. Check them on every host you set up and on a host that has been reinstalled.

Host

Setting

Set in

Compute Blade

console=tty1

the kernel command line

Raspberry Pi 5

console=ttyAMA10 (the debug connector); the getty that systemd derives from the console lands there too

[pi5] cmdline=cmdline-pi5.txt

Either

kernel.sysrq=0

the kernel command line or /etc/sysctl.d/

When a wire does not answer: Acorn wiring faults on a Raspberry Pi 5.