summaryrefslogtreecommitdiff
path: root/zephyr/projects/npcx_evb/npcx9/fan.dts
diff options
context:
space:
mode:
authorWealian Liao <whliao@nuvoton.corp-partner.google.com>2021-07-06 14:24:44 +0800
committerCommit Bot <commit-bot@chromium.org>2021-08-02 23:09:47 +0000
commit81ea35f9c0ca50aa3c7013beaf8cd4decd821fc3 (patch)
tree350c986ba5b76f0bb35380dcdc202c1f008b6496 /zephyr/projects/npcx_evb/npcx9/fan.dts
parent01cf7dd4c94a48cde96f5578f53026c85d2e1fa7 (diff)
downloadchrome-ec-81ea35f9c0ca50aa3c7013beaf8cd4decd821fc3.tar.gz
zephyr: npcx_evb: Enable fan
This CL enables fan functionality for npcx7/9_evb BUG=none BRANCH=none TEST='fanset', 'fanduty', 'faninfo' console command ``` uart:~$ fanset 50% Fan rpm given as 50% Setting fan 0 rpm target to 3078 uart:~$ faninfo Actual: 2943 rpm Target: 3078 rpm Duty: 38% Status: 2 (locked) Mode: rpm Auto: no Enable: yes Power: yes ``` Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I836e1dd62a712bac887d4d12d34541c8c8043a83 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3063105 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/projects/npcx_evb/npcx9/fan.dts')
-rw-r--r--zephyr/projects/npcx_evb/npcx9/fan.dts29
1 files changed, 29 insertions, 0 deletions
diff --git a/zephyr/projects/npcx_evb/npcx9/fan.dts b/zephyr/projects/npcx_evb/npcx9/fan.dts
new file mode 100644
index 0000000000..de2852d73a
--- /dev/null
+++ b/zephyr/projects/npcx_evb/npcx9/fan.dts
@@ -0,0 +1,29 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/ {
+ named-fans {
+ compatible = "named-fans";
+
+ fan_0 {
+ label = "FAN_0";
+ pwm = <&pwm_fan>;
+ rpm_min = <1000>;
+ rpm_start = <1000>;
+ rpm_max = <5200>;
+ tach = <&tach1>;
+ pgood_gpio = <&gpio_pgood_fan>;
+ };
+ };
+};
+
+/* Tachometer for fan speed measurement */
+&tach1 {
+ status = "okay";
+ pinctrl-0 = <&alt3_ta1_sl1>; /* Use TA1 as input pin */
+ 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 */
+};