From 53abdfdbed2cc4b4ad04b84514f773ed50458c61 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Tue, 21 Sep 2021 17:51:59 +0000 Subject: zephyr: shim: add an example for the leds property and make it required Add a complete example for the cros-ec,pwm-leds leds property, and mark it as required since the whole LED functionality depends on it. BRANCH=none BUG=none TEST=build and run Signed-off-by: Fabio Baltieri Change-Id: I6d875b1a3a436baa77b6c15b8018e4b37102bb46 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3174051 Reviewed-by: Keith Short Commit-Queue: Keith Short --- zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'zephyr') diff --git a/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml b/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml index cc27013ca9..2a16c9150c 100644 --- a/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml +++ b/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml @@ -11,9 +11,26 @@ include: base.yaml properties: leds: type: phandles + required: true 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. + For example + pwmleds { + compatible = "pwm-leds"; + pwm_led0: pwm_led_0 { + pwms = <&led3_red + &led2_green + &led1_blue + &led3_sidesel + >; + }; + }; + cros-pwmleds { + compatible = "cros-ec,pwm-leds"; + leds = <&pwm_led0>; + }; + # TODO(b/177452529): add led_color_map support -- cgit v1.2.1