diff mbox series

[4/6] arm64: dts: rockchip: convert leds node to "pwm-led" for Radxa ROCK 5B

Message ID 20241130004057.7432-5-naoki@radxa.com (mailing list archive)
State New
Headers show
Series arm64: dts: rockchip: sync dts with schematic for Radxa ROCK 5B | expand

Commit Message

FUKAUMI Naoki Nov. 30, 2024, 12:40 a.m. UTC
convert heartbeat LED to use "pwm-led" to control birghtness.
also, define default-state = "on" to match with U-Boot.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
---
 .../boot/dts/rockchip/rk3588-rock-5b.dts      | 22 +++++++++----------
 1 file changed, 10 insertions(+), 12 deletions(-)
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 95f2f4dbf12d..7c8359fe712a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -50,15 +50,15 @@  hdmi0_con_in: endpoint {
 	};
 
 	leds {
-		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 = <&led_rgb_b>;
+		compatible = "pwm-leds";
 
-		led_rgb_b {
-			function = LED_FUNCTION_STATUS;
+		led-0 {
 			color = <LED_COLOR_ID_BLUE>;
-			gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+			function = LED_FUNCTION_STATUS;
 			linux,default-trigger = "heartbeat";
+			pwms = <&pwm0 0 1000000 0>;
+			max-brightness = <255>;
 		};
 	};
 
@@ -413,12 +413,6 @@  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>;
@@ -456,6 +450,10 @@  usb_host_pwren_h: usb-host-pwren-h {
 	};
 };
 
+&pwm0 {
+	status = "okay";
+};
+
 &pwm1 {
 	status = "okay";
 };