diff options
Diffstat (limited to 'zephyr/projects/corsola/led_steelix.dts')
-rw-r--r-- | zephyr/projects/corsola/led_steelix.dts | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/zephyr/projects/corsola/led_steelix.dts b/zephyr/projects/corsola/led_steelix.dts new file mode 100644 index 0000000000..19bb0978d8 --- /dev/null +++ b/zephyr/projects/corsola/led_steelix.dts @@ -0,0 +1,57 @@ +/* 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 = <&pwm0 0 PWM_HZ(100) PWM_POLARITY_INVERTED + &pwm1 0 PWM_HZ(100) PWM_POLARITY_INVERTED + &pwm2 0 PWM_HZ(100) PWM_POLARITY_INVERTED>; + }; + }; + + cros-pwmleds { + compatible = "cros-ec,pwm-leds"; + + leds = <&pwm_led0>; + frequency = <100>; + + color-map-red = <100 0 0>; + color-map-green = < 0 100 0>; + color-map-amber = <100 20 0>; + + brightness-range = <255 255 0 0 0 255>; + + #address-cells = <1>; + #size-cells = <0>; + + pwm_led_0@0 { + reg = <0>; + ec-led-name = "EC_LED_ID_BATTERY_LED"; + }; + }; +}; + +/* Red LED */ +&pwm0 { + status = "okay"; + drive-open-drain; + clock-bus = "NPCX_CLOCK_BUS_LFCLK"; +}; + +/* Green LED */ +&pwm1 { + status = "okay"; + drive-open-drain; + clock-bus = "NPCX_CLOCK_BUS_LFCLK"; +}; + +/* Blue LED */ +&pwm2 { + status = "okay"; + drive-open-drain; + clock-bus = "NPCX_CLOCK_BUS_LFCLK"; +}; |