From 82922ade3a41d88f65d9591432902f105d8d62b4 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sun, 4 Sep 2022 22:57:26 +0200 Subject: [PATCH 281/464] arm64: dts: rk3399-pinephone-pro: Add support for LEDs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The board contains a RGB LED, that functions as three individual leds, due to the lack of a diffuser. Signed-off-by: Martijn Braam Co-developed-by: Kamil TrzciƄski Signed-off-by: Ondrej Jirman --- .../dts/rockchip/rk3399-pinephone-pro.dts | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts index 50cd3698c7fc..1ee506c3f09f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts @@ -12,6 +12,7 @@ /dts-v1/; #include #include +#include #include "rk3399.dtsi" #include "rk3399-opp.dtsi" @@ -55,6 +56,30 @@ backlight: backlight { pwms = <&pwm0 0 50000 0>; }; + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&red_led_pin &green_led_pin &blue_led_pin>; + + led-red { + color = ; + function = LED_FUNCTION_INDICATOR; + gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; + }; + + led-green { + color = ; + function = LED_FUNCTION_INDICATOR; + gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; + }; + + led-blue { + color = ; + function = LED_FUNCTION_INDICATOR; + gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; + }; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -487,6 +512,20 @@ pwrbtn_pin: pwrbtn-pin { }; }; + leds { + red_led_pin: red-led-pin { + rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + green_led_pin: green-led-pin { + rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + blue_led_pin: blue-led-pin { + rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + pmic { pmic_int_l: pmic-int-l { rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; -- 2.34.1