mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-07 00:13:30 +01:00
Merge branch 'master' into acer-predator-helios-300-g3-571
This commit is contained in:
16 files changed
+407
-80
No files matched your search
@@ -164,6 +164,7 @@ See code for all available configurations.
|
||||
| [Dell Inspiron 7559](dell/inspiron/7559) | `<nixos-hardware/dell/inspiron/7559>` | `dell-inspiron-7559` |
|
||||
| [Dell Latitude 3340](dell/latitude/3340) | `<nixos-hardware/dell/latitude/3340>` | `dell-latitude-3340` |
|
||||
| [Dell Latitude 3480](dell/latitude/3480) | `<nixos-hardware/dell/latitude/3480>` | `dell-latitude-3480` |
|
||||
| [Dell Latitude 3530](dell/latitude/3530) | `<nixos-hardware/dell/latitude/3530>` | `dell-latitude-3530` |
|
||||
| [Dell Latitude 5490](dell/latitude/5490) | `<nixos-hardware/dell/latitude/5490>` | `dell-latitude-5490` |
|
||||
| [Dell Latitude 5520](dell/latitude/5520) | `<nixos-hardware/dell/latitude/5520>` | `dell-latitude-5520` |
|
||||
| [Dell Latitude 7280](dell/latitude/7280) | `<nixos-hardware/dell/latitude/7280>` | `dell-latitude-7280` |
|
||||
@@ -460,6 +461,7 @@ See code for all available configurations.
|
||||
| [Radxa ROCK Pi 4](radxa/rock-pi-4) | `<nixos-hardware/radxa/rock-pi-4>` | `rock-pi-4` |
|
||||
| [Radxa ROCK Pi E](radxa/rock-pi-e) | `<nixos-hardware/radxa/rock-pi-e>` | `rock-pi-e` |
|
||||
| [Razer Blade 14 (RZ09-0530)](razer/blade/14/RZ09-0530) | `<nixos-hardware/razer/blade/14/RZ09-0530>` | `razer-blade-14-RZ09-0530` |
|
||||
| [Raspberry Pi 1](raspberry-pi/1) | `<nixos-hardware/raspberry-pi/1>` | `raspberry-pi-1` |
|
||||
| [Raspberry Pi 2](raspberry-pi/2) | `<nixos-hardware/raspberry-pi/2>` | `raspberry-pi-2` |
|
||||
| [Raspberry Pi 3](raspberry-pi/3) | `<nixos-hardware/raspberry-pi/3>` | `raspberry-pi-3` |
|
||||
| [Raspberry Pi 4](raspberry-pi/4) | `<nixos-hardware/raspberry-pi/4>` | `raspberry-pi-4` |
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
@@ -7,9 +8,17 @@
|
||||
{
|
||||
imports = [
|
||||
../default.nix
|
||||
# no effect at Linux 7.2 as patches are merged
|
||||
./tas2783-kernel-patches.nix
|
||||
];
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "7.0";
|
||||
message = "ASUS ProArt PX13 (HN7306EAC) hardware requires Linux ≥ 7.0 (current ${config.boot.kernelPackages.kernel.version})";
|
||||
}
|
||||
];
|
||||
|
||||
hardware = {
|
||||
alsa.enablePersistence = lib.mkDefault true;
|
||||
firmware = lib.optional (lib.versionOlder pkgs.linux-firmware.version "20260519") (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -18,34 +18,29 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "7.0";
|
||||
message = "tas2783 patches require Linux ≥ 7.0 (found ${config.boot.kernelPackages.kernel.version})";
|
||||
}
|
||||
];
|
||||
|
||||
boot.kernelPatches = [
|
||||
(mkPatch "0001-ALSA-tas2783-sdw-add-Playback-to-volume-control" "sha512-IdIy81PXtmQAQ+MVChYDYkoa5RDhQwP2L5efN8cz+tST3nM0Oc0x4SJ4sBnVL7QDJc/WBB0OEnFfTkEt9Id+cQ==")
|
||||
(mkPatch "0002-Names-to-match-snd_soc_dai_driver-playback-capturest" "sha512-SrCgzceh3rhyYz5tNWHY2jNWyG/qgmU7ZVLtV71iir8HwOrSES7JsunV2E7mb8R66dShY+loV8ovNeMkyuDB7w==")
|
||||
(mkPatch "0003-removed-unused-fields" "sha512-mWKqFg8AG00TE3oPy5usPPxWf6aIvhxMLDGI+/0+vvjBIFwWv6qh9jSUeid6CAKgAcluPSA8Sag4ESguCeinyw==")
|
||||
(mkPatch "0004-SOC_SINGLE_RANGE_TLV-uses-snd_soc_get_volsw-snd_soc_" "sha512-G51v725q17UHvfPg4H8V92eSbZ5lcuiF97Zt1EbAtuwrhXefeaZy+hl79sSpVlzzY8pvzIwf6wodAuvp44M01A==")
|
||||
(mkPatch "0005-dev_set_drvdata-already-called-intas_sdw_probe" "sha512-zk+rKZ/l0oB7JdABtb89x6tUzggP99TSy+3cr+q6QjZFdjGsLPXHxre0YACuKBNx6+JazZE/zEilIvahS4wOLQ==")
|
||||
(mkPatch "0006-refactor-setting-sa_func_data" "sha512-8djgIJV1LCzDhFLFn/PNfDkE+U0mh2h4Rm2LJMeLUYKQlwzgPMbICh5B3HhCgEVTaUd54OGOSFEf0i6AIm2SIQ==")
|
||||
(mkPatch "0007-check-AF01-for-init-data" "sha512-gjpdnJDzve37MnyVE52+E9sRkXF9+HtA4XTrBZQiV8ozFwWgIzhO2ZDKSpWbE/kd23PdaUcKX/fPj3J7ZD5YqA==")
|
||||
(mkPatch "0008-setup-ports" "sha512-uuDa92VXlCsszswv8PHcDbbyfseL6Jt7DWPc5ajG1WSM/FGojRIbbl/2smQyGfE2jPquy5GQfJps7k1cRfpl8w==")
|
||||
(mkPatch "0009-Already-set-by-SOC_SINGLE_RANGE_TLV-Speaker-Playback" "sha512-qBveCsmwezD13oWF5jBlUybdns5OsDDZji0y0smaKWi9GPAvhw/v66WUnEyC77UF1mvq+OyrWpA4yXwxAFza3Q==")
|
||||
(mkPatch "0010-control-to-set-channel" "sha512-pL8Ol1ml2QhyKnzZvD+oTaVUPyqOO49uuiEUzyKdnskFwVH+jIluY3IDsmzWv5wTg/9D+CTGC4J8gW55xKwWfg==")
|
||||
(mkPatch "0011-mute-unmute-using-SND_SOC_DAPM_SWITCH" "sha512-6aB8mBACTIQxU7CTrpR3UXJFdR4KbUOT9/AymyGiuV/9PfWdXZoW/0A09SHFptxRwCv4FG5tZSDZRtKvvYNQdQ==")
|
||||
(mkPatch "0012-use-SND_SOC_DAPM_REG-to-power-on-off" "sha512-mJ93TxZQ1GuDGar0/6tBd/dlJ3B/41AVhRsViuSaEhykPC4NlIAOWaN9eJj4bxjEEyEQ3REfjHXVnJ3wdCRK9w==")
|
||||
(mkPatch "0013-reattach-after-resume" "sha512-OdkYPzRDkd4FCd1OTOAfRrQW6JQ9D3Opic/X+sg+pLNGoEEXfph/sLXVYGo9u6DGPJndQZNrXyS4qhJMGPWVMw==")
|
||||
(mkPatch "0014-defer-check" "sha512-ABSrwsOB+KU39LMxh3N47Ji+edhu5rDQMKMi5rEVXtCU8W56qANpU+ui+bJmOLYyq8c9H1qme+b5nQ6u9zv01w==")
|
||||
(mkPatch "0015-to-help-alsa-find-them" "sha512-gVJ+0ZO9Oz15/rC08moVSlVglbishJctjH5SnDdI8m3s9hkEY56o8v+R/PlRS3rL+mOa9q3VuO5J40+LrcxDKw==")
|
||||
(mkPatch "0016-cleanup-controls" "sha512-Jkp7kdi0FmVMlBL/VVzq7hYkCmKoELO0epnExP7ggQuopCzRbVpUQ3giMlj10O69aUBZJ4z3gaMkb1HTYjIXmA==")
|
||||
# Upstream linux-firmware took a different naming approach to the original patches
|
||||
{
|
||||
name = "0017-fix-tas2783-fw-name-0x";
|
||||
patch = ./fix-tas2783-fw-name-0x.patch;
|
||||
}
|
||||
];
|
||||
boot.kernelPatches =
|
||||
lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "7.2")
|
||||
[
|
||||
(mkPatch "0001-ALSA-tas2783-sdw-add-Playback-to-volume-control" "sha512-IdIy81PXtmQAQ+MVChYDYkoa5RDhQwP2L5efN8cz+tST3nM0Oc0x4SJ4sBnVL7QDJc/WBB0OEnFfTkEt9Id+cQ==")
|
||||
(mkPatch "0002-Names-to-match-snd_soc_dai_driver-playback-capturest" "sha512-SrCgzceh3rhyYz5tNWHY2jNWyG/qgmU7ZVLtV71iir8HwOrSES7JsunV2E7mb8R66dShY+loV8ovNeMkyuDB7w==")
|
||||
(mkPatch "0003-removed-unused-fields" "sha512-mWKqFg8AG00TE3oPy5usPPxWf6aIvhxMLDGI+/0+vvjBIFwWv6qh9jSUeid6CAKgAcluPSA8Sag4ESguCeinyw==")
|
||||
(mkPatch "0004-SOC_SINGLE_RANGE_TLV-uses-snd_soc_get_volsw-snd_soc_" "sha512-G51v725q17UHvfPg4H8V92eSbZ5lcuiF97Zt1EbAtuwrhXefeaZy+hl79sSpVlzzY8pvzIwf6wodAuvp44M01A==")
|
||||
(mkPatch "0005-dev_set_drvdata-already-called-intas_sdw_probe" "sha512-zk+rKZ/l0oB7JdABtb89x6tUzggP99TSy+3cr+q6QjZFdjGsLPXHxre0YACuKBNx6+JazZE/zEilIvahS4wOLQ==")
|
||||
(mkPatch "0006-refactor-setting-sa_func_data" "sha512-8djgIJV1LCzDhFLFn/PNfDkE+U0mh2h4Rm2LJMeLUYKQlwzgPMbICh5B3HhCgEVTaUd54OGOSFEf0i6AIm2SIQ==")
|
||||
(mkPatch "0007-check-AF01-for-init-data" "sha512-gjpdnJDzve37MnyVE52+E9sRkXF9+HtA4XTrBZQiV8ozFwWgIzhO2ZDKSpWbE/kd23PdaUcKX/fPj3J7ZD5YqA==")
|
||||
(mkPatch "0008-setup-ports" "sha512-uuDa92VXlCsszswv8PHcDbbyfseL6Jt7DWPc5ajG1WSM/FGojRIbbl/2smQyGfE2jPquy5GQfJps7k1cRfpl8w==")
|
||||
(mkPatch "0009-Already-set-by-SOC_SINGLE_RANGE_TLV-Speaker-Playback" "sha512-qBveCsmwezD13oWF5jBlUybdns5OsDDZji0y0smaKWi9GPAvhw/v66WUnEyC77UF1mvq+OyrWpA4yXwxAFza3Q==")
|
||||
(mkPatch "0010-control-to-set-channel" "sha512-pL8Ol1ml2QhyKnzZvD+oTaVUPyqOO49uuiEUzyKdnskFwVH+jIluY3IDsmzWv5wTg/9D+CTGC4J8gW55xKwWfg==")
|
||||
(mkPatch "0011-mute-unmute-using-SND_SOC_DAPM_SWITCH" "sha512-6aB8mBACTIQxU7CTrpR3UXJFdR4KbUOT9/AymyGiuV/9PfWdXZoW/0A09SHFptxRwCv4FG5tZSDZRtKvvYNQdQ==")
|
||||
(mkPatch "0012-use-SND_SOC_DAPM_REG-to-power-on-off" "sha512-mJ93TxZQ1GuDGar0/6tBd/dlJ3B/41AVhRsViuSaEhykPC4NlIAOWaN9eJj4bxjEEyEQ3REfjHXVnJ3wdCRK9w==")
|
||||
(mkPatch "0013-reattach-after-resume" "sha512-OdkYPzRDkd4FCd1OTOAfRrQW6JQ9D3Opic/X+sg+pLNGoEEXfph/sLXVYGo9u6DGPJndQZNrXyS4qhJMGPWVMw==")
|
||||
(mkPatch "0014-defer-check" "sha512-ABSrwsOB+KU39LMxh3N47Ji+edhu5rDQMKMi5rEVXtCU8W56qANpU+ui+bJmOLYyq8c9H1qme+b5nQ6u9zv01w==")
|
||||
(mkPatch "0015-to-help-alsa-find-them" "sha512-gVJ+0ZO9Oz15/rC08moVSlVglbishJctjH5SnDdI8m3s9hkEY56o8v+R/PlRS3rL+mOa9q3VuO5J40+LrcxDKw==")
|
||||
(mkPatch "0016-cleanup-controls" "sha512-Jkp7kdi0FmVMlBL/VVzq7hYkCmKoELO0epnExP7ggQuopCzRbVpUQ3giMlj10O69aUBZJ4z3gaMkb1HTYjIXmA==")
|
||||
# Upstream linux-firmware took a different naming approach to the original patches
|
||||
{
|
||||
name = "0017-fix-tas2783-fw-name-0x";
|
||||
patch = ./fix-tas2783-fw-name-0x.patch;
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -4,6 +4,6 @@
|
||||
boot.kernelParams = [
|
||||
"i915.enable_dpcd_backlight=1"
|
||||
"nvidia.NVreg_EnableBacklightHandler=0"
|
||||
"nvidia.NVReg_RegistryDwords=EnableBrightnessControl=0"
|
||||
"nvidia.NVreg_RegistryDwords=EnableBrightnessControl=0"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# The BPI-SM10 (K3-CoM260) shares the same SoC, firmware and boot flow as the
|
||||
# K3 Pico-ITX. Only the device tree differs.
|
||||
imports = [ ../../spacemit/k3-pico-itx ];
|
||||
|
||||
hardware.deviceTree.name = lib.mkForce "spacemit/k3-com260-ifx.dtb";
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/profiles/base.nix"
|
||||
"${modulesPath}/installer/sd-card/sd-image.nix"
|
||||
./default.nix
|
||||
];
|
||||
|
||||
hardware.enableAllHardware = lib.mkForce false;
|
||||
|
||||
fileSystems."/" = lib.mkForce {
|
||||
device = "/dev/disk/by-partlabel/nixos-rootfs";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/ESP";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
image.fileName = "${config.image.baseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-bpi-sm10.img";
|
||||
|
||||
sdImage = {
|
||||
expandOnBoot = true;
|
||||
firmwarePartitionOffset = 12;
|
||||
firmwarePartitionName = "ESP";
|
||||
firmwareSize = 256;
|
||||
|
||||
populateFirmwareCommands =
|
||||
let
|
||||
systemdBoot = "${pkgs.systemd}/lib/systemd/boot/efi/systemd-bootriscv64.efi";
|
||||
kernel = "${config.system.build.kernel}/${config.system.boot.loader.kernelFile}";
|
||||
initrd = "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}";
|
||||
dtb = "${config.hardware.deviceTree.package}/${config.hardware.deviceTree.name}";
|
||||
kernelParams = lib.concatStringsSep " " config.boot.kernelParams;
|
||||
in
|
||||
''
|
||||
mkdir -p firmware/EFI/BOOT firmware/EFI/systemd firmware/EFI/nixos
|
||||
mkdir -p firmware/loader/entries
|
||||
|
||||
cp ${systemdBoot} firmware/EFI/BOOT/BOOTRISCV64.EFI
|
||||
cp ${systemdBoot} firmware/EFI/systemd/systemd-bootriscv64.efi
|
||||
|
||||
cp ${kernel} firmware/EFI/nixos/kernel.efi
|
||||
cp ${initrd} firmware/EFI/nixos/initrd
|
||||
cp ${dtb} firmware/EFI/nixos/k3_com260_ifx.dtb
|
||||
|
||||
cat > firmware/loader/loader.conf <<EOF
|
||||
default nixos
|
||||
timeout 3
|
||||
console-mode auto
|
||||
EOF
|
||||
|
||||
cat > firmware/loader/entries/nixos.conf <<EOF
|
||||
title NixOS
|
||||
linux /EFI/nixos/kernel.efi
|
||||
initrd /EFI/nixos/initrd
|
||||
devicetree /EFI/nixos/k3_com260_ifx.dtb
|
||||
options init=${config.system.build.toplevel}/init ${kernelParams}
|
||||
EOF
|
||||
|
||||
cat > firmware/startup.nsh <<EOF
|
||||
@echo -off
|
||||
echo Booting NixOS...
|
||||
for %i in 0 1 2 3 4 5
|
||||
if exist FS%i:\EFI\BOOT\BOOTRISCV64.EFI then
|
||||
FS%i:\EFI\BOOT\BOOTRISCV64.EFI
|
||||
endif
|
||||
endfor
|
||||
EOF
|
||||
'';
|
||||
populateRootCommands = "";
|
||||
|
||||
postBuildCommands = ''
|
||||
eval $(${pkgs.util-linux}/bin/partx $img -o START,SECTORS --nr 2 --pairs)
|
||||
ROOTFS_START=$START
|
||||
ROOTFS_SECTORS=$SECTORS
|
||||
|
||||
truncate -s '+2M' $img
|
||||
|
||||
${pkgs.util-linux}/bin/sfdisk $img <<EOF
|
||||
label: gpt
|
||||
unit: sectors
|
||||
sector-size: 512
|
||||
first-lba: 256
|
||||
|
||||
start=1280, size=128, name="env", type=0FC63DAF-8483-4772-8E79-3D69D8477DE4
|
||||
start=2048, size=256, name="bootinfo", type=0FC63DAF-8483-4772-8E79-3D69D8477DE4
|
||||
start=3072, size=1024, name="fsbl", type=0FC63DAF-8483-4772-8E79-3D69D8477DE4
|
||||
start=8192, size=6144, name="esos", type=0FC63DAF-8483-4772-8E79-3D69D8477DE4
|
||||
start=14336, size=2048, name="opensbi", type=0FC63DAF-8483-4772-8E79-3D69D8477DE4
|
||||
start=16384, size=8192, name="uboot", type=0FC63DAF-8483-4772-8E79-3D69D8477DE4
|
||||
start=24576, size=524288, name="ESP", type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B
|
||||
start=$ROOTFS_START, size=$ROOTFS_SECTORS, name="nixos-rootfs", type=0FC63DAF-8483-4772-8E79-3D69D8477DE4
|
||||
EOF
|
||||
|
||||
dd if=${config.system.build.fsbl}/bootinfo_block.bin of=$img conv=notrunc bs=1M seek=1
|
||||
dd if=${config.system.build.fsbl}/FSBL.bin of=$img conv=notrunc bs=1024 seek=1536
|
||||
dd if=${config.system.build.opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.itb of=$img conv=notrunc bs=1M seek=7
|
||||
dd if=${config.system.build.edk2}/edk2.itb of=$img conv=notrunc bs=1M seek=8
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
# Dell Latitude 3530
|
||||
|
||||
Laptop was release in 2022, Has official Ubuntu Certification: https://ubuntu.com/certified/202205-30271
|
||||
Every hardware in this laptop works with/is supported by upstream Linux Kernel 6.18 LTS as of 23-10-2026
|
||||
The UEFI firmware of this laptop has an issue where it will cause random system hangs if Hyperthreading is turned off, behavior observed under both Windows and various Linux distros.
|
||||
|
||||
`lspci` output and product name confirmation :
|
||||
|
||||
```bash
|
||||
❯ cat /sys/class/dmi/id/product_name
|
||||
Latitude 3530
|
||||
|
||||
❯ lspci -nnk
|
||||
00:00.0 Host bridge [0600]: Intel Corporation Device [8086:4609] (rev 04)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-UP3 GT1 [UHD Graphics] [8086:46b3] (rev 0c)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: i915
|
||||
Kernel modules: i915, xe
|
||||
00:04.0 Signal processing controller [1180]: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant [8086:461d] (rev 04)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: proc_thermal_pci
|
||||
Kernel modules: processor_thermal_device_pci
|
||||
00:06.0 PCI bridge [0604]: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 [8086:464d] (rev 04)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: pcieport
|
||||
00:07.0 PCI bridge [0604]: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 [8086:466e] (rev 04)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: pcieport
|
||||
00:08.0 System peripheral [0880]: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator [8086:464f] (rev 04)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
00:0d.0 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller [8086:461e] (rev 04)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: xhci_hcd
|
||||
Kernel modules: xhci_pci
|
||||
00:0d.2 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 [8086:463e] (rev 04)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: thunderbolt
|
||||
Kernel modules: thunderbolt
|
||||
00:12.0 Serial controller [0700]: Intel Corporation Alder Lake-P Integrated Sensor Hub [8086:51fc] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: intel_ish_ipc
|
||||
Kernel modules: 8250_pci, intel_ish_ipc
|
||||
00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: xhci_hcd
|
||||
Kernel modules: xhci_pci
|
||||
00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
00:14.3 Network controller [0280]: Intel Corporation Alder Lake-P PCH CNVi WiFi [8086:51f0] (rev 01)
|
||||
Subsystem: Intel Corporation Dual Band Wi-Fi 6(802.11ax) AX201 160MHz 2x2 [Harrison Peak] [8086:4070]
|
||||
Kernel driver in use: iwlwifi
|
||||
Kernel modules: iwlwifi
|
||||
00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: intel-lpss
|
||||
Kernel modules: intel_lpss_pci
|
||||
00:15.1 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 [8086:51e9] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: intel-lpss
|
||||
Kernel modules: intel_lpss_pci
|
||||
00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: mei_me
|
||||
Kernel modules: mei_me
|
||||
00:17.0 SATA controller [0106]: Intel Corporation Alder Lake-P SATA AHCI Controller [8086:51d3] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: ahci
|
||||
Kernel modules: ahci
|
||||
00:1d.0 PCI bridge [0604]: Intel Corporation Alder Lake PCI Express Root Port #9 [8086:51b0] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: pcieport
|
||||
00:1f.0 ISA bridge [0601]: Intel Corporation Alder Lake PCH eSPI Controller [8086:5182] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Alder Lake PCH-P High Definition Audio Controller [8086:51c8] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: sof-audio-pci-intel-tgl
|
||||
Kernel modules: snd_soc_avs, snd_sof_pci_intel_tgl, snd_hda_intel
|
||||
00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: i801_smbus
|
||||
Kernel modules: i2c_i801
|
||||
00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: intel-spi
|
||||
Kernel modules: spi_intel_pci
|
||||
01:00.0 Non-Volatile memory controller [0108]: SK hynix BC901 NVMe Solid State Drive (DRAM-less) [1c5c:1d59] (rev 03)
|
||||
Subsystem: SK hynix BC901 NVMe Solid State Drive (DRAM-less) [1c5c:1d59]
|
||||
Kernel driver in use: nvme
|
||||
Kernel modules: nvme
|
||||
2c:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
|
||||
Subsystem: Dell Device [1028:0bc3]
|
||||
Kernel driver in use: r8169
|
||||
Kernel modules: r8169
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel/alder-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/ssd
|
||||
];
|
||||
}
|
||||
@@ -104,6 +104,7 @@
|
||||
asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h;
|
||||
asus-zephyrus-gu605cw = import ./asus/zephyrus/gu605cw;
|
||||
asus-zephyrus-gu605my = import ./asus/zephyrus/gu605my;
|
||||
bananapi-bpi-sm10 = import ./bananapi/bpi-sm10;
|
||||
beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle;
|
||||
chuwi-minibook-x = import ./chuwi/minibook-x;
|
||||
deciso-dec = import ./deciso/dec;
|
||||
@@ -119,6 +120,7 @@
|
||||
dell-inspiron-7559 = import ./dell/inspiron/7559;
|
||||
dell-latitude-3340 = import ./dell/latitude/3340;
|
||||
dell-latitude-3480 = import ./dell/latitude/3480;
|
||||
dell-latitude-3530 = import ./dell/latitude/3530;
|
||||
dell-latitude-5490 = import ./dell/latitude/5490;
|
||||
dell-latitude-5520 = import ./dell/latitude/5520;
|
||||
dell-latitude-7280 = import ./dell/latitude/7280;
|
||||
@@ -419,6 +421,7 @@
|
||||
purism-librem-15v3 = import ./purism/librem/15v3;
|
||||
purism-librem-5r4 = import ./purism/librem/5r4;
|
||||
razer-blade-14-RZ09-0530 = import ./razer/blade/14/RZ09-0530;
|
||||
raspberry-pi-1 = import ./raspberry-pi/1;
|
||||
raspberry-pi-2 = import ./raspberry-pi/2;
|
||||
raspberry-pi-3 = import ./raspberry-pi/3;
|
||||
raspberry-pi-4 = import ./raspberry-pi/4;
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Preserve the legacy ARMv6 boot configuration rather than opting into the
|
||||
# graphics and camera defaults used by the newer Raspberry Pi profiles.
|
||||
imports = [
|
||||
../common/config-txt.nix
|
||||
../common/firmware.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "armv6l-linux";
|
||||
|
||||
boot = {
|
||||
consoleLogLevel = lib.mkDefault 7;
|
||||
kernelPackages = lib.mkDefault (
|
||||
pkgs.linuxPackagesFor (pkgs.callPackage ../common/kernel.nix { rpiVersion = 1; })
|
||||
);
|
||||
# The vendor defconfig does not provide the generic PCI storage drivers.
|
||||
initrd = {
|
||||
includeDefaultModules = lib.mkDefault false;
|
||||
systemd.tpm2.enable = lib.mkDefault false;
|
||||
availableKernelModules = {
|
||||
mmc_block = true;
|
||||
usb_storage = true;
|
||||
usbhid = true;
|
||||
# EFI variable access is not needed for the U-Boot boot path.
|
||||
efivarfs = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
loader = {
|
||||
grub.enable = lib.mkDefault false;
|
||||
generic-extlinux-compatible.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.raspberry-pi = {
|
||||
configtxt.settings.all = {
|
||||
enable_uart = lib.mkDefault true;
|
||||
avoid_warnings = lib.mkDefault 1;
|
||||
};
|
||||
firmware.uboot = {
|
||||
enable = lib.mkDefault true;
|
||||
package = lib.mkDefault pkgs.ubootRaspberryPi;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/profiles/installation-device.nix"
|
||||
./sd-image.nix
|
||||
];
|
||||
|
||||
# The installation media is also the installation target.
|
||||
installer.cloneConfig = false;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# Adapted from nixpkgs' installer/sd-card/sd-image-raspberrypi.nix.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# The generic installer utilities include EFI tools broken on 32-bit ARM.
|
||||
"${modulesPath}/profiles/minimal.nix"
|
||||
"${modulesPath}/installer/sd-card/sd-image.nix"
|
||||
./default.nix
|
||||
];
|
||||
|
||||
# This image targets the Pi 1, whose vendor kernel lacks generic PCI drivers.
|
||||
hardware.enableAllHardware = lib.mkForce false;
|
||||
|
||||
sdImage = {
|
||||
# The shared firmware installer also copies the device-tree overlays.
|
||||
firmwareSize = lib.mkDefault 128;
|
||||
populateRootCommands = ''
|
||||
mkdir -p ./files/boot
|
||||
${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
|
||||
'';
|
||||
};
|
||||
}
|
||||
+31
-43
@@ -1,50 +1,38 @@
|
||||
{ config, lib, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.hardware.raspberry-pi."4".pwm0;
|
||||
in
|
||||
{
|
||||
options.hardware = {
|
||||
raspberry-pi."4".pwm0 = {
|
||||
enable = lib.mkEnableOption "support for the hardware pwm0 channel on GPIO_18";
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule
|
||||
[
|
||||
"hardware"
|
||||
"raspberry-pi"
|
||||
"4"
|
||||
"pwm0"
|
||||
]
|
||||
''
|
||||
To enable PWM0 on GPIO18, use the pwm firmware overlay:
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.deviceTree = {
|
||||
overlays = [
|
||||
{
|
||||
name = "pwm-overlay";
|
||||
dtsText = ''
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@0 {
|
||||
target = <&gpio>;
|
||||
__overlay__ {
|
||||
pwm_pins: pwm_pins {
|
||||
brcm,pins = <18>;
|
||||
brcm,function = <2>; /* Alt5 */
|
||||
};
|
||||
{
|
||||
boot.loader.generic-extlinux-compatible.useGenerationDeviceTree = false;
|
||||
hardware.raspberry-pi.configtxt.deviceTreeOverlays.pi4 = [
|
||||
{
|
||||
pwm = {
|
||||
pin = 18;
|
||||
func = 2;
|
||||
clock = 100000000;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
fragment@1 {
|
||||
target = <&pwm>;
|
||||
__overlay__ {
|
||||
pinctrl-names = "default";
|
||||
assigned-clock-rates = <100000000>;
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
};
|
||||
};
|
||||
The removed pwm0 module explicitly assigned a 100 MHz clock.
|
||||
Keep clock = 100000000 to preserve that assignment.
|
||||
Without clock, the pwm overlay leaves the base clock configuration unchanged:
|
||||
https://github.com/raspberrypi/linux/blob/rpi-6.18.y/arch/arm/boot/dts/overlays/pwm-overlay.dts
|
||||
|
||||
};
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
Before switching, migrate any remaining hardware.deviceTree.overlays used only in generation DTBs.
|
||||
For firmware installation, read "Device tree overlays" in raspberry-pi/README.md.
|
||||
''
|
||||
)
|
||||
];
|
||||
}
|
||||
@@ -5,8 +5,9 @@ NixOS profiles and modules for Raspberry Pi boards.
|
||||
## What's here
|
||||
|
||||
- `common/` has the shared bits: the `linux-rpi` kernel build (vendor defconfig, matching firmware), the `config.txt` generation module, a pinned wireless firmware, and the firmware-partition install module.
|
||||
- `2/`, `3/`, `4/`, `5/` are the board profiles. Each one picks the right kernel and kernel params. Pi 4 and 5 also set DT filters and the initrd modules they need.
|
||||
- `1/`, `2/`, `3/`, `4/`, `5/` are the board profiles. They select vendor kernels and configure board-specific boot and hardware settings. Pi 4 and 5 also set DT filters and the initrd modules they need.
|
||||
- The extra files under `4/` are opt-in toggles for Pi 4 hardware: audio, GPIO, I2C, LEDs, touchscreens, and so on.
|
||||
- Where provided, `sd-image.nix` and `sd-image-installer.nix` combine a board profile with nixpkgs' SD-image builder, optionally adding the NixOS installation environment.
|
||||
|
||||
## Using a board profile
|
||||
|
||||
@@ -24,7 +25,7 @@ These profiles assume the `generic-extlinux-compatible` bootloader (the NixOS mo
|
||||
|
||||
`hardware.raspberry-pi.firmware` stages the files the Pi firmware needs before Linux starts onto the firmware partition (default `/boot/firmware`): GPU boot code (`bootcode.bin`, `start*.elf`, `fixup*.dat`), vendor device trees and overlays, the rendered `config.txt`, and optionally U-Boot. It is not a new boot method; it just supplies the files the existing `generic-extlinux-compatible` + U-Boot path needs.
|
||||
|
||||
When you build an SD image, the module sets `sdImage.populateFirmwareCommands` itself, so the firmware partition is populated at build time with no extra configuration.
|
||||
When you build an SD image, the module sets `sdImage.populateFirmwareCommands` itself, so the firmware partition is populated at build time with no extra configuration. For cross-compilation, set `nixpkgs.buildPlatform` to the build machine's architecture and `nixpkgs.hostPlatform` to the target board's architecture, unless the profile already selects it.
|
||||
|
||||
For a running system, set `hardware.raspberry-pi.firmware.enable = true`. An activation script then repopulates the firmware partition on every `nixos-rebuild switch`. It is off by default.
|
||||
|
||||
@@ -39,11 +40,11 @@ To chainload U-Boot from the firmware, enable `uboot.enable`. It copies `u-boot.
|
||||
}
|
||||
```
|
||||
|
||||
`uboot.enable` defaults `uboot.package` to nixpkgs' `pkgs.ubootRaspberryPiAarch64`, built from the upstream `rpi_arm64_defconfig`, which covers every 64-bit board (Pi 3/4/5). For a 32-bit board, override `uboot.package` with the matching U-Boot build. On the Pi 5 this boots from SD, but U-Boot can't drive USB/PCIe/RP1 yet, so USB boot, NVMe boot, and a USB keyboard at the U-Boot prompt don't work until Linux takes over.
|
||||
The shared firmware module defaults `uboot.package` to `pkgs.ubootRaspberryPiAarch64`, built from `rpi_arm64_defconfig` for 64-bit Pi 3/4/5 systems. Board profiles can override this default. For 32-bit systems, use the package matching the board: `pkgs.ubootRaspberryPi` for Pi 1, `pkgs.ubootRaspberryPi2` for Pi 2, or `pkgs.ubootRaspberryPi3_32bit` for Pi 3. On the Pi 5 this boots from SD, but U-Boot can't drive USB/PCIe/RP1 yet, so USB boot, NVMe boot, and a USB keyboard at the U-Boot prompt don't work until Linux takes over.
|
||||
|
||||
## `config.txt`
|
||||
|
||||
Board profiles import `hardware.raspberry-pi.configtxt`, which renders `config.txt` from Nix options. The defaults track the Raspberry Pi OS pi-gen image: camera and display autodetect, KMS, audio on, `arm_boost`.
|
||||
Board profiles import `hardware.raspberry-pi.configtxt`, which renders `config.txt` from Nix options. The Pi 2–5 profiles also import `common/config-txt-defaults.nix`, which tracks the Raspberry Pi OS pi-gen image: camera and display autodetect, KMS, audio on, `arm_boost`.
|
||||
|
||||
```nix
|
||||
{
|
||||
@@ -174,4 +175,4 @@ To supply your own file, set `configtxt.file`. The module then ignores `settings
|
||||
|
||||
- No bootloader module: There's no `boot.loader.raspberry-pi` here. Boards rely on `generic-extlinux-compatible` plus U-Boot. Raspberry Pi OS has the GPU firmware load the kernel directly; we go through U-Boot so it reads `extlinux.conf`, which is what gives you the NixOS boot-generation menu and rollbacks. The firmware install module just stages the boot code and (optionally) U-Boot; it doesn't add a firmware-level direct-boot path. Pi 5 boots from SD via U-Boot, but USB, PCIe, and the RP1 don't come up until Linux takes over, so a USB keyboard at the U-Boot prompt won't work on Pi 5 today.
|
||||
- Single pinned kernel: `common/kernel.nix` pins one `linux-rpi` version rather than matching each kernel to its firmware release.
|
||||
- No Pi 0/02/1 board profiles: `common/kernel.nix` accepts `rpiVersion = 1`, but there's no `0/`, `02/`, or `1/` directory wiring that kernel up into a profile you can import via `<nixos-hardware/raspberry-pi/...>`.
|
||||
- No Pi Zero or Zero 2 board profiles.
|
||||
@@ -83,6 +83,18 @@ in
|
||||
PREEMPT = lib.mkForce no;
|
||||
PREEMPT_LAZY = lib.mkForce no;
|
||||
PREEMPT_VOLUNTARY = lib.mkForce yes;
|
||||
}
|
||||
# These controllers are absent on Pi 1. Nixpkgs' automatic module selection
|
||||
# enables them, but they use division helpers unavailable to 32-bit modules.
|
||||
# https://github.com/NixOS/nixpkgs/issues/464515
|
||||
// lib.optionalAttrs (rpiVersion == 1) {
|
||||
PWM_RP1 = no;
|
||||
I2C_DESIGNWARE_CORE = no;
|
||||
I2C_DESIGNWARE_SLAVE = no;
|
||||
I2C_DESIGNWARE_PLATFORM = no;
|
||||
I2C_DESIGNWARE_PCI = no;
|
||||
VIDEO_RP1_CFE = no;
|
||||
VIDEO_RP1_CFE_DOWNSTREAM = no;
|
||||
};
|
||||
|
||||
extraMeta =
|
||||
|
||||
@@ -9,6 +9,8 @@ let
|
||||
blackList = [
|
||||
# does import-from-derivation
|
||||
"toshiba-swanky"
|
||||
# ARMv6 is not covered by the test platforms
|
||||
"raspberry-pi-1"
|
||||
# uses custom nixpkgs config
|
||||
"raspberry-pi-2"
|
||||
# deprecated profiles
|
||||
|
||||
Reference in new issue
Block a user