arm64: dts: rockchip: Add LED_GREEN for edgeble-neu6a
authorJagan Teki <jagan@edgeble.ai>
Sat, 25 Nov 2023 19:05:22 +0000 (00:35 +0530)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 25 Jan 2024 20:28:48 +0000 (21:28 +0100)
Edgeble NCM6A, NCM6B SoM has Green LED on the module.

Enable them with heartbeat function.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Link: https://lore.kernel.org/r/20231125190522.87607-11-jagan@edgeble.ai
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-common.dtsi

index 961a800146868dae4d19348b934349744dffd794..c0d4a15323e292b3f458702876a1d28291ebe88a 100644 (file)
@@ -3,11 +3,27 @@
  * Copyright (c) 2023 Edgeble AI Technologies Pvt. Ltd.
  */
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
 / {
        aliases {
                mmc0 = &sdhci;
        };
 
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               led_user: led-0 {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_HEARTBEAT;
+                       gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&led_user_en>;
+               };
+       };
+
        vcc12v_dcin: vcc12v-dcin-regulator {
                compatible = "regulator-fixed";
                regulator-name = "vcc12v_dcin";
        };
 };
 
+&pinctrl {
+       leds {
+               led_user_en: led_user_en {
+                       rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
+
 &sdhci {
        bus-width = <8>;
        no-sdio;