623: Add HP Elitebook 845g9 r=Mic92 a=tesujimath



624: change default pstate mode for AMD cpus r=Mic92 a=aacebedo



627: raspberry-pi."4": update poe hat overlay to work with newer kernel r=Mic92 a=gador



Co-authored-by: Simon Guest <simon.guest@tesujimath.org>
Co-authored-by: Alexandre Acebedo <alexandre@acebedo.fr>
Co-authored-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
bors[bot] 2023-05-15 16:54:26 +00:00 committed by GitHub
commit 71ce85372a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 208 additions and 140 deletions

View file

@ -131,6 +131,7 @@ See code for all available configurations.
| [GPD WIN 2](gpd/win-2) | `<nixos-hardware/gpd/win-2>` | | [GPD WIN 2](gpd/win-2) | `<nixos-hardware/gpd/win-2>` |
| [Google Pixelbook](google/pixelbook) | `<nixos-hardware/google/pixelbook>` | | [Google Pixelbook](google/pixelbook) | `<nixos-hardware/google/pixelbook>` |
| [HP Elitebook 2560p](hp/elitebook/2560p) | `<nixos-hardware/hp/elitebook/2560p>` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `<nixos-hardware/hp/elitebook/2560p>` |
| [HP Elitebook 845g9](hp/elitebook/845/g9) | `<nixos-hardware/hp/elitebook/845/g9>` |
| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `<nixos-hardware/nxp/imx8qm-mek>` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `<nixos-hardware/nxp/imx8qm-mek>` |
| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `<nixos-hardware/intel/nuc/8i7beh>` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `<nixos-hardware/intel/nuc/8i7beh>` |
| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `<nixos-hardware/lenovo/ideapad/15arh05>` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `<nixos-hardware/lenovo/ideapad/15arh05>` |

View file

@ -8,15 +8,25 @@ in
imports = [ ./. ]; imports = [ ./. ];
boot = lib.mkMerge [ boot = lib.mkMerge [
(lib.mkIf ( (lib.mkIf
(
(lib.versionAtLeast kver "5.17") (lib.versionAtLeast kver "5.17")
&& (lib.versionOlder kver "6.1") && (lib.versionOlder kver "6.1")
) { )
{
kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ];
kernelModules = [ "amd-pstate" ]; kernelModules = [ "amd-pstate" ];
}) })
(lib.mkIf (lib.versionAtLeast kver "6.1") { (lib.mkIf
(
(lib.versionAtLeast kver "6.1")
&& (lib.versionOlder kver "6.3")
)
{
kernelParams = [ "amd_pstate=passive" ]; kernelParams = [ "amd_pstate=passive" ];
}) })
(lib.mkIf (lib.versionAtLeast kver "6.3") {
kernelParams = [ "amd_pstate=active" ];
})
]; ];
} }

View file

@ -65,6 +65,7 @@
gpd-pocket-3 = import ./gpd/pocket-3; gpd-pocket-3 = import ./gpd/pocket-3;
gpd-win-2 = import ./gpd/win-2; gpd-win-2 = import ./gpd/win-2;
hp-elitebook-2560p = import ./hp/elitebook/2560p; hp-elitebook-2560p = import ./hp/elitebook/2560p;
hp-elitebook-845g9 = import ./hp/elitebook/845/g9;
intel-nuc-8i7beh = import ./intel/nuc/8i7beh; intel-nuc-8i7beh = import ./intel/nuc/8i7beh;
lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05;
lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510;

View file

@ -0,0 +1,25 @@
{ config, pkgs, lib, ... }:
{
imports =
[
../../../../common/cpu/amd
../../../../common/cpu/amd/pstate.nix
../../../../common/gpu/amd
../../../../common/pc/laptop
../../../../common/pc/laptop/acpi_call.nix
../../../../common/pc/laptop/ssd
];
hardware.enableRedistributableFirmware = lib.mkDefault true;
boot.kernelModules = [ "synaptics_usb" ];
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") (lib.mkDefault pkgs.linuxPackages_latest);
# disable Scatter/Gather APU recently enabled by default,
# which results in white screen after display reconfiguration
boot.kernelParams = [ "amdgpu.sg_display=0" ];
services.xserver = {
videoDrivers = [ "amdgpu" ];
};
}

View file

