nixos-config/system/smolder/fan.dts

46 lines
937 B
Plaintext
Raw Normal View History

2024-04-25 02:40:11 +00:00
/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>;
2024-04-25 02:50:22 +00:00
pulses-per-revolution = <2>;
interrupt-parent = <&gpio3>;
interrupts = <RK_PC3 IRQ_TYPE_EDGE_FALLING>;
2024-04-25 02:40:11 +00:00
};
};
};
fragment@2 {
target = <&pwm12>;
__overlay__ {
status = "okay";
};
};
};