summaryrefslogtreecommitdiff
path: root/zephyr/projects/corsola/led_kingler.dts
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/projects/corsola/led_kingler.dts')
-rw-r--r--zephyr/projects/corsola/led_kingler.dts71
1 files changed, 71 insertions, 0 deletions
diff --git a/zephyr/projects/corsola/led_kingler.dts b/zephyr/projects/corsola/led_kingler.dts
new file mode 100644
index 0000000000..92f6c4d4fe
--- /dev/null
+++ b/zephyr/projects/corsola/led_kingler.dts
@@ -0,0 +1,71 @@
+/* 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 = <&pwm0 0 PWM_HZ(100) PWM_POLARITY_INVERTED
+ &pwm1 0 PWM_HZ(100) PWM_POLARITY_INVERTED
+ &pwm2 0 PWM_HZ(100) PWM_POLARITY_INVERTED>;
+ };
+ };
+
+ cros-pwmleds {
+ compatible = "cros-ec,pwm-leds";
+
+ leds = <&pwm_led0>;
+
+ color-map-red = <100 0 0>;
+ color-map-green = < 0 100 0>;
+ color-map-amber = <100 20 0>;
+
+ brightness-range = <255 255 0 0 0 255>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pwm_led_0@0 {
+ reg = <0>;
+ ec-led-name = "EC_LED_ID_BATTERY_LED";
+ };
+ };
+};
+
+/* Red LED */
+&pwm0_gpc3 {
+ drive-open-drain;
+};
+
+&pwm0 {
+ status = "okay";
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+ pinctrl-0 = <&pwm0_gpc3>;
+ pinctrl-names = "default";
+};
+
+/* Green LED */
+&pwm1_gpc2 {
+ drive-open-drain;
+};
+
+&pwm1 {
+ status = "okay";
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+ pinctrl-0 = <&pwm1_gpc2>;
+ pinctrl-names = "default";
+};
+
+/* Blue LED */
+&pwm2_gpc4 {
+ drive-open-drain;
+};
+
+&pwm2 {
+ status = "okay";
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+ pinctrl-0 = <&pwm2_gpc4>;
+ pinctrl-names = "default";
+};