# Enable serial pins on GPIO for debugging.
# On 3B and later models, in the default setup, serial is handled by a
# "mini-UART" which is not very reliable.
# On earlier models it is handled by a reliable PL011 UART.
# Activating the "mini-UART" also limits the videocore clock (the mini-UART relies on it).
# Also read explanation about "dtoverlay=disable-bt" below.
# (see https://www.raspberrypi.com/documentation/computers/configuration.html#mini-uart-and-cpu-core-frequency)

enable_uart=1

# On 3B and later models, the reliable PL011 UART exists too, but it is
# used for communication with the bluetooth chip by default.
# If bluetooth is not needed, you can uncomment the following dtoverlay line
# which will disable bluetooth but let the PL011 UART manage the serial
# communication instead of the unreliable "mini-UART".

# dtoverlay=disable-bt

# poe-fan (3b+,4b)
# see https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README#L1690

dtparam=poe_fan_temp0=70000,poe_fan_temp0_hyst=3000
dtparam=poe_fan_temp1=73000,poe_fan_temp1_hyst=3000
dtparam=poe_fan_temp2=76000,poe_fan_temp2_hyst=2000
dtparam=poe_fan_temp3=78000,poe_fan_temp3_hyst=2000

# Let the firmware enable the watchdog before starting u-boot

dtparam=watchdog=on

# kernels (actually u-boot binaries)
#
# notes:
# - pi1+ is not mentioned in the doc, so model rpi-b-plus
#   might actually match the [pi1] section. however, in our case,
#   both models point to the same u-boot binary.
# - models >= 3B+ should be booted without a SD card (see
#   "walt help show node-install"). however we include all u-boot
#   binaries on SD cards (including 64bit variants) for experimentation
#   purpose.
# - we order models from newest to oldest, because we have seen
#   a case where the firmware of the pi4 was not recognizing the [pi5] filter
#   (which is understandable because the pi5 was probably not released yet
#   when this firmware was flashed), so it was ignoring the filter and
#   setting kernel variable to u-boot-rpi-5-b.img.
#   By ordering this way, the [pi4] section will be read after this wrong
#   assignment and override the kernel variable with the proper value.

[pi5]
kernel=u-boot-rpi-5-b.img
[pi4]
kernel=u-boot-rpi-4-b.img
[pi3+]
kernel=u-boot-rpi-3-b.img
[pi3]
kernel=u-boot-rpi-3-b.img
[pi2]
kernel=u-boot-rpi-2-b.img
[pi1+]
kernel=u-boot-rpi-b.img
[pi1]
kernel=u-boot-rpi-b.img