@ -16,8 +16,9 @@ in
hardware.deviceTree = { hardware.deviceTree = {
overlays = [ overlays = [
# This overlay was originally taken from: # This overlay was originally taken from:
# https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts
# The only modification made was to change the compatible field to bcm2711 # The only modification made was to change the compatible field to bcm2711
# this is the same as for the 5.15.y kernel
{ {
name = "rpi-backlight-overlay"; name = "rpi-backlight-overlay";
dtsText = '' dtsText = ''

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { lib, pkgs, config, ... }:
{ {
imports = [ imports = [
@ -32,7 +32,15 @@
}; };
}; };
hardware.deviceTree.filter = "bcm2711-rpi-*.dtb"; hardware.deviceTree.filter = lib.mkDefault "bcm2711-rpi-*.dtb";
assertions = [
{
assertion = (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1");
message = "This version of raspberry pi 4 dts overlays requires a newer kernel version (>=6.1). Please upgrade nixpkgs for this system.";
}
];
# Required for the Wireless firmware # Required for the Wireless firmware
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;

View file

@ -31,7 +31,7 @@ in
hardware.deviceTree = { hardware.deviceTree = {
overlays = [ overlays = [
# Equivalent to: # Equivalent to:
# https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/cma-overlay.dts # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/cma-overlay.dts
{ {
name = "rpi4-cma-overlay"; name = "rpi4-cma-overlay";
dtsText = '' dtsText = ''
@ -52,7 +52,7 @@ in
''; '';
} }
# Equivalent to: # Equivalent to:
# https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts
{ {
name = "rpi4-vc4-fkms-v3d-overlay"; name = "rpi4-vc4-fkms-v3d-overlay";
dtsText = '' dtsText = ''

View file

@ -13,10 +13,12 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
# doesn't work for the CM module, so we exclude e.g. bcm2711-rpi-cm4.dts
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
hardware.deviceTree = { hardware.deviceTree = {
overlays = [ overlays = [
# Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts # Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
{ {
name = "rpi-poe-overlay"; name = "rpi-poe-overlay";
dtsText = '' dtsText = ''
@ -44,7 +46,13 @@ in {
fragment@1 { fragment@1 {
target = <&cpu_thermal>; target = <&cpu_thermal>;
__overlay__ { __overlay__ {
trips { polling-delay = <2000>; /* milliseconds */
};
};
fragment@2 {
target = <&thermal_trips>;
__overlay__ {
trip0: trip0 { trip0: trip0 {
temperature = <40000>; temperature = <40000>;
hysteresis = <2000>; hysteresis = <2000>;
@ -66,7 +74,11 @@ in {
type = "active"; type = "active";
}; };
}; };
cooling-maps { };
fragment@3 {
target = <&cooling_maps>;
__overlay__ {
map0 { map0 {
trip = <&trip0>; trip = <&trip0>;
cooling-device = <&fan 0 1>; cooling-device = <&fan 0 1>;
@ -85,9 +97,8 @@ in {
}; };
}; };
}; };
};
fragment@2 { fragment@4 {
target-path = "/__overrides__"; target-path = "/__overrides__";
params: __overlay__ { params: __overlay__ {
poe_fan_temp0 = <&trip0>,"temperature:0"; poe_fan_temp0 = <&trip0>,"temperature:0";
@ -104,7 +115,7 @@ in {
}; };
}; };
fragment@3 { fragment@5 {
target = <&firmware>; target = <&firmware>;
__overlay__ { __overlay__ {
fwpwm: pwm { fwpwm: pwm {
@ -114,7 +125,7 @@ in {
}; };
}; };
fragment@4 { fragment@6 {
target = <&i2c0>; target = <&i2c0>;
i2c_bus: __overlay__ { i2c_bus: __overlay__ {
#address-cells = <1>; #address-cells = <1>;
@ -135,14 +146,14 @@ in {
}; };
}; };
fragment@5 { fragment@7 {
target = <&i2c0if>; target = <&i2c0if>;
__dormant__ { __dormant__ {
status = "okay"; status = "okay";
}; };
}; };
fragment@6 { fragment@8 {
target = <&i2c0mux>; target = <&i2c0mux>;
__dormant__ { __dormant__ {
status = "okay"; status = "okay";

View file

@ -13,12 +13,14 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
# doesn't work for the CM module, so we exclude e.g. bcm2711-rpi-cm4.dts
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
hardware.deviceTree = { hardware.deviceTree = {
overlays = [ overlays = [
# Combined equivalent to: # Combined equivalent to:
# * https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts # * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
# * https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts # * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts
{ {
name = "rpi-poe-plus-overlay"; name = "rpi-poe-plus-overlay";
dtsText = '' dtsText = ''
@ -46,7 +48,13 @@ in {
fragment@1 { fragment@1 {
target = <&cpu_thermal>; target = <&cpu_thermal>;
__overlay__ { __overlay__ {
trips { polling-delay = <2000>; /* milliseconds */
};
};
fragment@2 {
target = <&thermal_trips>;
__overlay__ {
trip0: trip0 { trip0: trip0 {
temperature = <40000>; temperature = <40000>;
hysteresis = <2000>; hysteresis = <2000>;
@ -68,7 +76,11 @@ in {
type = "active"; type = "active";
}; };
}; };
cooling-maps { };
fragment@3 {
target = <&cooling_maps>;
__overlay__ {
map0 { map0 {
trip = <&trip0>; trip = <&trip0>;
cooling-device = <&fan 0 1>; cooling-device = <&fan 0 1>;
@ -87,9 +99,8 @@ in {
}; };
}; };
}; };
};
fragment@2 { fragment@4 {
target-path = "/__overrides__"; target-path = "/__overrides__";
params: __overlay__ { params: __overlay__ {
poe_fan_temp0 = <&trip0>,"temperature:0"; poe_fan_temp0 = <&trip0>,"temperature:0";
@ -106,7 +117,7 @@ in {
}; };
}; };
fragment@3 { fragment@5 {
target = <&firmware>; target = <&firmware>;
__overlay__ { __overlay__ {
fwpwm: pwm { fwpwm: pwm {
@ -116,7 +127,7 @@ in {
}; };
}; };
fragment@4 { fragment@6 {
target = <&i2c0>; target = <&i2c0>;
i2c_bus: __overlay__ { i2c_bus: __overlay__ {
#address-cells = <1>; #address-cells = <1>;
@ -137,14 +148,14 @@ in {
}; };
}; };
fragment@5 { fragment@7 {
target = <&i2c0if>; target = <&i2c0if>;
__dormant__ { __dormant__ {
status = "okay"; status = "okay";
}; };
}; };
fragment@6 { fragment@8 {
target = <&i2c0mux>; target = <&i2c0mux>;
__dormant__ { __dormant__ {
status = "okay"; status = "okay";