summaryrefslogtreecommitdiff
path: root/zephyr/projects/npcx_evb/npcx7/pwm.dts
diff options
context:
space:
mode:
authorWealian Liao <whliao@nuvoton.corp-partner.google.com>2021-07-06 10:59:58 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-30 17:56:00 +0000
commit5f8e59c305bd8f9497a7409a0d27e034896e4038 (patch)
tree1c69569347dc40d55eebd9c7ab66a1e78e5346f4 /zephyr/projects/npcx_evb/npcx7/pwm.dts
parent7bf38c623e11a98c24aa28ed9cb5c08516a7853b (diff)
downloadchrome-ec-5f8e59c305bd8f9497a7409a0d27e034896e4038.tar.gz
zephyr: npcx_evb: Enable PWM
This CL enables 2 PWM channels for npcx7/9_evb. BRANCH=none BUG=none TEST='pwmduty' console command & check the output waveform is correct. ``` uart:~$ pwmduty PWM channels: 0: 50% 1: 25% ``` Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I6fa5d3b7fd3bf1f9d1fdb3f64ca3488ad3addacc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3063104 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/projects/npcx_evb/npcx7/pwm.dts')
-rw-r--r--zephyr/projects/npcx_evb/npcx7/pwm.dts32
1 files changed, 32 insertions, 0 deletions
diff --git a/zephyr/projects/npcx_evb/npcx7/pwm.dts b/zephyr/projects/npcx_evb/npcx7/pwm.dts
new file mode 100644
index 0000000000..3b7b88c235
--- /dev/null
+++ b/zephyr/projects/npcx_evb/npcx7/pwm.dts
@@ -0,0 +1,32 @@
+/* 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-pwms {
+ compatible = "named-pwms";
+
+ fan {
+ pwms = <&pwm0 0 0>;
+ label = "FAN";
+ frequency = <25000>;
+ };
+ kblight {
+ pwms = <&pwm2 0 0>;
+ label = "KBLIGHT";
+ frequency = <10000>;
+ };
+ };
+};
+
+/* fan */
+&pwm0 {
+ status = "okay";
+ drive-open-drain;
+};
+
+/* kblight */
+&pwm2 {
+ status = "okay";
+};