mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-09 16:16:21 +01:00
Merge branch 'master' into lenovo-legion-16irx8h-audio-fix
This commit is contained in:
commit
427956eeb5
|
|
@ -133,6 +133,7 @@ See code for all available configurations.
|
||||||
| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/nvidia/) | `<nixos-hardware/asus/zenbook/ux481/nvidia>` | `asus-zenbook-ux481-nvidia` |
|
| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/nvidia/) | `<nixos-hardware/asus/zenbook/ux481/nvidia>` | `asus-zenbook-ux481-nvidia` |
|
||||||
| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `<nixos-hardware/asus/zenbook/ux371>` | `asus-zenbook-ux371` |
|
| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `<nixos-hardware/asus/zenbook/ux371>` | `asus-zenbook-ux371` |
|
||||||
| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `<nixos-hardware/asus/zenbook/ux535>` | `asus-zenbook-ux535` |
|
| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `<nixos-hardware/asus/zenbook/ux535>` | `asus-zenbook-ux535` |
|
||||||
|
| [Asus Zenbook Pro 17 UM6702](asus/zenbook/um6702/) | `<nixos-hardware/asus/zenbook/um6702>` | `asus-zenbook-um6702` |
|
||||||
| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `<nixos-hardware/beagleboard/pocketbeagle>` | `beagleboard-pocketbeagle` |
|
| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `<nixos-hardware/beagleboard/pocketbeagle>` | `beagleboard-pocketbeagle` |
|
||||||
| [Chuwi MiniBook X](chuwi/minibook-x) | `<nixos-hardware/chuwi/minibook-x>` | `chuwi-minibook-x` |
|
| [Chuwi MiniBook X](chuwi/minibook-x) | `<nixos-hardware/chuwi/minibook-x>` | `chuwi-minibook-x` |
|
||||||
| [Deciso DEC series](deciso/dec) | `<nixos-hardware/deciso/dec>` | `deciso-dec` |
|
| [Deciso DEC series](deciso/dec) | `<nixos-hardware/deciso/dec>` | `deciso-dec` |
|
||||||
|
|
@ -445,4 +446,3 @@ See code for all available configurations.
|
||||||
| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `<nixos-hardware/tuxedo/pulse/15/gen2>` | `tuxedo-pulse-15-gen2` |
|
| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `<nixos-hardware/tuxedo/pulse/15/gen2>` | `tuxedo-pulse-15-gen2` |
|
||||||
| [Xiaomi Redmibook 15 Pro 2021](xiaomi/redmibook/15-pro-2021) | `<nixos-hardware/xiaomi/redmibook/15-pro-2021>` | `xiaomi-redmibook-15-pro-2021` |
|
| [Xiaomi Redmibook 15 Pro 2021](xiaomi/redmibook/15-pro-2021) | `<nixos-hardware/xiaomi/redmibook/15-pro-2021>` | `xiaomi-redmibook-15-pro-2021` |
|
||||||
| [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `<nixos-hardware/xiaomi/redmibook/16-pro-2024>` | `xiaomi-redmibook-16-pro-2024` |
|
| [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `<nixos-hardware/xiaomi/redmibook/16-pro-2024>` | `xiaomi-redmibook-16-pro-2024` |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,14 @@ in
|
||||||
wantedBy = [
|
wantedBy = [
|
||||||
"local-fs.target"
|
"local-fs.target"
|
||||||
"suspend.target"
|
"suspend.target"
|
||||||
|
"suspend-then-hibernate.target"
|
||||||
|
"hibernate.target"
|
||||||
];
|
];
|
||||||
after = [
|
after = [
|
||||||
"local-fs.target"
|
"local-fs.target"
|
||||||
"suspend.target"
|
"suspend.target"
|
||||||
|
"suspend-then-hibernate.target"
|
||||||
|
"hibernate.target"
|
||||||
];
|
];
|
||||||
description = "Set the battery charge threshold to ${toString cfg.chargeUpto}%";
|
description = "Set the battery charge threshold to ${toString cfg.chargeUpto}%";
|
||||||
startLimitBurst = 5;
|
startLimitBurst = 5;
|
||||||
|
|
|
||||||
36
asus/zenbook/um6702/default.nix
Normal file
36
asus/zenbook/um6702/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkDefault;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../../common/cpu/amd
|
||||||
|
../../../common/cpu/amd/pstate.nix
|
||||||
|
|
||||||
|
# iGPU
|
||||||
|
../../../common/gpu/amd
|
||||||
|
|
||||||
|
# dGPU
|
||||||
|
../../../common/gpu/nvidia/prime.nix
|
||||||
|
../../../common/gpu/nvidia/ampere
|
||||||
|
|
||||||
|
../../../common/pc/laptop
|
||||||
|
../../../common/pc/ssd
|
||||||
|
|
||||||
|
../../battery.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
dynamicBoost.enable = mkDefault true;
|
||||||
|
|
||||||
|
powerManagement = {
|
||||||
|
enable = mkDefault true;
|
||||||
|
finegrained = mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
prime = {
|
||||||
|
amdgpuBusId = "PCI:1:0:0";
|
||||||
|
nvidiaBusId = "PCI:101:0:0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -50,6 +50,7 @@
|
||||||
asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie;
|
asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie;
|
||||||
asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs;
|
asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs;
|
||||||
asus-rog-strix-x570e = import ./asus/rog-strix/x570e;
|
asus-rog-strix-x570e = import ./asus/rog-strix/x570e;
|
||||||
|
asus-zenbook-um6702 = import ./asus/zenbook/um6702;
|
||||||
asus-zenbook-ux371 = import ./asus/zenbook/ux371;
|
asus-zenbook-ux371 = import ./asus/zenbook/ux371;
|
||||||
asus-zenbook-ux535 = import ./asus/zenbook/ux535;
|
asus-zenbook-ux535 = import ./asus/zenbook/ux535;
|
||||||
asus-zenbook-ux481-intelgpu = import ./asus/zenbook/ux481/intelgpu;
|
asus-zenbook-ux481-intelgpu = import ./asus/zenbook/ux481/intelgpu;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,13 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3;
|
boot = {
|
||||||
|
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3;
|
||||||
|
initrd.availableKernelModules = [
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# fix the following error :
|
# fix the following error :
|
||||||
# modprobe: FATAL: Module ahci not found in directory
|
# modprobe: FATAL: Module ahci not found in directory
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".audio = {
|
raspberry-pi."4".audio = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "configuration for audio";
|
||||||
configuration for audio
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".backlight = {
|
raspberry-pi."4".backlight = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "the backlight support for the Raspberry Pi official Touch Display";
|
||||||
Enable the backlight support for the Raspberry Pi official Touch Display
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".bluetooth = {
|
raspberry-pi."4".bluetooth = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "configuration for bluetooth";
|
||||||
configuration for bluetooth
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,13 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".digi-amp-plus = {
|
raspberry-pi."4".digi-amp-plus = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the IQaudIO DigiAMP+ Hat";
|
||||||
support for the IQaudIO DigiAMP+ Hat.
|
|
||||||
'';
|
|
||||||
|
|
||||||
unmuteAmp = lib.mkOption {
|
unmuteAmp = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
"one-shot" unmute when kernel module first loads.
|
Whether to "one-shot" unmute when kernel module first loads.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,24 +6,29 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".dwc2 = {
|
raspberry-pi."4".dwc2 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkOption {
|
||||||
Enable the UDC controller to support USB OTG gadget functions.
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = ''
|
||||||
|
Enable the UDC controller to support USB OTG gadget functions.
|
||||||
|
|
||||||
In order to verify that this works, connect the Raspberry Pi with
|
In order to verify that this works, connect the Raspberry Pi with
|
||||||
another computer via the USB C cable, and then do one of:
|
another computer via the USB C cable, and then do one of:
|
||||||
|
|
||||||
- `modprobe g_serial`
|
- `modprobe g_serial`
|
||||||
- `modprobe g_mass_storage file=/path/to/some/iso-file.iso`
|
- `modprobe g_mass_storage file=/path/to/some/iso-file.iso`
|
||||||
|
|
||||||
On the Raspberry Pi, `dmesg` should then show success-indicating output
|
On the Raspberry Pi, `dmesg` should then show success-indicating output
|
||||||
that is related to the dwc2 and g_serial/g_mass_storage modules.
|
that is related to the dwc2 and g_serial/g_mass_storage modules.
|
||||||
On the other computer, a serial/mass-storage device should pop up in
|
On the other computer, a serial/mass-storage device should pop up in
|
||||||
the system logs.
|
the system logs.
|
||||||
|
|
||||||
For more information about what gadget functions exist along with handy
|
For more information about what gadget functions exist along with handy
|
||||||
guides on how to test them, please refer to:
|
guides on how to test them, please refer to:
|
||||||
https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt
|
https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
dr_mode = lib.mkOption {
|
dr_mode = lib.mkOption {
|
||||||
type = lib.types.enum [
|
type = lib.types.enum [
|
||||||
"host"
|
"host"
|
||||||
|
|
|
||||||
|
|
@ -31,28 +31,32 @@ in
|
||||||
{
|
{
|
||||||
options.hardware.raspberry-pi."4" = {
|
options.hardware.raspberry-pi."4" = {
|
||||||
i2c0 = {
|
i2c0 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group.
|
description = ''
|
||||||
After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c.
|
Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group.
|
||||||
'';
|
After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c.
|
||||||
|
'';
|
||||||
|
};
|
||||||
frequency = lib.mkOption {
|
frequency = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.int;
|
type = lib.types.nullOr lib.types.int;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
interface clock-frequency
|
The interface clock-frequency to configure.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
i2c1 = {
|
i2c1 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group.
|
description = ''
|
||||||
After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c.
|
Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group.
|
||||||
'';
|
After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c.
|
||||||
|
'';
|
||||||
|
};
|
||||||
frequency = lib.mkOption {
|
frequency = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.int;
|
type = lib.types.nullOr lib.types.int;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
interface clock-frequency
|
The interface clock-frequency to configure.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,12 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".apply-overlays-dtmerge = {
|
raspberry-pi."4".apply-overlays-dtmerge = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi.
|
description = ''
|
||||||
this can resolve issues with applying dtbs for the pi.
|
Whether replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi.
|
||||||
'';
|
This can resolve issues with applying dtbs for the pi.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".poe-hat = {
|
raspberry-pi."4".poe-hat = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the Raspberry Pi POE Hat";
|
||||||
support for the Raspberry Pi POE Hat.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".poe-plus-hat = {
|
raspberry-pi."4".poe-plus-hat = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the Raspberry Pi PoE+ HAT";
|
||||||
support for the Raspberry Pi PoE+ HAT.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".pwm0 = {
|
raspberry-pi."4".pwm0 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the hardware pwm0 channel on GPIO_18";
|
||||||
Enable support for the hardware pwm0 channel on GPIO_18
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,15 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".tc358743 = {
|
raspberry-pi."4".tc358743 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
Enable support for the Toshiba TC358743 HDMI-to-CSI-2 converter.
|
description = ''
|
||||||
|
Enable support for the Toshiba TC358743 HDMI-to-CSI-2 converter.
|
||||||
|
|
||||||
This can be tested with a plugged in converter device and for example
|
This can be tested with a plugged in converter device and for example
|
||||||
running ustreamer (which starts webservice providing a camera stream):
|
running ustreamer (which starts webservice providing a camera stream):
|
||||||
''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings
|
''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
lanes = lib.mkOption {
|
lanes = lib.mkOption {
|
||||||
type = lib.types.enum [
|
type = lib.types.enum [
|
||||||
2
|
2
|
||||||
|
|
@ -23,11 +25,13 @@ in
|
||||||
Number of CSI lanes available
|
Number of CSI lanes available
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
media-controller = lib.mkEnableOption ''
|
media-controller = lib.mkEnableOption "" // {
|
||||||
Enable support for the Media Controller API.
|
description = ''
|
||||||
|
Enable support for the Media Controller API.
|
||||||
|
|
||||||
See https://forums.raspberrypi.com/viewtopic.php?t=322076 for details
|
See https://forums.raspberrypi.com/viewtopic.php?t=322076 for details
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,18 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".touch-ft5406 = {
|
raspberry-pi."4".touch-ft5406 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
Enable the touch controller of the official Raspberry Pi touch diplay.
|
description = ''
|
||||||
|
Enable the touch controller of the official Raspberry Pi touch diplay.
|
||||||
|
|
||||||
The overlay is taken from the official Raspberry Pi Linux fork, and
|
The overlay is taken from the official Raspberry Pi Linux fork, and
|
||||||
the `compatible` field is updated to match the target device tree.
|
the `compatible` field is updated to match the target device tree.
|
||||||
https://github.com/raspberrypi/linux/blob/14b35093ca68bf2c81bbc90aace5007142b40b40/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts
|
https://github.com/raspberrypi/linux/blob/14b35093ca68bf2c81bbc90aace5007142b40b40/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts
|
||||||
|
|
||||||
For more information about the touch display, please refer to:
|
For more information about the touch display, please refer to:
|
||||||
https://www.raspberrypi.com/documentation/accessories/display.html
|
https://www.raspberrypi.com/documentation/accessories/display.html
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".tv-hat = {
|
raspberry-pi."4".tv-hat = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the Raspberry Pi TV Hat";
|
||||||
support for the Raspberry Pi TV Hat.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
@ -22,7 +20,7 @@ in
|
||||||
dtsText = "
|
dtsText = "
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/{
|
/{
|
||||||
compatible = \"brcm,bcm2711\";
|
compatible = \"brcm,bcm2711\";
|
||||||
fragment@0 {
|
fragment@0 {
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".xhci = {
|
raspberry-pi."4".xhci = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "builtin XHCI controller for USB with otg_mode=1 in config.txt";
|
||||||
Enable builtin XHCI controller for USB with otg_mode=1 in config.txt
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue