[PATCH 03/15] arm64: dts: rockchip: add status LED to opi5max

Jimmy Hon honyuenkwun at gmail.com
Sat Oct 26 02:48:19 PDT 2024


Describe the Orange Pi 5 Max 2 status LEDs in its device tree.

Signed-off-by: Jimmy Hon <honyuenkwun at gmail.com>
---
 .../dts/rockchip/rk3588-orangepi-5-max.dts    | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 53a34cb37487..83a118e52bb0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/rockchip.h>
 #include "rk3588.dtsi"
 
@@ -19,6 +20,28 @@ chosen {
 		stdout-path = "serial2:1500000n8";
 	};
 
+	pwm-leds {
+		compatible = "pwm-leds";
+
+		blue_led: led-1 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+			linux,default-trigger = "heartbeat";
+			max-brightness = <255>;
+			/* PWM_LED1 */
+			pwms = <&pwm4 0 25000 0>;
+		};
+
+		green_led: led-2 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_STATUS;
+			linux,default-trigger = "heartbeat";
+			max-brightness = <255>;
+			/* PWM_LED2 */
+			pwms = <&pwm5 0 25000 0>;
+		};
+	};
+
 	/* PMIC_EXT_EN */
 	vcc_1v1_nldo_s3: vcc-1v1-ndlo-s3-regulator {
 		compatible = "regulator-fixed";
@@ -127,6 +150,18 @@ regulator-state-mem {
 	};
 };
 
+&pwm4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm4m0_pins>;
+	status = "okay";
+};
+
+&pwm5 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm5m1_pins>;
+	status = "okay";
+};
+
 &saradc {
 	vref-supply = <&vcca_1v8_s0>;
 	status = "okay";
-- 
2.47.0




More information about the Linux-rockchip mailing list