summaryrefslogtreecommitdiff
path: root/zephyr/projects/skyrim/fan.dts
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/projects/skyrim/fan.dts')
-rw-r--r--zephyr/projects/skyrim/fan.dts39
1 files changed, 39 insertions, 0 deletions
diff --git a/zephyr/projects/skyrim/fan.dts b/zephyr/projects/skyrim/fan.dts
new file mode 100644
index 0000000000..f0bc28cb7e
--- /dev/null
+++ b/zephyr/projects/skyrim/fan.dts
@@ -0,0 +1,39 @@
+/* Copyright 2021 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/ {
+ fans {
+ compatible = "cros-ec,fans";
+
+ fan_0 {
+ pwms = <&pwm0 0 PWM_KHZ(25) PWM_POLARITY_NORMAL>;
+ rpm_min = <3100>;
+ rpm_start = <3100>;
+ rpm_max = <8000>;
+ tach = <&tach1>;
+ pgood_gpio = <&gpio_s0_pgood>;
+ };
+ };
+};
+
+/* Tachemeter for fan speed measurement */
+&tach1 {
+ status = "okay";
+ pinctrl-0 = <&ta1_1_in_gp40>;
+ pinctrl-names = "default";
+ port = <NPCX_TACH_PORT_A>; /* port-A is selected */
+ sample-clk = <NPCX_TACH_FREQ_LFCLK>; /* Use LFCLK as sampling clock */
+ pulses-per-round = <2>; /* number of pulses per round of encoder */
+};
+
+&pwm0_gpc3 {
+ drive-open-drain;
+};
+
+&pwm0 {
+ status = "okay";
+ pinctrl-0 = <&pwm0_gpc3>;
+ pinctrl-names = "default";
+};