diff options
author | Peter Robinson <pbrobinson@gmail.com> | 2024-06-23 17:53:20 +0100 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2024-06-24 18:14:02 +0200 |
commit | ee9b6b6414790223e8315ef0e25df69b3b5e6e50 (patch) | |
tree | b5f97ad3afcd20d2270ff1615feeffc7b9b397d7 /arch | |
parent | c7f024956d9f35d8b305fe90fe33d7f15055ef25 (diff) |
arm64: dts: rockchip: Add Pinephone Pro support for GPIO LEDs
The PinePhone Pro has a cluster of 3 single RGB GPIO LEDs.
Add the GPIO entries for the 3 red/green/blue LEDs and an
entry for the multi-color group to allow them to be used
as a combined RGB LED.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Link: https://lore.kernel.org/r/20240623165326.1273944-1-pbrobinson@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts index f474c2268753..f1209dc3f761 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 <dt-bindings/input/gpio-keys.h> #include <dt-bindings/input/linux-event-codes.h> +#include <dt-bindings/leds/common.h> #include "rk3399.dtsi" #include "rk3399-opp.dtsi" @@ -69,6 +70,34 @@ }; }; + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&red_led_pin &green_led_pin &blue_led_pin>; + + led_red: led-0 { + color = <LED_COLOR_ID_RED>; + gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; + }; + + led_green: led-1 { + color = <LED_COLOR_ID_GREEN>; + gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; + }; + + led_blue: led-2 { + color = <LED_COLOR_ID_BLUE>; + gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; + }; + }; + + multi-led { + compatible = "leds-group-multicolor"; + color = <LED_COLOR_ID_RGB>; + function = LED_FUNCTION_INDICATOR; + leds = <&led_red>, <&led_green>, <&led_blue>; + }; + vcc_sys: vcc-sys-regulator { compatible = "regulator-fixed"; regulator-name = "vcc_sys"; @@ -481,6 +510,20 @@ }; }; + 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>; |