OSDN Git Service

arm64: dts: imx8mq-librem5: add RGB pwm notification leds
authorGuido Günther <agx@sigxcpu.org>
Fri, 2 Sep 2022 08:42:12 +0000 (10:42 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sat, 17 Sep 2022 08:34:26 +0000 (16:34 +0800)
Describe the RGB notification leds on the Librem 5 phone.
Use the common defines so we're sure to adhere to the common patterns,
use predefined led colors and functions so we're being warned in case
of deprecations.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi

index 0626e41..8da7b87 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "dt-bindings/input/input.h"
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
 #include "dt-bindings/pwm/pwm.h"
 #include "dt-bindings/usb/pd.h"
 #include "imx8mq.dtsi"
                };
        };
 
+       led-controller {
+               compatible = "pwm-leds";
+
+               led-0 {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_BLUE>;
+                       max-brightness = <248>;
+                       pwms = <&pwm2 0 50000 0>;
+               };
+
+               led-1 {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
+                       max-brightness = <248>;
+                       pwms = <&pwm4 0 50000 0>;
+               };
+
+               led-2 {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_RED>;
+                       max-brightness = <248>;
+                       pwms = <&pwm3 0 50000 0>;
+               };
+       };
+
        reg_aud_1v8: regulator-audio-1v8 {
                compatible = "regulator-fixed";
                pinctrl-names = "default";