diff options
Diffstat (limited to 'zephyr/test/drivers/pwm_led_driver/led_pins.dts')
-rw-r--r-- | zephyr/test/drivers/pwm_led_driver/led_pins.dts | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/zephyr/test/drivers/pwm_led_driver/led_pins.dts b/zephyr/test/drivers/pwm_led_driver/led_pins.dts new file mode 100644 index 0000000000..5455a21bef --- /dev/null +++ b/zephyr/test/drivers/pwm_led_driver/led_pins.dts @@ -0,0 +1,108 @@ +/* Copyright 2022 The ChromiumOS Authors. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <zephyr/dt-bindings/pwm/pwm.h> + +/ { + pwms { + #address-cells = <1>; + #size-cells = <1>; + + pwm_blue_left: pwm@0 { + compatible = "cros,pwm-mock"; + reg = <0 1>; + #pwm-cells = <2>; + status = "okay"; + }; + pwm_white_left: pwm@1 { + compatible = "cros,pwm-mock"; + reg = <1 1>; + #pwm-cells = <2>; + status = "okay"; + }; + pwm_amber_right: pwm@2 { + compatible = "cros,pwm-mock"; + reg = <2 1>; + #pwm-cells = <2>; + status = "okay"; + }; + pwm_white_right: pwm@3 { + compatible = "cros,pwm-mock"; + reg = <3 1>; + #pwm-cells = <2>; + status = "okay"; + }; + }; + + pwmleds { + compatible = "cros-ec,pwm-pin-config"; + + pwmled_blue_left: pwmled_b_left { + #led-pin-cells = <1>; + pwms = <&pwm_blue_left 0 1000000>; + }; + pwmled_white_left: pwmled_w_left { + #led-pin-cells = <1>; + pwms = <&pwm_white_left 0 1000000>; + }; + pwmled_amber_right: pwmled_y_right { + #led-pin-cells = <1>; + pwms = <&pwm_amber_right 0 1000000>; + }; + pwmled_white_right: pwmled_w_right { + #led-pin-cells = <1>; + pwms = <&pwm_white_right 0 1000000>; + }; + }; + + pwm-led-pins { + compatible = "cros-ec,pwm-led-pins"; + + color_off_left: color-off-left { + led-color = "LED_OFF"; + led-id = "EC_LED_ID_LEFT_LED"; + led-pins = <&pwmled_blue_left 0>, + <&pwmled_white_left 0>; + }; + color_off_right: color-off-right { + led-color = "LED_OFF"; + led-id = "EC_LED_ID_RIGHT_LED"; + led-pins = <&pwmled_amber_right 0>, + <&pwmled_white_right 0>; + }; + color_blue_left: color-blue-left { + led-color = "LED_BLUE"; + led-id = "EC_LED_ID_LEFT_LED"; + br-color = "EC_LED_COLOR_BLUE"; + led-pins = <&pwmled_blue_left 100>, + <&pwmled_white_left 0>; + }; + color_amber_right: color-amber-right { + led-color = "LED_AMBER"; + led-id = "EC_LED_ID_RIGHT_LED"; + br-color = "EC_LED_COLOR_AMBER"; + led-pins = <&pwmled_amber_right 100>, + <&pwmled_white_right 0>; + }; + color_white_left: color-white-left { + led-color = "LED_WHITE"; + led-id = "EC_LED_ID_LEFT_LED"; + br-color = "EC_LED_COLOR_WHITE"; + led-pins = <&pwmled_blue_left 0>, + <&pwmled_white_left 100>; + }; + color_white_right: color-white-right { + led-color = "LED_WHITE"; + led-id = "EC_LED_ID_RIGHT_LED"; + br-color = "EC_LED_COLOR_WHITE"; + led-pins = <&pwmled_amber_right 0>, + <&pwmled_white_right 100>; + }; + }; + + led-colors { + compatible = "cros-ec,led-policy"; + }; +}; |