summaryrefslogtreecommitdiff
path: root/zephyr/projects/brya/pwm_leds.dts
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/projects/brya/pwm_leds.dts')
-rw-r--r--zephyr/projects/brya/pwm_leds.dts79
1 files changed, 79 insertions, 0 deletions
diff --git a/zephyr/projects/brya/pwm_leds.dts b/zephyr/projects/brya/pwm_leds.dts
new file mode 100644
index 0000000000..4321b4bd34
--- /dev/null
+++ b/zephyr/projects/brya/pwm_leds.dts
@@ -0,0 +1,79 @@
+/* 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.
+ */
+
+/ {
+ pwmleds {
+ compatible = "pwm-leds";
+ pwm_led0: pwm_led_0 {
+ pwms = <&pwm2 0 PWM_HZ(4800) PWM_POLARITY_INVERTED
+ &pwm0 0 PWM_HZ(4800) PWM_POLARITY_INVERTED>;
+ };
+ pwm_led1: pwm_led_1 {
+ pwms = <&pwm1 0 PWM_HZ(4800) PWM_POLARITY_INVERTED
+ &pwm7 0 PWM_HZ(4800) PWM_POLARITY_INVERTED>;
+ };
+ };
+
+ cros-pwmleds {
+ compatible = "cros-ec,pwm-leds";
+
+ leds = <&pwm_led0 &pwm_led1>;
+
+ /*<amber white>*/
+ color-map-red = <0 0>;
+ color-map-green = <0 0>;
+ color-map-blue = <0 0>;
+ color-map-yellow = <0 0>;
+ color-map-white = <0 50>;
+ color-map-amber = <50 0>;
+
+ brightness-range = <0 0 0 0 100 100>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pwm_led_0@0 {
+ reg = <0>;
+ ec-led-name = "EC_LED_ID_LEFT_LED";
+ };
+
+ pwm_led_1@1 {
+ reg = <1>;
+ ec-led-name = "EC_LED_ID_RIGHT_LED";
+ };
+ };
+};
+
+/* LED2 */
+&pwm0 {
+ status = "okay";
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+ pinctrl-0 = <&pwm0_gpc3>;
+ pinctrl-names = "default";
+};
+
+/* LED3 */
+&pwm1 {
+ status = "okay";
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+ pinctrl-0 = <&pwm1_gpc2>;
+ pinctrl-names = "default";
+};
+
+/* LED1 */
+&pwm2 {
+ status = "okay";
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+ pinctrl-0 = <&pwm2_gpc4>;
+ pinctrl-names = "default";
+};
+
+/* LED4 */
+&pwm7 {
+ status = "okay";
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+ pinctrl-0 = <&pwm7_gp60>;
+ pinctrl-names = "default";
+};