diff options
author | Keith Short <keithshort@chromium.org> | 2020-12-15 15:13:10 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-29 21:57:44 +0000 |
commit | 9a2920efeffc04953ce01489ef1a5669e8662232 (patch) | |
tree | 5c0120bc2785a0b92ae8b5fa9ded524078d34205 /zephyr/projects/volteer/boards/arm | |
parent | 40b2572cf845020c9380fb7052af5a2d804ac1c9 (diff) | |
download | chrome-ec-9a2920efeffc04953ce01489ef1a5669e8662232.tar.gz |
zephyr: add PWM shim
Adds PWM shim to connect the platform/ec PWM API to the Zephyr PWM API.
BUG=b:174850923
BRANCH=none
TEST=make buildall
TEST=Run "pwmduty" command against Volteer LEDs
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I49047734bc1a3fb3d4010f0040145171275c5657
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2623163
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/projects/volteer/boards/arm')
-rw-r--r-- | zephyr/projects/volteer/boards/arm/volteer/volteer.dts | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/zephyr/projects/volteer/boards/arm/volteer/volteer.dts b/zephyr/projects/volteer/boards/arm/volteer/volteer.dts index e35b59240c..59cc5f2cbc 100644 --- a/zephyr/projects/volteer/boards/arm/volteer/volteer.dts +++ b/zephyr/projects/volteer/boards/arm/volteer/volteer.dts @@ -57,6 +57,31 @@ }; }; + named-pwms { + compatible = "named-pwms"; + + led1_blue { + pwms = <&pwm2 0 PWM_POLARITY_INVERTED>; + label = "LED1_BLUE"; + frequency = <4800>; + }; + led2_green { + pwms = <&pwm0 0 PWM_POLARITY_INVERTED>; + label = "LED2_GREEN"; + frequency = <4800>; + }; + led3_red { + pwms = <&pwm1 0 PWM_POLARITY_INVERTED>; + label = "LED3_RED"; + frequency = <4800>; + }; + led3_sidesel { + pwms = <&pwm7 0 PWM_POLARITY_INVERTED>; + label = "LED4_SIDESEL"; + frequency = <2400>; + }; + }; + named-gpios { compatible = "named-gpios"; @@ -467,3 +492,23 @@ &cros_kb_raw { status = "okay"; }; + +/* Green LED */ +&pwm0 { + status = "okay"; +}; + +/* Red LED */ +&pwm1 { + status = "okay"; +}; + +/* Blue LED */ +&pwm2 { + status = "okay"; +}; + +/* Side selection LED */ +&pwm7 { + status = "okay"; +}; |