summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuibin Chang <Ruibin.Chang@ite.com.tw>2021-11-30 13:25:29 +0800
committerCommit Bot <commit-bot@chromium.org>2021-12-02 00:53:09 +0000
commitf6ce56e1b09c5b77f383cd0c1363637ce681223a (patch)
treeb2fa1a6b4b532b4baa0703ec38d4bf412e901833
parent1fce93dbb94dcfa1f8df9c3279c69de38ce6afd4 (diff)
downloadchrome-ec-f6ce56e1b09c5b77f383cd0c1363637ce681223a.tar.gz
zephyr: leverage pwm and fan settings from cros_ec it8xxx2_evb
Leverage pwm and fan settings from cros_ec/main:it8xxx2_evb. And this is convenient to check pwm or fan channel waveform in the same pin. Pwm output 324Hz isn't enough to turn on the fan, so set it to 30000Hz. And we use 324Hz to test pwm maximum output in EC power saving mode. BRANCH=none BUG=none TEST=zmake board it8xxx2_evb Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Change-Id: I0e5c023a634f9a936c29b6bec399d86e66edffeb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3310020 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts17
1 files changed, 9 insertions, 8 deletions
diff --git a/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts b/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts
index 251c6a4236..173a33b697 100644
--- a/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts
+++ b/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts
@@ -194,19 +194,20 @@
named-pwms {
compatible = "named-pwms";
+
/* NOTE: &pwm number needs same with channel number */
- test0 {
- pwms = <&pwm7 PWM_CHANNEL_7 PWM_POLARITY_INVERTED>;
- label = "TEST0";
+ pwm_test: test {
+ pwms = <&pwm0 PWM_CHANNEL_0 PWM_POLARITY_NORMAL>;
+ label = "TEST";
/*
* If we need pwm output in ITE chip power saving
* mode, then we should set frequency <=324Hz.
*/
frequency = <324>;
};
- test1 {
- pwms = <&pwm0 PWM_CHANNEL_0 PWM_POLARITY_NORMAL>;
- label = "TEST1";
+ pwm_fan: fan {
+ pwms = <&pwm7 PWM_CHANNEL_7 PWM_POLARITY_NORMAL>;
+ label = "FAN";
frequency = <30000>;
};
};
@@ -246,13 +247,13 @@
status = "okay";
};
-/* TEST1 */
+/* pwm for test */
&pwm0 {
status = "okay";
prescaler-cx = <PWM_PRESCALER_C6>;
};
-/* TEST0 */
+/* pwm for fan */
&pwm7 {
status = "okay";
prescaler-cx = <PWM_PRESCALER_C4>;