diff options
author | Andrew McRae <amcrae@google.com> | 2022-07-19 15:42:17 +1000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-20 02:38:03 +0000 |
commit | 0dea801e9a72f4eb7b34dded8aeca80bda584fd0 (patch) | |
tree | 25f81d8b37b780d3b3b64d4ee0626e2c96905a66 /zephyr/projects/nissa/nivviks/pwm_leds.dts | |
parent | fba0a2092ae80395754ebb2a310024ce2e2eaaf5 (diff) | |
download | chrome-ec-0dea801e9a72f4eb7b34dded8aeca80bda584fd0.tar.gz |
nissa: Rearrange projects into sub-directories
Rearrange the projects into separate sub-directories
to improve clarity and separation.
BUG=none
TEST=zmake testall
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I14c3324760d195807f831bd72bdbc129fe76912b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771363
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Diffstat (limited to 'zephyr/projects/nissa/nivviks/pwm_leds.dts')
-rw-r--r-- | zephyr/projects/nissa/nivviks/pwm_leds.dts | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/zephyr/projects/nissa/nivviks/pwm_leds.dts b/zephyr/projects/nissa/nivviks/pwm_leds.dts new file mode 100644 index 0000000000..b6f657fb03 --- /dev/null +++ b/zephyr/projects/nissa/nivviks/pwm_leds.dts @@ -0,0 +1,63 @@ +/* Copyright 2022 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. + */ + +/ { + pwmleds { + compatible = "pwm-leds"; + pwm_led0: pwm_led_0 { + pwms = <&pwm2 2 PWM_HZ(324) PWM_POLARITY_INVERTED>, + <&pwm0 0 PWM_HZ(324) PWM_POLARITY_INVERTED>, + <&pwm1 1 PWM_HZ(324) PWM_POLARITY_INVERTED>; + }; + }; + + cros-pwmleds { + compatible = "cros-ec,pwm-leds"; + + leds = <&pwm_led0>; + frequency = <324>; + + /*<red green blue>*/ + color-map-red = <100 0 0>; + color-map-green = < 0 100 0>; + color-map-blue = < 0 0 100>; + color-map-yellow = < 0 50 50>; + color-map-white = <100 100 100>; + color-map-amber = <100 20 100>; + + brightness-range = <100 100 100 0 0 0>; + + #address-cells = <1>; + #size-cells = <0>; + + pwm_led_0@0 { + reg = <0>; + ec-led-name = "EC_LED_ID_BATTERY_LED"; + }; + }; +}; + +/* Enable LEDs to work while CPU suspended */ + +&pwm0 { + status = "okay"; + clock-bus = "NPCX_CLOCK_BUS_LFCLK"; + pinctrl-0 = <&pwm0_gpc3>; + pinctrl-names = "default"; +}; + +&pwm1 { + status = "okay"; + clock-bus = "NPCX_CLOCK_BUS_LFCLK"; + pinctrl-0 = <&pwm1_gpc2>; + pinctrl-names = "default"; +}; + +&pwm2 { + status = "okay"; + clock-bus = "NPCX_CLOCK_BUS_LFCLK"; + pinctrl-0 = <&pwm2_gpc4>; + pinctrl-names = "default"; +}; |