Commit dd48a030 authored by Chris Morgan's avatar Chris Morgan Committed by Heiko Stuebner

arm64: dts: rockchip: Update leds for Odroid Go Advance

Update the blue LED to be controlled via pwm to enable control of LED
brightness. Add red LED as a GPIO controlled LED. The documentation
stated "label" was depreciated so function and color was used instead.
The LED names (led-2 and led-3) are given because that is what they
are numbered on the board itself; LED 1 is wired directly into an
always on regulator and is not controllable. LED 2 is labelled "alive"
on the board and documentation recommends we set the function as
status over other miscellaneous functions. LED 3 is labelled "chg" on
the board.
Signed-off-by: default avatarChris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20221201203655.1245-5-macroalpha82@gmail.comSigned-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
parent 1b5aaeda
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
/dts-v1/; /dts-v1/;
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h> #include <dt-bindings/pinctrl/rockchip.h>
#include "rk3326.dtsi" #include "rk3326.dtsi"
...@@ -113,15 +114,29 @@ button-sw16 { ...@@ -113,15 +114,29 @@ button-sw16 {
}; };
}; };
leds: gpio-leds { /* led-1 is wired directly to output of always-on regulator */
gpio_led: gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&blue_led_pin>; pinctrl-0 = <&red_led_pin>;
red_led: led-3 {
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
function = LED_FUNCTION_CHARGING;
};
};
blue_led: led-0 { pwm_led: led-controller {
label = "blue:heartbeat"; compatible = "pwm-leds";
gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
blue_led: led-2 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_STATUS;
linux,default-trigger = "heartbeat"; linux,default-trigger = "heartbeat";
max-brightness = <255>;
pwms = <&pwm3 0 25000 0>;
}; };
}; };
...@@ -465,6 +480,10 @@ &pwm1 { ...@@ -465,6 +480,10 @@ &pwm1 {
status = "okay"; status = "okay";
}; };
&pwm3 {
status = "okay";
};
&saradc { &saradc {
vref-supply = <&vcc_1v8>; vref-supply = <&vcc_1v8>;
status = "okay"; status = "okay";
...@@ -569,8 +588,8 @@ hp_det: hp-det { ...@@ -569,8 +588,8 @@ hp_det: hp-det {
}; };
leds { leds {
blue_led_pin: blue-led-pin { red_led_pin: red-led-pin {
rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment