From 321c263fb553ac229b15bd7e345adcbb3785b4a9 Mon Sep 17 00:00:00 2001 From: Bohdan Buinich Date: Mon, 29 Jan 2024 03:24:32 +0200 Subject: [PATCH] [RPI] move cma configuration to config.txt (resolve issue 1) --- .../board/ovos/raspberrypi/cmdline.txt | 2 +- .../board/ovos/raspberrypi/rpi3/config.txt | 18 ++++++++++------- .../board/ovos/raspberrypi/rpi4/config.txt | 20 ++++++++++--------- .../board/ovos/raspberrypi/rpi5/config.txt | 18 ++++++++++------- 4 files changed, 34 insertions(+), 24 deletions(-) diff --git a/buildroot-external/board/ovos/raspberrypi/cmdline.txt b/buildroot-external/board/ovos/raspberrypi/cmdline.txt index c56bf478..a8f3d12b 100644 --- a/buildroot-external/board/ovos/raspberrypi/cmdline.txt +++ b/buildroot-external/board/ovos/raspberrypi/cmdline.txt @@ -1 +1 @@ -cma=384M mitigations=off snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_compat_alsa=0 dwc_otg.lpm_enable=0 acpi=off cgroup_enable=memory psi=1 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u +mitigations=off snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_compat_alsa=0 dwc_otg.lpm_enable=0 acpi=off cgroup_enable=memory psi=1 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,0bda:9210:u diff --git a/buildroot-external/board/ovos/raspberrypi/rpi3/config.txt b/buildroot-external/board/ovos/raspberrypi/rpi3/config.txt index e87fb4fc..dde2cab3 100644 --- a/buildroot-external/board/ovos/raspberrypi/rpi3/config.txt +++ b/buildroot-external/board/ovos/raspberrypi/rpi3/config.txt @@ -1,5 +1,8 @@ # Raspberry Pi 3 Configuration +# Basic setting +arm_64bit=1 + # Disable command line tags. disable_commandline_tags=2 @@ -8,6 +11,7 @@ armstub=RPI_EFI.fd # Enable UART for serial communication. enable_uart=1 +uart_2ndstage=1 # Set device tree memory address range. device_tree_address=0x1f0000 @@ -23,8 +27,8 @@ disable_overscan=1 # Auto-detect DSI displays and load overlays. display_auto_detect=1 -# Enable DRM VC4 V3D driver for graphics acceleration. -dtoverlay=vc4-fkms-v3d +# Graphics acceleration with VC4 V3D driver, uses 384MB CMA limited to 2 framebuffer. +dtoverlay=vc4-fkms-v3d,cma-384 max_framebuffers=2 # Uncomment for HDMI safe mode. @@ -34,9 +38,6 @@ max_framebuffers=2 # 256, 512 or 1024 MB total memory gpu_mem=256 -# Fixes for serial console on certain Pi models. -dtoverlay=miniuart-bt - # Enable Bluetooth driver autoprobing. dtparam=krnbt=on @@ -54,8 +55,11 @@ dtparam=random=on # Disable rainbow splash screen on boot. disable_splash=1 -# Enable I2C, I2S and SPI for peripheral communication. -dtparam=i2c=on,i2s=on,spi=on +# Enable I2C, I2S, and SPI interfaces for peripheral communication. +dtparam=i2c=on +dtparam=i2c_arm=on +dtparam=spi=on +dtparam=i2s=on # Use DWC2 instead of XHCI on the rpi3 to prevent issues with te RealTime kernel dtoverlay=dwc2 diff --git a/buildroot-external/board/ovos/raspberrypi/rpi4/config.txt b/buildroot-external/board/ovos/raspberrypi/rpi4/config.txt index 48b2ec9a..780de69b 100644 --- a/buildroot-external/board/ovos/raspberrypi/rpi4/config.txt +++ b/buildroot-external/board/ovos/raspberrypi/rpi4/config.txt @@ -1,10 +1,14 @@ # Raspberry Pi 4 Configuration +# Basic setting +arm_64bit=1 + # Specify UEFI firmware file. armstub=RPI_EFI.fd # Enable UART for serial communication. enable_uart=1 +uart_2ndstage=1 # Enable GIC (Generic Interrupt Controller). enable_gic=1 @@ -26,10 +30,8 @@ disable_overscan=1 # Auto-detect DSI displays and load overlays. display_auto_detect=1 -# Enable DRM VC4 V3D driver for graphics acceleration. -dtoverlay=vc4-fkms-v3d -# Optional: Uncomment for Pi 4 specific settings -# dtoverlay=vc4-kms-v3d-pi4 +# Graphics acceleration with VC4 V3D driver, uses 384MB CMA limited to 2 framebuffer. +dtoverlay=vc4-fkms-v3d,cma-384 max_framebuffers=2 # Uncomment for HDMI safe mode. @@ -39,9 +41,6 @@ max_framebuffers=2 # 256, 512 or 1024 MB total memory gpu_mem=256 -# Fixes for serial console on certain Pi models. -dtoverlay=miniuart-bt - # Enable Bluetooth driver autoprobing. dtparam=krnbt=on @@ -59,8 +58,11 @@ dtparam=random=on # Disable rainbow splash screen on boot. disable_splash=1 -# Enable I2C, I2S and SPI for peripheral communication. -dtparam=i2c=on,i2s=on,spi=on +# Enable I2C, I2S, and SPI interfaces for peripheral communication. +dtparam=i2c=on +dtparam=i2c_arm=on +dtparam=spi=on +dtparam=i2s=on # Enable CPU frequency boost on compatible models. arm_boost=1 diff --git a/buildroot-external/board/ovos/raspberrypi/rpi5/config.txt b/buildroot-external/board/ovos/raspberrypi/rpi5/config.txt index 896c6a4d..7a2965e6 100644 --- a/buildroot-external/board/ovos/raspberrypi/rpi5/config.txt +++ b/buildroot-external/board/ovos/raspberrypi/rpi5/config.txt @@ -1,10 +1,14 @@ # Raspberry Pi 5 Configuration +# Basic setting +arm_64bit=1 + # Specify UEFI firmware file for booting in UEFI mode. armstub=RPI_EFI.fd # Enable UART for serial communication. enable_uart=1 +uart_2ndstage=1 # Enable ttyAMA0 serial console. dtoverlay=uart0-pi5 @@ -47,15 +51,15 @@ disable_overscan=1 # Automatic display detection for optimal settings. display_auto_detect=1 -# Graphics acceleration with VC4 V3D driver, limited to 2 framebuffer. -dtoverlay=vc4-fkms-v3d +# Graphics acceleration with VC4 V3D driver, uses 512MB CMA limited to 2 framebuffer. +dtoverlay=vc4-fkms-v3d,cma-512 max_framebuffers=2 -# Enable I2C, I2S and SPI for peripheral communication. -dtparam=i2c=on,i2s=on,spi=on - -# Bluetooth over mini UART, balancing UART use. -dtoverlay=miniuart-bt +# Enable I2C, I2S, and SPI interfaces for peripheral communication. +dtparam=i2c=on +dtparam=i2c_arm=on +dtparam=spi=on +dtparam=i2s=on # Uncomment to disable Bluetooth. #dtoverlay=disable-bt