forked from NixOS/nixos-hardware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
77 lines (70 loc) · 1.7 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{ lib
, ...
}:
{
boot.loader = {
grub.enable = lib.mkDefault false;
# Enables the generation of /boot/extlinux/extlinux.conf.
generic-extlinux-compatible = {
enable = lib.mkDefault true;
useGenerationDeviceTree = true;
};
};
# This file needs to be at the top of /boot
hardware.deviceTree.name = lib.mkDefault "../../rk3568-nanopi-r5s.dtb";
boot.kernelParams = [
"console=tty1"
"console=ttyS2,1500000"
"earlycon=uart8250,mmio32,0xfe660000"
];
boot.kernelPatches = [
{
name = "rockchip-config.patch";
patch = null;
extraConfig = ''
PCIE_ROCKCHIP_EP y
PCIE_ROCKCHIP_DW_HOST y
ROCKCHIP_VOP2 y
'';
}
{
name = "status-leds.patch";
patch = null;
extraConfig = ''
LED_TRIGGER_PHY y
USB_LED_TRIG y
LEDS_BRIGHTNESS_HW_CHANGED y
LEDS_TRIGGER_MTD y
'';
}
];
boot.initrd.availableKernelModules = [
## Rockchip
## Storage
"sdhci_of_dwcmshc"
"dw_mmc_rockchip"
"analogix_dp"
"io-domain"
"rockchip_saradc"
"rockchip_thermal"
"rockchipdrm"
"rockchip-rga"
"pcie_rockchip_host"
"phy-rockchip-pcie"
"phy_rockchip_snps_pcie3"
"phy_rockchip_naneng_combphy"
"phy_rockchip_inno_usb2"
"dwmac_rk"
"dw_wdt"
"dw_hdmi"
"dw_hdmi_cec"
"dw_hdmi_i2s_audio"
"dw_mipi_dsi"
];
# Most Rockchip CPUs (especially with hybrid cores) work best with "schedutil"
powerManagement.cpuFreqGovernor = "schedutil";
# Let's blacklist the Rockchips RTC module so that the
# battery-powered HYM8563 (rtc_hym8563 kernel module) will be used
# by default
boot.blacklistedKernelModules = [ "rtc_rk808" ];
}