smolder: Add external PWM fan
This commit is contained in:
parent
6e6aa3c566
commit
626dd6f6d0
58
flake.lock
58
flake.lock
|
@ -63,11 +63,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713543876,
|
"lastModified": 1713946171,
|
||||||
"narHash": "sha256-olEWxacm1xZhAtpq+ZkEyQgR4zgfE7ddpNtZNvubi3g=",
|
"narHash": "sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "9e7c20ffd056e406ddd0276ee9d89f09c5e5f4ed",
|
"rev": "230a197063de9287128e2c68a7a4b0cd7d0b50a7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -329,11 +329,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713809191,
|
"lastModified": 1713992342,
|
||||||
"narHash": "sha256-9Tb5JKcacjxNF1f7gsu/4l4Gxa2qflq9x1hhdl10iwM=",
|
"narHash": "sha256-bW7K4WPo6jhYMo4ZUGoJfog6xJV0XZh8adXqZKunRoc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e866aae5bbbcfe6798ca05d3004a4e62f1828954",
|
"rev": "2f072c127c041eec36621b8e38a531fe0fe07961",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -350,11 +350,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713763883,
|
"lastModified": 1713946567,
|
||||||
"narHash": "sha256-/3aEYe0LEoUy5/1cs9EhcFhT4r8RnbHBziuI40vmK6E=",
|
"narHash": "sha256-gbffQxWoGmq9rmSwM2y4a+VGaTTuXSN+yyRoCkMuRjs=",
|
||||||
"owner": "jovian-experiments",
|
"owner": "jovian-experiments",
|
||||||
"repo": "jovian-nixos",
|
"repo": "jovian-nixos",
|
||||||
"rev": "9bb2ac68cab837aa063b8da40991cecc37de75a1",
|
"rev": "c3255d642c945847c61a867be15de63b8f81d5dc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -395,11 +395,11 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713713879,
|
"lastModified": 1713972932,
|
||||||
"narHash": "sha256-7B3CVSSM8kyDsAJ8wlxL6Rf3StpBTlryiMLXPQlh4nQ=",
|
"narHash": "sha256-5+Mbgk2C8sNm7J2CNSi21YYTf3T6ow4QvgM+YX/t9pg=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "4206635f9140a12ae2e3f1d49714ddfcf44fd2f8",
|
"rev": "8175e47ce5ddf3bde64eb0a0f589a307a317c2bb",
|
||||||
"revCount": 15414,
|
"revCount": 15425,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@lix.systems/lix-project/lix"
|
"url": "ssh://git@lix.systems/lix-project/lix"
|
||||||
},
|
},
|
||||||
|
@ -423,11 +423,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713758264,
|
"lastModified": 1713823914,
|
||||||
"narHash": "sha256-x7uHPs9qI9hhWW4BJnJaTSX2KO1CGq/ltUR8XlUpYoQ=",
|
"narHash": "sha256-phAcUYvh3tuCTCBkB/i4cfU4QafrNub6rvRqD2Wcbt4=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "71f268f215dbd6d8755813d9674a4cd588f10552",
|
"rev": "21907b875dcc5472faea29a0eabf114966fcff84",
|
||||||
"revCount": 51,
|
"revCount": 53,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@lix.systems/lix-project/nixos-module"
|
"url": "ssh://git@lix.systems/lix-project/nixos-module"
|
||||||
},
|
},
|
||||||
|
@ -443,11 +443,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713668931,
|
"lastModified": 1713869268,
|
||||||
"narHash": "sha256-rVlwWQlgFGGK3aPVcKmtYqWgjYnPah5FOIsYAqrMN2w=",
|
"narHash": "sha256-o3CMQeu/S8/4zU0pMtYg51rd1FWdJsI2Xohzng1Ysdg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "07ece11b22217b8459df589f858e92212b74f1a1",
|
"rev": "dcb6ac44922858ce3a5b46f77a36d6030181460c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -458,11 +458,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713521961,
|
"lastModified": 1713864415,
|
||||||
"narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=",
|
"narHash": "sha256-/BPDMJEkrsFAFOsQWhwm31wezlgshPFlLBn34KEUdVA=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2",
|
"rev": "797f8d8082c7cc3259cba7275c699d4991b09ecc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -473,11 +473,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713714899,
|
"lastModified": 1713895582,
|
||||||
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=",
|
"narHash": "sha256-cfh1hi+6muQMbi9acOlju3V1gl8BEaZBXBR9jQfQi4U=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6143fc5eeb9c4f00163267708e26191d1e918932",
|
"rev": "572af610f6151fd41c212f897c71f7056e3fb518",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -520,11 +520,11 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713812755,
|
"lastModified": 1713939051,
|
||||||
"narHash": "sha256-L6z7NY0UMbO5DKFFjUleIGcuAt8XwOvD0YUVUqSeGBw=",
|
"narHash": "sha256-EwDbsFjpXANXd2MIvRm4Bz2CDNWIhlV/659xOAxhEv0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "6ebd538ede5a0de49253620828ba28dc57988305",
|
"rev": "f2f97d844bb39559f3356e209b49c92900d860b8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
hardware.deviceTree.filter = "rk3588-rock-5b.dtb";
|
hardware.deviceTree = {
|
||||||
|
filter = "rk3588-rock-5b.dtb";
|
||||||
|
overlays = [
|
||||||
|
{
|
||||||
|
name = "fan";
|
||||||
|
dtsFile = ./fan.dts;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.grub.enable = false;
|
loader.grub.enable = false;
|
||||||
|
|
43
system/smolder/fan.dts
Normal file
43
system/smolder/fan.dts
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/dts-v1/;
|
||||||
|
/plugin/;
|
||||||
|
|
||||||
|
#include <dt-bindings/interrupt-controller/irq.h>
|
||||||
|
#include <dt-bindings/pinctrl/rockchip.h>
|
||||||
|
#include <dt-bindings/usb/pd.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "radxa,rock-5b";
|
||||||
|
|
||||||
|
fragment@0 {
|
||||||
|
target-path = "/";
|
||||||
|
__overlay__ {
|
||||||
|
vcc12v_dcin: vcc12v-dcin-regulator {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc12v_dcin";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <12000000>;
|
||||||
|
regulator-max-microvolt = <12000000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fragment@1 {
|
||||||
|
target-path = "/";
|
||||||
|
__overlay__ {
|
||||||
|
ext_fan: ext-fan {
|
||||||
|
compatible = "pwm-fan";
|
||||||
|
cooling-levels = <0 95 145 195 255>;
|
||||||
|
fan-supply = <&vcc12v_dcin>;
|
||||||
|
pwms = <&pwm12 0 50000 0>;
|
||||||
|
#cooling-cells = <2>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@2 {
|
||||||
|
target = <&pwm12>;
|
||||||
|
__overlay__ {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
Loading…
Reference in a new issue