# For more options and information see:
# http://rptl.io/configtxt

# Specifies the initial RAM filesystem image to load and tells the kernel to follow it.
initramfs initramfs-linux.img followkernel

# Enables automatic loading of initial RAM filesystem images if they are present.
auto_initramfs=1

# Enables the I2C interface on the ARM processor.
dtparam=i2c_arm=on

# Enables the I2S (Inter-IC Sound) interface, typically used for audio peripherals.
#dtparam=i2s=on

# Enables the SPI (Serial Peripheral Interface) bus, used for high-speed communication with peripherals.
dtparam=spi=on

# Enables the onboard audio output.
dtparam=audio=on

# Enables kernel Bluetooth support.
dtparam=krnbt=on

# Allocates 256MB of RAM to the GPU.
gpu_mem=256

# Specifies the 64-bit kernel image to boot.
kernel=kernel8.img

# Enables the UART (Universal Asynchronous Receiver-Transmitter) serial port.
enable_uart=1

# Enables automatic detection and loading of device tree overlays for connected cameras.
camera_auto_detect=1

# Enables automatic detection and loading of device tree overlays for connected DSI (Display Serial Interface) displays.
display_auto_detect=1

# Sets the maximum number of framebuffers to 2.
max_framebuffers=2

# Sets the maximum width of the framebuffer to 3840 pixels.
max_framebuffer_width=3840

# Sets the maximum height of the framebuffer to 2160 pixels.
max_framebuffer_height=2160

# Enables 4K resolution support for HDMI.
hdmi_enable_4k=1

# Headless mode settings - ensures display initializes without monitor
hdmi_group=2
hdmi_mode=82

# Loads the device tree overlay for an I2C Real-Time Clock.
dtoverlay=i2c-rtc

# Loads the device tree overlay for an IR receiver on GPIO pin 17 (commented out).
#dtoverlay=gpio-ir,gpio_pin=17

# Loads the device tree overlay for an IR transmitter on GPIO pin 18 (commented out).
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Loads the device tree overlay for an I2C Real-Time Clock using the DS3231 chip.
dtoverlay=i2c-rtc,ds3231

# Forces the ARM processor to run in 64-bit mode.
arm_64bit=1

# Enables CPU boosting to run the ARM processor at its maximum allowed frequency.
arm_boost=1

# Use full KMS (better performance and modern driver stack)
dtoverlay=vc4-kms-v3d

# Prevent firmware from setting up video mode (let kernel handle it)
disable_fw_kms_setup=1

[cm4]
# Enables USB On-The-Go (OTG) host mode on the Raspberry Pi Compute Module 4 (CM4).
otg_mode=1

[pi5]
# Sets the charging voltage for the RTC backup battery on Raspberry Pi 5.
dtparam=rtc_bbat_vchg=3000000
