diff options
author | Fabio Baltieri <fabiobaltieri@google.com> | 2021-09-10 14:39:16 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-10 22:35:05 +0000 |
commit | 2c0c44bed1d4b866cd33abc6ed29ac6241b32476 (patch) | |
tree | d0fc27a7bc01156f959a5f24e6906d153cddf912 /zephyr/projects/volteer/volteer/pwm.dts | |
parent | 8b37b17df0b8946763b1da984c64c51418a6b381 (diff) | |
download | chrome-ec-2c0c44bed1d4b866cd33abc6ed29ac6241b32476.tar.gz |
zephyr: shim: set pwm_led data from device tree
Set up the pwm_leds data from the device tree, gets rid of most static
map defines and sets CONFIG_LED_PWM_COUNT automatically.
BRANCH=none
BUG=b:177452529
TEST=build and run on volteer
TEST=compared the built up pwm_leds structure with gdb
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Ib41faf86ae018f5a1ed8a1c96c4b6ec081e175d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3154256
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
Diffstat (limited to 'zephyr/projects/volteer/volteer/pwm.dts')
-rw-r--r-- | zephyr/projects/volteer/volteer/pwm.dts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/zephyr/projects/volteer/volteer/pwm.dts b/zephyr/projects/volteer/volteer/pwm.dts index f8a24840cd..f8a0fef7df 100644 --- a/zephyr/projects/volteer/volteer/pwm.dts +++ b/zephyr/projects/volteer/volteer/pwm.dts @@ -7,22 +7,26 @@ named-pwms { compatible = "named-pwms"; - led1_blue { + led1_blue: led1_blue { + #pwm-cells = <0>; pwms = <&pwm2 0 PWM_POLARITY_INVERTED>; label = "LED1_BLUE"; frequency = <4800>; }; - led2_green { + led2_green: led2_green { + #pwm-cells = <0>; pwms = <&pwm0 0 PWM_POLARITY_INVERTED>; label = "LED2_GREEN"; frequency = <4800>; }; - led3_red { + led3_red: led3_red { + #pwm-cells = <0>; pwms = <&pwm1 0 PWM_POLARITY_INVERTED>; label = "LED3_RED"; frequency = <4800>; }; - led3_sidesel { + led3_sidesel: led3_sidesel { + #pwm-cells = <0>; pwms = <&pwm7 0 PWM_POLARITY_INVERTED>; label = "LED4_SIDESEL"; frequency = <2400>; |