mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-06 07:53:30 +01:00
raspberry-pi/common: add ordered config.txt device tree overlays
This commit is contained in:
1 parent
89c9653dcf
commit
7aefd9ab01
5 files changed
+571
-71
No files matched your search
@@ -8,30 +8,37 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
hardware.raspberry-pi.configtxt.settings = {
|
||||
all = {
|
||||
camera_auto_detect = lib.mkDefault true;
|
||||
display_auto_detect = lib.mkDefault true;
|
||||
max_framebuffers = lib.mkDefault 2;
|
||||
disable_fw_kms_setup = lib.mkDefault true;
|
||||
disable_overscan = lib.mkDefault true;
|
||||
arm_boost = lib.mkDefault true;
|
||||
dtparam = lib.mkDefault [ "audio=on" ];
|
||||
dtoverlay = lib.mkDefault [ "vc4-kms-v3d" ];
|
||||
# U-Boot needs the UART enabled to boot (see arch/arm/mach-bcm283x/Kconfig
|
||||
# in the U-Boot tree). Without it U-Boot hangs on the Pi 4.
|
||||
enable_uart = lib.mkDefault true;
|
||||
hardware.raspberry-pi.configtxt = {
|
||||
settings = {
|
||||
all = {
|
||||
camera_auto_detect = lib.mkDefault true;
|
||||
display_auto_detect = lib.mkDefault true;
|
||||
max_framebuffers = lib.mkDefault 2;
|
||||
disable_fw_kms_setup = lib.mkDefault true;
|
||||
disable_overscan = lib.mkDefault true;
|
||||
arm_boost = lib.mkDefault true;
|
||||
# A base DTB parameter rather than an overlay one, so it stays here. It
|
||||
# has to apply before any overlay loads: vc4-kms-v3d exports its own
|
||||
# `audio` parameter, which would otherwise capture this line and set
|
||||
# HDMI audio instead of enabling the onboard audio.
|
||||
dtparam = lib.mkDefault [ "audio=on" ];
|
||||
# U-Boot needs the UART enabled to boot (see arch/arm/mach-bcm283x/Kconfig
|
||||
# in the U-Boot tree). Without it U-Boot hangs on the Pi 4.
|
||||
enable_uart = lib.mkDefault true;
|
||||
};
|
||||
# The Pi 5 has a dedicated debug UART. Leaving the mini UART on feeds ghost
|
||||
# input into boot, so turn it back off.
|
||||
pi5 = {
|
||||
enable_uart = lib.mkDefault false;
|
||||
};
|
||||
cm4 = {
|
||||
otg_mode = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
# The Pi 5 has a dedicated debug UART. Leaving the mini UART on feeds ghost
|
||||
# input into boot, so turn it back off.
|
||||
pi5 = {
|
||||
enable_uart = lib.mkDefault false;
|
||||
};
|
||||
cm4 = {
|
||||
otg_mode = lib.mkDefault true;
|
||||
};
|
||||
cm5 = {
|
||||
dtoverlay = lib.mkDefault [ "dwc2,dr_mode=host" ];
|
||||
|
||||
deviceTreeOverlays = {
|
||||
all = lib.mkDefault [ { vc4-kms-v3d = { }; } ];
|
||||
cm5 = lib.mkDefault [ { dwc2.dr_mode = "host"; } ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user