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/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/dts')
-rw-r--r-- | zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml b/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml new file mode 100644 index 0000000000..cc27013ca9 --- /dev/null +++ b/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml @@ -0,0 +1,19 @@ +# Copyright 2021 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. + +description: PWM LED configuration + +compatible: "cros-ec,pwm-leds" + +include: base.yaml + +properties: + leds: + type: phandles + description: | + List of pwm-leds nodes. These are expected to have a pwms property + pointing to the relevant PWMs, in red, green, blue and optionally sidesel + order. + + # TODO(b/177452529): add led_color_map support |