diff options
author | YH Lin <yueherngl@chromium.org> | 2022-12-03 00:17:55 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-12-05 17:43:18 +0000 |
commit | dd732876495ed4942d00b9f9ca8dd3b01bad7120 (patch) | |
tree | bdff671e5ad3e71e30ab56f4f084f34a2fd72e28 /docs/zephyr/zephyr_leds.md | |
parent | 184d13e77614be3be5374d3fef9d1edf66ec8687 (diff) | |
download | chrome-ec-dd732876495ed4942d00b9f9ca8dd3b01bad7120.tar.gz |
Revert "Merge remote-tracking branch cros/main into factory-brya-14909.124.B-main"factory-brya-14909.124.B-main
This reverts commit 184d13e77614be3be5374d3fef9d1edf66ec8687.
Reason for revert: broken build due to ec-utils.
Original change's description:
> Merge remote-tracking branch cros/main into factory-brya-14909.124.B-main
>
> Generated by: util/update_release_branch.py --baseboard brya --relevant_paths_file
> baseboard/brya/relevant-paths.txt factory-brya-14909.124.B-main
>
> Relevant changes:
>
> git log --oneline 19d4d68ffa..aa40b859b3 -- baseboard/brya board/agah
> board/anahera board/banshee board/brya board/crota board/felwinter
> board/gimble board/kano board/mithrax board/osiris board/primus
> board/redrix board/taeko board/taniks board/vell board/volmar
> driver/bc12/pi3usb9201_public.* driver/charger/bq25710.*
> driver/ppc/nx20p348x.* driver/ppc/syv682x_public.*
> driver/retimer/bb_retimer_public.* driver/tcpm/nct38xx.*
> driver/tcpm/ps8xxx_public.* driver/tcpm/tcpci.* include/power/alderlake*
> include/intel_x86.h power/alderlake* power/intel_x86.c
> util/getversion.sh
>
> e6da633c38 driver: Sort header files
> 234a87ae2d tcpci: Add FRS enable to driver structure
> a56be59ccd tcpm_header: add test for tcpm_dump_registers
> 57b3256963 Rename CONFIG_CHARGER_INPUT_CURRENT to _CHARGER_DEFAULT_CURRENT_LIMIT
> e420c8ff9a marasov: Modify TypeC and TypeA configuration.
> 43b53e0045 Add default implementation of board_set_charge_limit
> b75dc90677 Add CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT
> f1b563c350 baseboard: Sort header files
> 7d01b1e58d driver/retimer/ps8818.h: Add I2C ADDR FLAGS 0x30, 0x58, 0x70
> ec31407993 Add CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT
> 8f89f69a5b crota: disable lid angle sensor for clamshell
>
> BRANCH=None
> BUG=b:260630630 b:163093572 b:259002141 b:255184961 b:259354679
> BUG=b:247100970 b:254328661
> TEST=`emerge-brya chromeos-ec`
>
> Force-Relevant-Builds: all
> Change-Id: I0ecfa0e6af68631283c7a9e8f1afb9d827176c62
> Signed-off-by: YH Lin <yueherngl@google.com>
Bug: b:260630630 b:163093572 b:259002141 b:255184961 b:259354679
Bug: b:247100970 b:254328661
Change-Id: Ia14942d1bd6a502062399d77cb59d1f4b549b2c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4077247
Auto-Submit: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Commit-Queue: YH Lin <yueherngl@chromium.org>
Diffstat (limited to 'docs/zephyr/zephyr_leds.md')
-rw-r--r-- | docs/zephyr/zephyr_leds.md | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/docs/zephyr/zephyr_leds.md b/docs/zephyr/zephyr_leds.md index 3f57aea013..b29b4ab610 100644 --- a/docs/zephyr/zephyr_leds.md +++ b/docs/zephyr/zephyr_leds.md @@ -53,23 +53,23 @@ gpio-led-pins { compatible = "cros-ec,gpio-led-pins"; /* Amber - turn on yellow LED */ color_amber: color-amber { - led-pins = <&gpio_ec_chg_led_y_c1 &gpio_ec_chg_led_b_c1>; - led-values = <1 0>; + led-pins = <&gpio_ec_chg_led_y_c1 1>, + <&gpio_ec_chg_led_b_c1 0>; }; /* Blue - turn on blue LED */ color_blue: color-blue { - led-pins = <&gpio_ec_chg_led_y_c1 &gpio_ec_chg_led_b_c1>; - led-values = <0 1>; + led-pins = <&gpio_ec_chg_led_y_c1 0>, + <&gpio_ec_chg_led_b_c1 1>; }; /* White - turn on both LEDs */ color_white: color-white { - led-pins = <&gpio_ec_chg_led_y_c1 &gpio_ec_chg_led_b_c1>; - led-values = <1 1>; + led-pins = <&gpio_ec_chg_led_y_c1 1>, + <&gpio_ec_chg_led_b_c1 1>; }; /* Off - turn off both LEDs */ color_off: color-off { - led-pins = <&gpio_ec_chg_led_y_c1 &gpio_ec_chg_led_b_c1>; - led-values = <0 0>; + led-pins = <&gpio_ec_chg_led_y_c1 0>, + <&gpio_ec_chg_led_b_c1 0>; }; }; ``` @@ -77,7 +77,7 @@ GPIO LED Pins dts file example: [led_pins_herobrine.dts] #### PWM based LEDs Configure PWM based LEDs with two separate nodes. -The `pwm-leds` node, described in [pwm-leds.yaml], configures the PWM channel and frequency. +The `cros-ec,pwm-pin-config` node, described in [cros-ec,pwm_led_pin_config.yaml], configures the PWM channel and frequency. The `cros-ec,pwm-led-pins` node, described in [cros-ec,pwm_led_pins.yaml], configures the LED colors. PWM LEDs can vary duty-cycle percentage, providing finer color control over GPIO LEDs. @@ -86,14 +86,16 @@ Example: For this example, the board contains dual-channel LED, one channel controls white color intensity, and one channel controls the amber color intensity. To set the LED color to amber, the yellow channel duty-cycle is set to 100 percentage and white channel duty-cycle is set to 0. ``` -pwmleds { - compatible = "pwm-leds"; +pwm_pins { + compatible = "cros-ec,pwm-pin-config"; pwm_y: pwm_y { + #led-pin-cells = <1>; pwms = <&pwm2 0 PWM_HZ(100) PWM_POLARITY_INVERTED>; }; pwm_w: pwm_w { + #led-pin-cells = <1>; pwms = <&pwm3 0 PWM_HZ(100) PWM_POLARITY_INVERTED>; }; }; @@ -103,18 +105,18 @@ pwm-led-pins { pwm-frequency = <100>; /* Amber - turn on yellow LED */ color_amber: color-amber { - led-pwms = <&pwm_y &pwm_w>; - pwm-values = <100 0>; + led-pins = <&pwm_y 100>, + <&pwm_w 0>; }; /* White - turn on white LED */ color_white: color-white { - led-pwms = <&pwm_y &pwm_w>; - pwm-values = <0 100>; + led-pins = <&pwm_y 0>, + <&pwm_w 100>; }; /* Off - turn off both LEDs */ color_off: color-off { - led-pwms = <&pwm_y &pwm_w>; - pwm-values = <0 0>; + led-pins = <&pwm_y 0>, + <&pwm_w 0>; }; }; ``` @@ -196,7 +198,7 @@ TODO: Enable support for ledtest - Look for the gpio/pwm pins in the schematic with which the LEDs are attached to. - In the above snippet, LEDs are configured to use PWM pins and attached to PWM2 and PWM3. -- Add PWM config nodes as shown in [pwm-leds.yaml] and [led_pins_skyrim.dts]. +- Add PWM config nodes as shown in [cros-ec,pwm_led_pin_config.yaml] and [led_pins_skyrim.dts]. - Add pin nodes based on the color of the LEDs attached as shown in [cros-ec,pwm_led_pins.yaml] and [led_pins_skyrim.dts]. Name the nodes according to the LED color for readability. e.g. `color-amber` - Based on the device LED policy, create led_policy nodes as shown in [cros-ec,led_policy.yaml] and [led_policy_skyrim.dts]. @@ -212,10 +214,10 @@ TODO: Enable support for ledtest [cros-ec,led_policy.yaml]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/leds/cros-ec,led-colors.yaml [cros-ec,gpio_led_pins.yaml]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/leds/cros-ec,gpio-led-pins.yaml [cros-ec,pwm_led_pins.yaml]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/leds/cros-ec,pwm-led-pins.yaml -[pwm-leds.yaml]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/zephyr/main/dts/bindings/led/pwm-leds.yaml -[led_policy_skyrim.dts]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/program/skyrim/led_policy_skyrim.dts -[led_pins_skyrim.dts]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/program/skyrim/led_pins_skyrim.dts -[led_policy_herobrine.dts]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/program/herobrine/led_policy_herobrine.dts -[led_pins_herobrine.dts]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/program/herobrine/led_pins_herobrine.dts +[cros-ec,pwm_led_pin_config.yaml]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/leds/cros-ec,pwm-led-pin-config.yaml +[led_policy_skyrim.dts]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/projects/skyrim/led_policy_skyrim.dts +[led_pins_skyrim.dts]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/projects/skyrim/led_pins_skyrim.dts +[led_policy_herobrine.dts]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/projects/herobrine/led_policy_herobrine.dts +[led_pins_herobrine.dts]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/projects/herobrine/led_pins_herobrine.dts [Example CL enabling single port pwm based LEDs]: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3651490 [Example CL enabling dual port gpio based LEDs]: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3635067 |