diff mbox series

[v1,1/1] arm64: dts: rockchip: add status LED to rock-5b

Message ID 20231005134037.33231-1-sebastian.reichel@collabora.com
State Accepted
Commit 7952cbbda301f7d297c6ac761f9dfafb90205358
Headers show
Series [v1,1/1] arm64: dts: rockchip: add status LED to rock-5b | expand

Commit Message

Sebastian Reichel Oct. 5, 2023, 1:40 p.m. UTC
Describe the Rock 5B status LED in its device tree.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../boot/dts/rockchip/rk3588-rock-5b.dts      | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Heiko Stübner Oct. 16, 2023, 8:12 p.m. UTC | #1
On Thu, 5 Oct 2023 15:40:37 +0200, Sebastian Reichel wrote:
> Describe the Rock 5B status LED in its device tree.
> 
> 

Applied, thanks!

[1/1] arm64: dts: rockchip: add status LED to rock-5b
      commit: 7952cbbda301f7d297c6ac761f9dfafb90205358

Best regards,
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
index 8618887899d9..3f0bea1f5053 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -3,6 +3,7 @@ 
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 #include "rk3588.dtsi"
 
 / {
@@ -37,6 +38,19 @@  analog-sound {
 		pinctrl-0 = <&hp_detect>;
 	};
 
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&led_rgb_b>;
+
+		led_rgb_b {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
 	fan: pwm-fan {
 		compatible = "pwm-fan";
 		cooling-levels = <0 95 145 195 255>;
@@ -300,6 +314,12 @@  hym8563_int: hym8563-int {
 		};
 	};
 
+	leds {
+		led_rgb_b: led-rgb-b {
+			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	sound {
 		hp_detect: hp-detect {
 			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;